Documentation ¶
Index ¶
- func StringToBoolHookFunc() mapstructure.DecodeHookFuncType
- func StringToBytesHookFunc() mapstructure.DecodeHookFuncType
- func StringToFloat64HookFunc() mapstructure.DecodeHookFuncType
- func StringToIntHookFunc() mapstructure.DecodeHookFuncType
- func StringToSliceHookFunc(sep string) mapstructure.DecodeHookFuncType
- func StringToTimeHookFunc() mapstructure.DecodeHookFuncType
- func UnmarshalToMapHookFunc(unmarshal func(in []byte, out any) error) mapstructure.DecodeHookFuncType
- func UnmarshalToSliceHookFunc(unmarshal func(in []byte, out any) error) mapstructure.DecodeHookFuncType
- func UnmarshalToStructHookFunc(unmarshal func(in []byte, out any) error) mapstructure.DecodeHookFuncType
- type AfterBinding
- type AfterValidation
- type BeforeBinding
- type BeforeValidation
- type GinBinding
- type GinBindingWrapper
- type GinDefaultBinding
- type GinHelper
- type GinRouter
- type GinURIBinding
- type GinValidator
- type GormHelper
- type GormZerologLogger
- func (l *GormZerologLogger) Error(ctx context.Context, msg string, data ...any)
- func (l *GormZerologLogger) Info(ctx context.Context, msg string, data ...any)
- func (l *GormZerologLogger) LogMode(level logger.LogLevel) logger.Interface
- func (l *GormZerologLogger) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error)
- func (l *GormZerologLogger) Warn(ctx context.Context, msg string, data ...any)
- type StackInfo
- type ViperHelper
- type ZerologHelper
- func (h *ZerologHelper) ConsoleWriter() zerolog.ConsoleWriter
- func (h *ZerologHelper) NewConsoleLogger() *zerolog.Logger
- func (h *ZerologHelper) NewLogger(out io.Writer) *zerolog.Logger
- func (h *ZerologHelper) SetDefaultGlobalErrorStackMarshaller() *ZerologHelper
- func (h *ZerologHelper) SetDefaultGlobalInterfaceMarshalFunc() *ZerologHelper
- func (h *ZerologHelper) SetDefaultGlobalLevel() *ZerologHelper
- func (h *ZerologHelper) SetErrorStackMarshaller(fn func(error) any) *ZerologHelper
- func (h *ZerologHelper) SetGlobalLevel(level zerolog.Level) *ZerologHelper
- func (h *ZerologHelper) SetInterfaceMarshalFunc(fn func(any) ([]byte, error)) *ZerologHelper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StringToBoolHookFunc ¶
func StringToBoolHookFunc() mapstructure.DecodeHookFuncType
func StringToBytesHookFunc ¶
func StringToBytesHookFunc() mapstructure.DecodeHookFuncType
func StringToFloat64HookFunc ¶
func StringToFloat64HookFunc() mapstructure.DecodeHookFuncType
func StringToIntHookFunc ¶
func StringToIntHookFunc() mapstructure.DecodeHookFuncType
func StringToSliceHookFunc ¶
func StringToSliceHookFunc(sep string) mapstructure.DecodeHookFuncType
func StringToTimeHookFunc ¶
func StringToTimeHookFunc() mapstructure.DecodeHookFuncType
func UnmarshalToMapHookFunc ¶
func UnmarshalToMapHookFunc(unmarshal func(in []byte, out any) error) mapstructure.DecodeHookFuncType
func UnmarshalToSliceHookFunc ¶
func UnmarshalToSliceHookFunc(unmarshal func(in []byte, out any) error) mapstructure.DecodeHookFuncType
func UnmarshalToStructHookFunc ¶
func UnmarshalToStructHookFunc(unmarshal func(in []byte, out any) error) mapstructure.DecodeHookFuncType
Types ¶
type AfterBinding ¶
type AfterValidation ¶
type BeforeBinding ¶
type BeforeValidation ¶
type GinBindingWrapper ¶
func NewGinBinding ¶
func NewGinBinding(b binding.Binding) *GinBindingWrapper
func (*GinBindingWrapper) Name ¶
func (b *GinBindingWrapper) Name() string
type GinDefaultBinding ¶
type GinDefaultBinding struct { TagName string DecodeHooks []mapstructure.DecodeHookFunc }
func NewGinDefaultBinding ¶
func NewGinDefaultBinding(options ...func(*GinDefaultBinding)) *GinDefaultBinding
func (*GinDefaultBinding) Name ¶
func (b *GinDefaultBinding) Name() string
type GinHelper ¶
type GinHelper struct { Bindings []GinBinding BindingValidator binding.StructValidator BindingErrorHandler func(*gin.Context, error) SuccessHandler func(*gin.Context, any) ErrorHandler func(*gin.Context, error) }
type GinRouter ¶
type GinRouter struct {
// contains filtered or unexported fields
}
type GinURIBinding ¶
type GinURIBinding struct { Params func(*gin.Context) map[string][]string BindingURI binding.BindingUri }
func NewGinURIBinding ¶
func NewGinURIBinding() *GinURIBinding
func (*GinURIBinding) Name ¶
func (b *GinURIBinding) Name() string
type GinValidator ¶
type GinValidator struct { Validate *validator.Validate Translator locales.Translator TranslatorRegister func(v *validator.Validate, trans ut.Translator) error Verbose bool // contains filtered or unexported fields }
func NewGinValidator ¶
func NewGinValidator(options ...func(*GinValidator)) *GinValidator
func (*GinValidator) Engine ¶
func (v *GinValidator) Engine() any
func (*GinValidator) ValidateStruct ¶
func (v *GinValidator) ValidateStruct(obj any) error
type GormHelper ¶
func Gorm ¶
func Gorm(options ...func(*GormHelper)) *GormHelper
type GormZerologLogger ¶
type GormZerologLogger struct { BackupWriter io.Writer Level zerolog.Level SlowThreshold time.Duration IgnoreRecordNotFoundError bool }
func NewGormZerologLogger ¶
func NewGormZerologLogger(options ...func(logger *GormZerologLogger)) *GormZerologLogger
func (*GormZerologLogger) Error ¶
func (l *GormZerologLogger) Error(ctx context.Context, msg string, data ...any)
func (*GormZerologLogger) Info ¶
func (l *GormZerologLogger) Info(ctx context.Context, msg string, data ...any)
func (*GormZerologLogger) LogMode ¶
func (l *GormZerologLogger) LogMode(level logger.LogLevel) logger.Interface
type ViperHelper ¶
type ViperHelper struct { V *viper.Viper ConfigFile string TagName string EnableEnv bool IgnoreEnvFunc func(key string, val string) bool DecodeHooks []mapstructure.DecodeHookFunc }
func Viper ¶
func Viper(options ...func(*ViperHelper)) *ViperHelper
func (*ViperHelper) Unmarshal ¶
func (h *ViperHelper) Unmarshal(conf any) error
type ZerologHelper ¶
type ZerologHelper struct{}
func Zerolog ¶
func Zerolog() *ZerologHelper
func (*ZerologHelper) ConsoleWriter ¶
func (h *ZerologHelper) ConsoleWriter() zerolog.ConsoleWriter
func (*ZerologHelper) NewConsoleLogger ¶
func (h *ZerologHelper) NewConsoleLogger() *zerolog.Logger
func (*ZerologHelper) SetDefaultGlobalErrorStackMarshaller ¶
func (h *ZerologHelper) SetDefaultGlobalErrorStackMarshaller() *ZerologHelper
func (*ZerologHelper) SetDefaultGlobalInterfaceMarshalFunc ¶
func (h *ZerologHelper) SetDefaultGlobalInterfaceMarshalFunc() *ZerologHelper
func (*ZerologHelper) SetDefaultGlobalLevel ¶
func (h *ZerologHelper) SetDefaultGlobalLevel() *ZerologHelper
func (*ZerologHelper) SetErrorStackMarshaller ¶
func (h *ZerologHelper) SetErrorStackMarshaller(fn func(error) any) *ZerologHelper
func (*ZerologHelper) SetGlobalLevel ¶
func (h *ZerologHelper) SetGlobalLevel(level zerolog.Level) *ZerologHelper
func (*ZerologHelper) SetInterfaceMarshalFunc ¶
func (h *ZerologHelper) SetInterfaceMarshalFunc(fn func(any) ([]byte, error)) *ZerologHelper
Source Files ¶
Click to show internal directories.
Click to hide internal directories.