storage

package
v0.0.0-...-1dd25dd Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager interface {
	SetToken(token string, chat int64)
	GetToken(int64) (string, error)
	SetHost(host string, chat int64)
	GetHost(chat int64) (string, error)
	SetActivity(activity string, chat int64)
	GetActivity(chat int64) (string, error)
	ResetData(chat int64) error
}

func NewStorageInstance

func NewStorageInstance(urlEnvironment string, storagePassphareKey string) (Manager, error)

type Mock

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

func NewStorageMock

func NewStorageMock() *Mock

func (*Mock) GetActivity

func (r *Mock) GetActivity(chat int64) (string, error)

func (Mock) GetHost

func (r Mock) GetHost(chat int64) (string, error)

func (Mock) GetToken

func (r Mock) GetToken(chat int64) (string, error)

func (*Mock) ResetData

func (r *Mock) ResetData(chat int64) error

func (*Mock) SetActivity

func (r *Mock) SetActivity(activity string, chat int64)

func (Mock) SetHost

func (r Mock) SetHost(host string, chat int64)

func (Mock) SetToken

func (r Mock) SetToken(token string, chat int64)

func (*Mock) StorageHost

func (r *Mock) StorageHost() map[int64]string

func (Mock) StorageToken

func (r Mock) StorageToken() map[int64]string

type RedisStorage

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

func (RedisStorage) GetActivity

func (r RedisStorage) GetActivity(chat int64) (string, error)

func (RedisStorage) GetHost

func (r RedisStorage) GetHost(chat int64) (string, error)

func (RedisStorage) GetToken

func (r RedisStorage) GetToken(chat int64) (string, error)

func (RedisStorage) ResetData

func (r RedisStorage) ResetData(chat int64) error

func (RedisStorage) SetActivity

func (r RedisStorage) SetActivity(activity string, chat int64)

func (RedisStorage) SetHost

func (r RedisStorage) SetHost(host string, chat int64)

func (RedisStorage) SetToken

func (r RedisStorage) SetToken(token string, chat int64)

Jump to

Keyboard shortcuts

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