Versions in this module Expand all Collapse all v0 v0.0.2 Mar 31, 2023 Changes in this version + func NewPeers(kv kv.KV) peers.Storage + func NewSession(kv kv.KV, login bool) telegram.SessionStorage + func NewState(kv kv.KV) updates.StateStorage + type Peers struct + func (p *Peers) Find(_ 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(_ context.Context) (int64, error) + func (p *Peers) Save(_ context.Context, _key peers.Key, value peers.Value) error + func (p *Peers) SaveContactsHash(_ context.Context, hash int64) error + func (p *Peers) SavePhone(_ context.Context, phone string, _key peers.Key) error + type Session struct + func (s *Session) LoadSession(_ context.Context) ([]byte, error) + func (s *Session) StoreSession(_ context.Context, data []byte) error + type State struct + func (s *State) ForEachChannels(userID int64, f func(channelID int64, pts int) error) error + func (s *State) Get(key string, v interface{}) error + func (s *State) GetChannelPts(userID, channelID int64) (int, bool, error) + func (s *State) GetState(userID int64) (updates.State, bool, error) + func (s *State) Set(key string, v interface{}) error + func (s *State) SetChannelPts(userID, channelID int64, pts int) error + func (s *State) SetDate(userID int64, date int) error + func (s *State) SetDateSeq(userID int64, date, seq int) error + func (s *State) SetPts(userID int64, pts int) error + func (s *State) SetQts(userID int64, qts int) error + func (s *State) SetSeq(userID int64, seq int) error + func (s *State) SetState(userID int64, state updates.State) error