dao

package
v0.0.0-...-7075b2f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NotExistError notExistErr = notExistErr{"target not exist"}
View Source
var RedisConnPool *redis.Pool

Functions

This section is empty.

Types

type CacheDao

type CacheDao interface {
	CreateWithExpire(data any, expire float64) error
	Query(data any) error
	Close()
}

func NewCacheDaoRedis

func NewCacheDaoRedis(conn redis.Conn) CacheDao

factory pattern

type CacheDaoRedis

type CacheDaoRedis struct {
	RedisClient redis.Conn
}

func (*CacheDaoRedis) Close

func (cli *CacheDaoRedis) Close()

func (*CacheDaoRedis) CreateWithExpire

func (cli *CacheDaoRedis) CreateWithExpire(data any, expire float64) error

func (*CacheDaoRedis) IsNotExist

func (cli *CacheDaoRedis) IsNotExist(err error) bool

func (*CacheDaoRedis) Query

func (cli *CacheDaoRedis) Query(pair any) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL