Documentation
¶
Index ¶
- Variables
- func AppendCtx(parent context.Context, attr []slog.Attr) context.Context
- func BackstepAGS(ags string) string
- func CalculateAge(birthYear int64) (int64, error)
- func CheckboxFormatBool(value bool) string
- func FormFormatLaws(laws []*models.Law) []string
- func FormFormatProblems(problems []*models.Problem) []string
- func FullHost(r *http.Request, cfg *config.Config, path string) string
- func FullUrl(r *http.Request, cfg *config.Config) string
- func If[T any](cond bool, vtrue, vfalse T) T
- func LimitChars(text string, limit int) string
- func MakeSQLNullInt64(value int64) sql.NullInt64
- func MakeSQLNullString(value string) sql.NullString
- func PrintLocationName(ags_part string, name string) string
- func RandomEmail() string
- func RandomString(n int) string
- func RandomTokenKey() string
- func RandomUsername() string
- func SetServiceCtx(parent context.Context, value string) context.Context
- func SplitAGS(input string) [5]string
- type ContextHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidAGS = errors.New("invalid ags") ErrLocationNotFound = errors.New("location not found") )
Functions ¶
func AppendCtx ¶
AppendCtx adds an slog attribute to the provided context so that it will be included in any Record created with such context
func BackstepAGS ¶
func CalculateAge ¶
func CheckboxFormatBool ¶
func FormFormatLaws ¶
func FormFormatProblems ¶
func LimitChars ¶
func MakeSQLNullInt64 ¶
func MakeSQLNullString ¶
func MakeSQLNullString(value string) sql.NullString
func PrintLocationName ¶
func RandomString ¶
RandomString generates a random string of length n
func RandomTokenKey ¶
func RandomTokenKey() string
RandomTokenKey generates a random keyt for PASETO V4 Token
func SetServiceCtx ¶
SetServiceCtx adds the slog attribute "service" to the provided context so that it will be included in any Record created with such context
Types ¶
Click to show internal directories.
Click to hide internal directories.