Documentation
¶
Overview ¶
Package gsr is the Go standards recommendations interface definitions.
Source code and other details for the project are available at GitHub:
https://github.com/gookit/gsr
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CodedCacher ¶ added in v0.0.4
type CodedCacher interface { SimpleCacher // GetAs get and decode cache value to object ptr GetAs(key string, ptr interface{}) error }
CodedCacher interface.
type Logger ¶
type Logger interface { StdLogger Debug(v ...interface{}) Debugf(format string, v ...interface{}) Info(v ...interface{}) Infof(format string, v ...interface{}) Warn(v ...interface{}) Warnf(format string, v ...interface{}) Error(v ...interface{}) Errorf(format string, v ...interface{}) }
Logger interface definition
type Marshaler ¶ added in v0.0.3
type Marshaler interface { Marshal(v interface{}) ([]byte, error) Unmarshal(data []byte, ptr interface{}) error }
Marshaler interface for Marshal/Unmarshal data
type Printer ¶
type Printer interface { Print(v ...interface{}) Printf(format string, v ...interface{}) Println(v ...interface{}) }
Printer interface definition
type SimpleCacher ¶ added in v0.0.2
type SimpleCacher interface { // Closer close cache handle io.Closer // Clear clear all caches Clear() error // Has basic operation Has(key string) bool Del(key string) error Get(key string) interface{} Set(key string, val interface{}, ttl time.Duration) error // GetMulti multi operation GetMulti(keys []string) map[string]interface{} SetMulti(values map[string]interface{}, ttl time.Duration) error DelMulti(keys []string) error }
SimpleCacher interface definition
Click to show internal directories.
Click to hide internal directories.