Documentation
¶
Index ¶
- func DateParser(dateStr string) time.Time
- func ExtractJWTClaims(c *fiber.Ctx) (*types.JWT, error)
- func GenerateStateString() string
- func GetCategoryIDFormFiberCtx(c *fiber.Ctx) (uint, error)
- func GetDateRange(dateRange string) (start time.Time, end time.Time)
- func GetEventIDFormFiberCtx(c *fiber.Ctx) (uint, error)
- func GetJWTFromLocals(c *fiber.Ctx, key string) (jwt.MapClaims, error)
- func GetJobIDFormFiberCtx(c *fiber.Ctx) (uint, error)
- func GetOrgIDFormFiberCtx(c *fiber.Ctx) (uint, error)
- func GetParamFormFiberCtx(c *fiber.Ctx, param, field string) (uint, error)
- func GetPrerequisiteIDFormFiberCtx(c *fiber.Ctx) (uint, error)
- func GetStringOfEventIDFormFiberCtx(c *fiber.Ctx) (string, error)
- func GetStringOfOrgIDFormFiberCtx(c *fiber.Ctx) (string, error)
- func GetStringOfParamFormFiberCtx(c *fiber.Ctx, param, field string) (string, error)
- func GetStructFromLocals[T any](ctx *fiber.Ctx, key string) (T, error)
- func GetUserIDFormFiberCtx(c *fiber.Ctx) (uuid.UUID, error)
- func GormErrorAndRowsAffected(result *gorm.DB) error
- func ISO8601Parser(isoStr string) time.Time
- func InitConfig()
- func ListStringToListUuid(ids []string) []uuid.UUID
- func ParseJSONAndValidate(c *fiber.Ctx, body interface{}) error
- func SeparateName(fullName string) (string, string)
- func TimeParser(timeStr string) time.Time
- func UnmarshalAndValidateJSON(jsonStr string, dest interface{}) error
- func UploadBackgroundImage(c *fiber.Ctx) (multipart.File, *multipart.FileHeader, error)
- func UploadImage(c *fiber.Ctx) (multipart.File, *multipart.FileHeader, error)
- func ValidateStruct(data interface{}) []types.ValidationError
- type DateOnly
- type Paginate
- type TimeOnly
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DateParser ¶
func ExtractJWTClaims ¶
func GenerateStateString ¶
func GenerateStateString() string
GenerateStateString generates a secure random state string for OAuth.
func GetDateRange ¶
GetDateRange Searching Service Utils GetDateRange converts a predefined date range string into a start and end time.
func GetEventIDFormFiberCtx ¶
func GetJWTFromLocals ¶
func GetJobIDFormFiberCtx ¶
func GetOrgIDFormFiberCtx ¶
func GetParamFormFiberCtx ¶
func GetStructFromLocals ¶
func GetUserIDFormFiberCtx ¶
func ISO8601Parser ¶
func InitConfig ¶
func InitConfig()
func ListStringToListUuid ¶
func ParseJSONAndValidate ¶
func ParseJSONAndValidate(c *fiber.Ctx, body interface{}) error
func SeparateName ¶
func TimeParser ¶
func UploadBackgroundImage ¶
func UploadBackgroundImage(c *fiber.Ctx) (multipart.File, *multipart.FileHeader, error)
func UploadImage ¶
func UploadImage(c *fiber.Ctx) (multipart.File, *multipart.FileHeader, error)
func ValidateStruct ¶
func ValidateStruct(data interface{}) []types.ValidationError
Types ¶
type DateOnly ¶
func (DateOnly) MarshalJSON ¶
func (*DateOnly) Scan ¶
func (d *DateOnly) Scan(value interface{}) error { if v, ok := value.(time.Time); ok { d.Time = v return nil } return fmt.Errorf("cannot convert %v to DateOnly", value) }
func (*DateOnly) UnmarshalJSON ¶
type Paginate ¶
type Paginate struct {
// contains filtered or unexported fields
}
func NewPaginate ¶
type TimeOnly ¶
func (TimeOnly) MarshalJSON ¶
func (*TimeOnly) Scan ¶
Convert from database value to struct
func (t *TimeOnly) Scan(value interface{}) error { if v, ok := value.(time.Time); ok { t.Time = v return nil } return fmt.Errorf("cannot convert %v to TimeOnly", value) }
Ensure TimeOnly implements sql.Scanner
func (*TimeOnly) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.