Documentation ¶
Index ¶
- Variables
- func NewPeers(kv Storage) peers.Storage
- func NewSession(kv Storage, login bool) telegram.SessionStorage
- func NewState(kv Storage) updates.StateStorage
- type Peers
- func (p *Peers) Find(ctx context.Context, key peers.Key) (peers.Value, bool, error)
- func (p *Peers) FindPhone(ctx context.Context, phone string) (peers.Key, peers.Value, bool, error)
- func (p *Peers) GetContactsHash(ctx context.Context) (int64, error)
- func (p *Peers) Save(ctx context.Context, key peers.Key, value peers.Value) error
- func (p *Peers) SaveContactsHash(ctx context.Context, hash int64) error
- func (p *Peers) SavePhone(ctx context.Context, phone string, _key peers.Key) error
- type Session
- type State
- func (s *State) ForEachChannels(ctx context.Context, userID int64, ...) error
- func (s *State) Get(ctx context.Context, key string, v interface{}) error
- func (s *State) GetChannelPts(ctx context.Context, userID, channelID int64) (int, bool, error)
- func (s *State) GetState(ctx context.Context, userID int64) (updates.State, bool, error)
- func (s *State) Set(ctx context.Context, key string, v interface{}) error
- func (s *State) SetChannelPts(ctx context.Context, userID, channelID int64, pts int) error
- func (s *State) SetDate(ctx context.Context, userID int64, date int) error
- func (s *State) SetDateSeq(ctx context.Context, userID int64, date, seq int) error
- func (s *State) SetPts(ctx context.Context, userID int64, pts int) error
- func (s *State) SetQts(ctx context.Context, userID int64, qts int) error
- func (s *State) SetSeq(ctx context.Context, userID int64, seq int) error
- func (s *State) SetState(ctx context.Context, userID int64, state updates.State) error
- type Storage
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("key not found")
Functions ¶
func NewSession ¶
func NewSession(kv Storage, login bool) telegram.SessionStorage
func NewState ¶
func NewState(kv Storage) updates.StateStorage
Types ¶
type Peers ¶
type Peers struct {
// contains filtered or unexported fields
}
func (*Peers) SaveContactsHash ¶
type State ¶
type State struct {
// contains filtered or unexported fields
}
func (*State) ForEachChannels ¶
func (*State) GetChannelPts ¶
func (*State) SetChannelPts ¶
func (*State) SetDateSeq ¶
Click to show internal directories.
Click to hide internal directories.