Documentation ¶
Index ¶
- type Driver
- type Gach
- func (g *Gach[T1, T2]) Close() error
- func (g *Gach[T1, T2]) Delete(key string) error
- func (g *Gach[T1, T2]) Exists(key string) (bool, error)
- func (g *Gach[T1, T2]) Expire(key string, seconds int) error
- func (g *Gach[T1, T2]) Flush() error
- func (g *Gach[T1, T2]) Get(key string) (interface{}, error)
- func (g *Gach[T1, T2]) GetConfig() T2
- func (g *Gach[T1, T2]) GetConfigType() ports.ConfigType
- func (g *Gach[T1, T2]) GetDriver() T1
- func (g *Gach[T1, T2]) GetDriverType() ports.DriverType
- func (g *Gach[T1, T2]) Ping() error
- func (g *Gach[T1, T2]) Set(key string, value interface{}) error
- func (g *Gach[T1, T2]) SetConfig(config T2)
- func (g *Gach[T1, T2]) SetDriver(driver T1)
- func (g *Gach[T1, T2]) TTL(key string) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
type Driver[T1 ports.DriverType, T2 ports.ConfigType] struct { Config T2 // contains filtered or unexported fields }
type Gach ¶
type Gach[T1 ports.DriverType, T2 ports.ConfigType] struct { Driver Driver[T1, T2] }
func Connect ¶
func Connect[T1 ports.DriverType, T2 ports.ConfigType](driver Driver[T1, T2]) *Gach[T1, T2]
func (*Gach[T1, T2]) GetConfigType ¶
func (g *Gach[T1, T2]) GetConfigType() ports.ConfigType
func (*Gach[T1, T2]) GetDriverType ¶
func (g *Gach[T1, T2]) GetDriverType() ports.DriverType
Click to show internal directories.
Click to hide internal directories.