state

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MapRepository

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

func CreateMapRepository

func CreateMapRepository() MapRepository

func (MapRepository) LoadState

func (this MapRepository) LoadState(chat_id int64) (string, error)

func (MapRepository) SaveState

func (this MapRepository) SaveState(chat_id int64, state string) error

type RedisStateRepostory added in v0.4.0

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

func (RedisStateRepostory) LoadState added in v0.4.0

func (this RedisStateRepostory) LoadState(chat_id int64) (result string, err error)

func (RedisStateRepostory) SaveState added in v0.4.0

func (this RedisStateRepostory) SaveState(chat_id int64, state string) error

type StateRepository

type StateRepository interface {
	SaveState(chat_id int64, state string) error
	LoadState(chat_id int64) (string, error)
}

func CreateRedisStateRepostory added in v0.4.0

func CreateRedisStateRepostory(client *redis.Client) StateRepository

Jump to

Keyboard shortcuts

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