Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheCallback ¶
type Cacher ¶
type Cacher interface {
Exists(ctx context.Context, key string) bool
Get(ctx context.Context, key string, obj any) error
Set(ctx context.Context, key string, value any, ttl time.Duration) error
GetSet(ctx context.Context, key string, ttl time.Duration, obj any, funCallback CacheCallback) error
Del(ctx context.Context, key string) error
ExpiresAt(ctx context.Context, key string, expiresAt time.Time) error
ExpiresIn(ctx context.Context, key string, ttl time.Duration) error
}
type GetEnver ¶
type GetEnver interface {
Get(key string, defaultValue any) any
GetBool(key string, defaultValue bool) bool
GetInt(key string, defaultValue int) int
GetInt32(key string, defaultValue int32) int32
GetInt64(key string, defaultValue int64) int64
GetFloat64(key string, defaultValue float64) float64
GetStringSlice(key string, defaultValue []string) []string
GetString(key string, defaultValue string) string
GetStringMapString(key string, defaultValue map[string]string) map[string]string
GetStringMapStringSlice(key string, defaultValue map[string][]string) map[string][]string
GetTime(key string, defaultValue time.Time) time.Time
}
type GetProvider ¶
type GetProvider interface {
Get(key string, defaultValue any) any
GetBool(key string, defaultValue bool) bool
GetInt(key string, defaultValue int) int
GetInt32(key string, defaultValue int32) int32
GetInt64(key string, defaultValue int64) int64
GetFloat64(key string, defaultValue float64) float64
GetStringSlice(key string, defaultValue []string) []string
GetString(key string, defaultValue string) string
GetStringMapString(key string, defaultValue map[string]string) map[string]string
GetStringMapStringSlice(key string, defaultValue map[string][]string) map[string][]string
GetTime(key string, defaultValue time.Time) time.Time
}
type Logger ¶
type Logger interface {
Debug(format string, args ...LoggerField)
Info(format string, args ...LoggerField)
Notice(format string, args ...LoggerField)
Error(format string, args ...LoggerField)
Warn(format string, args ...LoggerField)
Fatal(format string, args ...LoggerField)
}
type LoggerField ¶
type Provider ¶
type Provider interface {
GetProvider
SetProvider
}
type SetProvider ¶
Click to show internal directories.
Click to hide internal directories.