Versions in this module Expand all Collapse all v0 v0.9.0 May 25, 2017 Changes in this version + type Addr struct + IP string + Port int + func (o *Addr) Endpoint() string + func (o *Addr) Read(r *tl.Reader, ver int) + func (o *Addr) Write(w *tl.Writer) + type Chat struct + AccessHash uint64 + ID int + Messages *MessageList + Title string + Type ChatType + User *User + Username string + func (chat *Chat) TitleOrName() string + type ChatType int + const ChannelChat + const ChatChat + const UserChat + type Conn struct + func New(options Options, state *State, delegate Delegate) *Conn + func (c *Conn) CompleteLoginWith2FAPassword(password []byte) error + func (c *Conn) CompleteLoginWithCode(code string) error + func (c *Conn) Fail(err error) + func (c *Conn) HandleUnknownReply(r tl.Object) error + func (c *Conn) LoadChats(contacts *ContactList) error + func (c *Conn) LoadHistory(contacts *ContactList, chat *Chat, limit int) error + func (c *Conn) LoginState() LoginState + func (c *Conn) Run() error + func (c *Conn) Send(o tl.Object) (tl.Object, error) + func (c *Conn) Shutdown() + func (c *Conn) StartLogin(phoneNumber string) error + func (c *Conn) SwitchToDC(dc int) + type ContactList struct + ChannelChats map[int]*Chat + ChatChats map[int]*Chat + Chats []*Chat + Self *User + SelfChat *Chat + UserChats map[int]*Chat + Users map[int]*User + func NewContactList() *ContactList + func (contacts *ContactList) FindChatByPeer(peer mtproto.TLPeerType) *Chat + type DCState struct + Auth mtproto.AuthResult + FramerState mtproto.FramerState + ID int + PrimaryAddr Addr + func (o *DCState) Clone() *DCState + func (o *DCState) Read(r *tl.Reader, ver int) + func (o *DCState) Write(w *tl.Writer) + type Delegate interface + HandleConnectionReady func() + HandleStateChanged func(newState *State) + type LoginState int + const LoggedIn + const LoggedOut + const WaitingFor2FA + const WaitingForCode + type Message struct + Date time.Time + EditDate time.Time + From *User + FwdChannel *Chat + FwdDate time.Time + FwdFrom *User + ID int + ReplyTo *Message + ReplyToID int + Text string + Type MessageType + type MessageList struct + Messages []*Message + MessagesByID map[int]*Message + MinKnownID int + TopMessage *Message + type MessageType int + const NormalMessage + type Options struct + APIHash string + APIID int + PublicKey string + SeedAddr Addr + Verbose int + type State struct + DCs map[int]*DCState + FirstName string + LastName string + LoginState LoginState + PhoneCodeHash string + PhoneNumber string + PreferredDC int + UserID int + Username string + func (o *State) Clone() *State + func (o *State) Cmd() uint32 + func (o *State) ReadBareFrom(r *tl.Reader) + func (o *State) WriteBareTo(w *tl.Writer) + type User struct + FirstName string + ID int + LastName string + Username string + func (user *User) Name() string