storage

package
v0.0.0-...-fc364c1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const TABLE_USERS = `` /* 185-byte string literal not displayed */

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessTokenStorage

type AccessTokenStorage interface {
	Get(chatId int64) (string, error)
	Add(chatId int64, accessToken string) error
	Delete(key int64) error
}

type Postgres

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

func NewPostgres

func NewPostgres(url string) *Postgres

func (*Postgres) Add

func (postgres *Postgres) Add(chatId int64, accessToken string) error

func (*Postgres) Delete

func (postgres *Postgres) Delete(chatId int64) error

func (*Postgres) Get

func (postgres *Postgres) Get(chatId int64) (string, error)

type StateStore

type StateStore struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewStateStore

func NewStateStore() *StateStore

func (*StateStore) Add

func (s *StateStore) Add(state string, chatId int64)

func (*StateStore) Delete

func (s *StateStore) Delete(key string)

func (*StateStore) Get

func (s *StateStore) Get(state string) (int64, error)

type Store

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

func New

func New(path string) *Store

func (*Store) Add

func (s *Store) Add(chatId int64, accessToken string) error

func (*Store) Delete

func (s *Store) Delete(chatId int64) error

func (*Store) Get

func (s *Store) Get(chatId int64) (string, error)

type User

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

Jump to

Keyboard shortcuts

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