data

package
v0.0.0-...-5318e64 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound not found
	ErrNotFound = errors.New("not found")
)

Functions

This section is empty.

Types

type Data

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

Data 数据管理

func New

func New(cnf *config.Config) (*Data, error)

New 控制数据库和缓存

func (*Data) Close

func (d *Data) Close() error

Close 安全的关闭

func (*Data) Get

func (d *Data) Get(shorturlStr string) (string, error)

Get 获取数据

func (*Data) Set

func (d *Data) Set(raw string) (string, error)

Set 设置,如果已存在则返回原始的

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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