state

package
v0.0.0-...-56c79ff Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDummyState

func NewDummyState() *dummyState

Types

type RedisState

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

func NewRedisState

func NewRedisState(
	rdb *redis.Client,
	ctx context.Context,
) RedisState

func (*RedisState) UpdateUserData

func (rs *RedisState) UpdateUserData(userID int, newData UserDataStruct) error

func (*RedisState) UserData

func (rs *RedisState) UserData(userId int) (UserDataStruct, error)

type State

type State interface {
	UserData(userId int) (UserDataStruct, error)
	UpdateUserData(userID int, newData UserDataStruct) error
}

type UserDataStruct

type UserDataStruct struct {
	Location tb.Location
}

Jump to

Keyboard shortcuts

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