initial commit. Cloned timetracker repository

This commit is contained in:
Daniel Goc
2026-03-10 09:02:57 +01:00
commit f2952bcef0
189 changed files with 21334 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
package response
import "git.ma-al.com/goc_marek/timetracker/app/utils/i18n"
type ResponseMessage i18n.I18nTranslation
const (
Message_OK ResponseMessage = "message_ok"
Message_NOK ResponseMessage = "message_nok"
)

View File

@@ -0,0 +1,18 @@
package response
import "github.com/gofiber/fiber/v3"
type Response[T any] struct {
Message string `json:"message,omitempty"`
Items *T `json:"items,omitempty"`
Count *int `json:"count,omitempty"`
}
func Make[T any](c fiber.Ctx, status int, items *T, count *int, message string) Response[T] {
c.Status(status)
return Response[T]{
Message: message,
Items: items,
Count: count,
}
}