Documentation
¶
Index ¶
- func AsPtr[T interface{}](b T) *T
- func CamelToSnake(s string) string
- func ConvertSliceToReference[T interface{}](slice []T) []*T
- func ErrorPanic(err error)
- func GetSortString(input string) string
- func JsonRawMessageToJson(message json.RawMessage) (map[string]interface{}, error)
- func ParamAsUUId(ctx *gin.Context, key string) (uuid.UUID, error)
- func QueryAsUUId(ctx *gin.Context, key string) *uuid.UUID
- func ReadJsonAsType[T interface{}](rc io.ReadCloser) ([]T, error)
- func StringToBool(input string) (*bool, error)
- func StringToDate(input string) (*time.Time, error)
- func StringToDateOnly(input string) (*types.DateOnly, error)
- func StringToFloat64(input string) (*float64, error)
- func StringToInt64(input string) (*int64, error)
- func StringToTimeOnly(input string) (*types.TimeOnly, error)
- type GroupedError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CamelToSnake ¶
CamelToSnake converts a camel case string to snake case.
func ConvertSliceToReference ¶
func ConvertSliceToReference[T interface{}](slice []T) []*T
func ErrorPanic ¶
func ErrorPanic(err error)
func GetSortString ¶
func JsonRawMessageToJson ¶
func JsonRawMessageToJson(message json.RawMessage) (map[string]interface{}, error)
func ReadJsonAsType ¶
func ReadJsonAsType[T interface{}](rc io.ReadCloser) ([]T, error)
func StringToBool ¶
func StringToFloat64 ¶
func StringToInt64 ¶
Types ¶
type GroupedError ¶
type GroupedError struct {
Errors []gojsonschema.ResultError
}
func (*GroupedError) Error ¶
func (e *GroupedError) Error() string
func (*GroupedError) GetErrors ¶
func (e *GroupedError) GetErrors() []gojsonschema.ResultError
Click to show internal directories.
Click to hide internal directories.