Documentation
¶
Index ¶
- func AnyToBytesBuffer(i interface{}) (*bytes.Buffer, error)
- func AnyToString(a any) string
- func AssignFromSlice[T any](slice []T, vars ...*T)
- func GetLocalizer(c echo.Context) *i18n.Localizer
- func GetTemplate(templ string) *template.Template
- func GetVarValue(v any) any
- func GracefulShutdown(log *logger.AppLogger, ops ...func() error)
- func IfThenElse[T any](condition bool, ifTrue T, ifFalse T) T
- func IsA(a any, typeToAssert reflect.Kind) bool
- func IsNil(x interface{}) bool
- func JSONAPIModel[T ...](r *echo.Response, models T, status int) error
- func MakeStruct(data map[string]any) interface{}
- func MakeTemplateData(data map[string]any) interface{}
- func MapToByte(obj map[string]interface{}) ([]byte, error)
- func MemoryUsage() string
- func Must[T any](t T, err error) T
- func MustErr(err error)
- func RequestID(c echo.Context) string
- func RuntimeStatistics(startTime time.Time, showName bool) string
- func StructToJSONField(obj interface{}) (jf.JsonField, error)
- func StructToMap(obj interface{}) (map[string]interface{}, error)
- func SubStr(stack string, needle string) string
- func Ter[T any](cond bool, a, b T) T
- func ToPointer[T any](t T) *T
- func ToPointerOrNil[T comparable](t T) *T
- func ValidationErrorString(ctx echo.Context, validationErrors validator.ValidationErrors) map[string]interface{}
- func ValueFromPointer[T any](t *T) T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnyToBytesBuffer ¶
func AnyToString ¶
func AssignFromSlice ¶
func AssignFromSlice[T any](slice []T, vars ...*T)
func GetTemplate ¶
func GetVarValue ¶
func GracefulShutdown ¶
func IfThenElse ¶
func JSONAPIModel ¶
func MakeStruct ¶
func MakeTemplateData ¶
func MemoryUsage ¶
func MemoryUsage() string
func StructToJSONField ¶
func StructToMap ¶
func ToPointerOrNil ¶
func ToPointerOrNil[T comparable](t T) *T
func ValidationErrorString ¶
func ValidationErrorString( ctx echo.Context, validationErrors validator.ValidationErrors, ) map[string]interface{}
func ValueFromPointer ¶
func ValueFromPointer[T any](t *T) T
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.