Documentation ¶
Index ¶
- Constants
- Variables
- func Bool(i interface{}) bool
- func Bytes(i interface{}) []byte
- func Float32(i interface{}) float32
- func Float64(i interface{}) float64
- func GetBool(i interface{}) (bool, error)
- func GetBoolDefault(i interface{}, def bool) bool
- func GetBytes(i interface{}) ([]byte, error)
- func GetBytesDefault(i interface{}, def []byte) []byte
- func GetFloat32(i interface{}) (float32, error)
- func GetFloat32Default(i interface{}, def float32) float32
- func GetFloat64(i interface{}) (float64, error)
- func GetFloat64Default(i interface{}, def float64) float64
- func GetInt(i interface{}) (int, error)
- func GetInt64(i interface{}) (int64, error)
- func GetInt64Default(i interface{}, def int64) int64
- func GetIntDefault(i interface{}, def int) int
- func GetJSON(i interface{}, to interface{}) ([]byte, error)
- func GetString(i interface{}) (string, error)
- func GetStringDefault(i interface{}, def string) string
- func GetTime(i interface{}) (time.Time, error)
- func GetTimeDefault(i interface{}, def time.Time) time.Time
- func Int(i interface{}) int
- func Int64(i interface{}) int64
- func String(i interface{}) string
- func Time(i interface{}) time.Time
- type Get
- func (getter Get) Bool(ctx context.Context, key string) bool
- func (getter Get) Bytes(ctx context.Context, key string) []byte
- func (getter Get) Float32(ctx context.Context, key string) float32
- func (getter Get) Float64(ctx context.Context, key string) float64
- func (getter Get) Get(ctx context.Context, key string) (interface{}, error)
- func (getter Get) GetBool(ctx context.Context, key string) (bool, error)
- func (getter Get) GetBoolDefault(ctx context.Context, key string, def bool) bool
- func (getter Get) GetBytes(ctx context.Context, key string) ([]byte, error)
- func (getter Get) GetFloat32(ctx context.Context, key string) (float32, error)
- func (getter Get) GetFloat32Default(ctx context.Context, key string, def float32) float32
- func (getter Get) GetFloat64(ctx context.Context, key string) (float64, error)
- func (getter Get) GetFloat64Default(ctx context.Context, key string, def float64) float64
- func (getter Get) GetInt(ctx context.Context, key string) (int, error)
- func (getter Get) GetInt64(ctx context.Context, key string) (int64, error)
- func (getter Get) GetInt64Default(ctx context.Context, key string, def int64) int64
- func (getter Get) GetIntDefault(ctx context.Context, key string, def int) int
- func (getter Get) GetJSON(ctx context.Context, key string, to interface{}) ([]byte, error)
- func (getter Get) GetString(ctx context.Context, key string) (string, error)
- func (getter Get) GetStringDefault(ctx context.Context, key string, def string) string
- func (getter Get) GetTime(ctx context.Context, key string) (time.Time, error)
- func (getter Get) GetTimeDefault(ctx context.Context, key string, def time.Time) time.Time
- func (getter Get) Int(ctx context.Context, key string) int
- func (getter Get) Int64(ctx context.Context, key string) int64
- func (getter Get) String(ctx context.Context, key string) string
- func (getter Get) Time(ctx context.Context, key string) time.Time
Constants ¶
View Source
const RedisTimeFormat = "2006-01-02T15:04:05.9999999+07:00"
Variables ¶
View Source
var ErrType = errors.New("the cache item can not convert to the spec type")
Functions ¶
func GetBoolDefault ¶
func GetBytesDefault ¶
func GetFloat32 ¶
func GetFloat32Default ¶
func GetFloat64 ¶
func GetFloat64Default ¶
func GetInt64Default ¶
func GetIntDefault ¶
func GetStringDefault ¶
Types ¶
type Get ¶
func (Get) GetBoolDefault ¶
func (Get) GetFloat32 ¶
func (Get) GetFloat32Default ¶
func (Get) GetFloat64 ¶
func (Get) GetFloat64Default ¶
func (Get) GetInt64Default ¶
func (Get) GetIntDefault ¶
func (Get) GetStringDefault ¶
func (Get) GetTimeDefault ¶
Click to show internal directories.
Click to hide internal directories.