storage

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PrefixKey = "__host"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AdapterCache

type AdapterCache interface {
	String() string
	Get(key string) (string, error)
	Set(key string, val interface{}, expire int) error
	Del(key string) error
	HashGet(hk, key string) (string, error)
	HashDel(hk, key string) error
	Increase(key string) error
	Decrease(key string) error
	Expire(key string, dur time.Duration) error
	HashSet(key string, values ...interface{}) error
	HashMSet(key string, values ...interface{}) error
	Exists(key string) (int64, error)
	HashGetAll(key string) (map[string]string, error)
}

type AdapterLocker

type AdapterLocker interface {
	String() string
	Lock(key string, ttl int64, options *redislock.Options) (*redislock.Lock, error)
}

type AdapterOss added in v1.0.9

type AdapterOss interface {
	UpLoad(objectName, localFile string) (string, error)
	GetCredential() (*sts.CredentialResult, error)
	GetPresignedURL(objectName string) (string, error)
	GetSignedFileUrl(dir string, isSign bool) ([]string, []string, error)
	DownloadFiles(fileObject []string, localDir string) error
}

type AdapterQueue

type AdapterQueue interface {
	String() string
	Append(message Messager) error
	Register(name string, f ConsumerFunc)
	Run()
	Shutdown()
}

type AdapterSms added in v1.0.9

type AdapterSms interface {
	SendSms(string, string) error
}

type ConsumerFunc

type ConsumerFunc func(Messager) error

type Messager

type Messager interface {
	SetID(string)
	SetStream(string)
	SetValues(map[string]interface{})
	GetID() string
	GetStream() string
	GetValues() map[string]interface{}
	GetPrefix() string
	SetPrefix(string)
	SetErrorCount(count int)
	GetErrorCount() int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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