redis

package
v0.0.0-...-ace9e8d Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aide

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

Aide provides redis api wrapper.

func NewAide

func NewAide(config Config) *Aide

NewAide new an instance.

func (*Aide) Close

func (aide *Aide) Close() error

Close close a connection.

func (*Aide) Do

func (aide *Aide) Do(commandName string, args ...interface{}) (reply interface{}, err error)

Do execute a command.

func (*Aide) Open

func (aide *Aide) Open() error

Open open a connection.

type Config

type Config struct {
	Password string `yaml:"password"`
	Network  string `yaml:"network"`
	Server   string `yaml:"server"`
	Port     int    `yaml:"port"`
	Database int    `yaml:"database"`
}

Config represents redis config

func (*Config) Load

func (config *Config) Load(filePath string) error

Load load redis configs.

Jump to

Keyboard shortcuts

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