Documentation ¶
Index ¶
- Constants
- Variables
- func AddPeer(iD, accessHash int64, peerType EntityType, userName string)
- func GetInputPeerById(iD int64) tg.InputPeerClass
- func GetInputPeerByUsername(userName string) tg.InputPeerClass
- func Load(sessionName string, inMemory bool) error
- func UpdateSession(session *Session)
- type EntityType
- type Peer
- type Session
Constants ¶
View Source
const ( DefaultUsername = "" DefaultAccessHash = 0 )
View Source
const LatestVersion = 1
Variables ¶
View Source
var SESSION *gorm.DB
Functions ¶
func AddPeer ¶
func AddPeer(iD, accessHash int64, peerType EntityType, userName string)
func GetInputPeerById ¶
func GetInputPeerById(iD int64) tg.InputPeerClass
GetInputPeerById finds the provided id in the peer storage and return its tg.InputPeerClass if found.
func GetInputPeerByUsername ¶
func GetInputPeerByUsername(userName string) tg.InputPeerClass
GetInputPeerByUsername finds the provided username in the peer storage and return its tg.InputPeerClass if found.
func UpdateSession ¶
func UpdateSession(session *Session)
Types ¶
type EntityType ¶
type EntityType int
const ( TypeUser EntityType TypeChat TypeChannel )
func (EntityType) GetInt ¶
func (e EntityType) GetInt() int
type Peer ¶
func GetPeerById ¶
GetPeerById finds the provided id in the peer storage and return it if found.
func GetPeerByUsername ¶
GetPeerByUsername finds the provided username in the peer storage and return it if found.
Click to show internal directories.
Click to hide internal directories.