cache

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: Unlicense Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	REDIS_ON   bool   `env:"REDIS_ON" envDefault:"false" json:"redis_on"`
	REDIS_HOST string `env:"REDIS_HOST" envDefault:"localhost" json:"redis_host"`
	REDIS_PORT string `env:"REDIS_PORT" envDefault:"6379" json:"redis_port"`
	REDIS_PASS string `env:"REDIS_PASS" envDefault:"" json:"redis_pass"`
}

func (*Config) Parse

func (this *Config) Parse() (err error)

type Redis

type Redis struct {
	// contains filtered or unexported fields
}

func (*Redis) Del

func (r *Redis) Del(key string) (err error)

func (*Redis) Get

func (r *Redis) Get(key string, data interface{}) (err error)

func (*Redis) Init

func (r *Redis) Init() (err error)

func (*Redis) Set

func (r *Redis) Set(key string, data_ interface{}, ttl time.Duration) (err error)

Jump to

Keyboard shortcuts

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