db

package
v0.0.0-...-6d05f87 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Del

func Del(key string) error

func Expire

func Expire(key string, expiration time.Duration) error

func Get

func Get(key string) (string, error)

for NOSQL DB

func HDel

func HDel(key, field string) error

func HGet

func HGet(key, field string) (string, error)

func HSet

func HSet(key string, values ...interface{}) error

func Query

func Query(query string, args ...interface{}) (*sql.Rows, error)

func Set

func Set(key string, value interface{}, expiration time.Duration) error

Types

type Router

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

func NewRouter

func NewRouter() (*Router, error)

func (*Router) GetMaster

func (r *Router) GetMaster() (*sql.DB, error)

func (*Router) GetSlave

func (r *Router) GetSlave() (*sql.DB, error)

Jump to

Keyboard shortcuts

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