Documentation ¶
Index ¶
- Variables
- type Session
- func (s *Session) AddContact(teamUid string, phone string) (tdproto.Contact, error)
- func (s *Session) AddGroupMember(teamUid string, group, contact tdproto.JID) (tdproto.GroupMembership, error)
- func (s *Session) AuthByPasswordGetToken(username, password string) (tdapi.Auth, error)
- func (s *Session) AuthBySmsGetToken(phone, code string) (tdapi.Auth, error)
- func (s *Session) AuthBySmsSendCode(phone string) (tdapi.SmsCode, error)
- func (s *Session) CloseTask(teamUid, taskUid string) (tdproto.Chat, error)
- func (s *Session) Contacts(teamUid string) ([]tdproto.Contact, error)
- func (s *Session) CreateGroup(teamUid string, req tdapi.Group) (tdproto.Chat, error)
- func (s *Session) CreateTask(teamUid string, req tdapi.Task) (tdproto.Chat, error)
- func (s *Session) DeleteMessage(teamUid string, chat tdproto.JID, msgId string) (tdproto.ChatMessages, error)
- func (s *Session) DropGroup(teamUid string, group tdproto.JID) error
- func (s *Session) DropGroupMember(teamUid string, group, contact tdproto.JID) error
- func (s *Session) Features() (*tdproto.Features, error)
- func (s *Session) GetChats(teamUid string, f *tdapi.ChatFilter) ([]tdproto.Chat, error)
- func (s *Session) GetGroups(teamUid string) ([]tdproto.Chat, error)
- func (s *Session) GetMessages(teamUid string, chat tdproto.JID, f *tdapi.MessageFilter) ([]tdproto.Message, error)
- func (s *Session) GroupMembers(teamUid string, group tdproto.JID) ([]tdproto.GroupMembership, error)
- func (s *Session) Me(teamUid string) (tdproto.Contact, error)
- func (s *Session) Ping() error
- func (s *Session) SendPlaintextMessage(teamUid string, chat tdproto.JID, text string) (tdproto.Message, error)
- func (s *Session) SendUploadMessage(teamUid string, chat tdproto.JID, fname string, file io.ReadCloser) (tdproto.Message, error)
- func (s *Session) SetCookie(v string)
- func (s *Session) SetToken(v string)
- func (s *Session) Ws(team string) (*WsSession, error)
- type WsSession
- func (w *WsSession) Close() error
- func (w *WsSession) DeleteMessage(uid string) error
- func (w *WsSession) ForeachData(eventName string, interfaceHandler func(chan []byte, chan error)) error
- func (w *WsSession) ForeachMessage(messageHandler func(chan tdproto.Message, chan error)) error
- func (w *WsSession) Ping() string
- func (w *WsSession) SendCallLeave(jid tdproto.JID)
- func (w *WsSession) SendCallOffer(jid tdproto.JID, sdp string)
- func (w *WsSession) SendEvent(event tdproto.Event) error
- func (w *WsSession) SendPlainMessage(to tdproto.JID, text string) string
- func (w *WsSession) SendRaw(b []byte) error
- func (w *WsSession) Start() error
- func (w *WsSession) StopListeners()
- func (w *WsSession) WaitFor(v tdproto.Event) error
- func (w *WsSession) WaitForConfirm() (string, error)
- func (w *WsSession) WaitForMessage() (tdproto.Message, bool, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var InvalidTeamUid = errors.New("invalid team uid")
View Source
var (
Timeout = errors.New("Timeout")
)
Functions ¶
This section is empty.
Types ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func NewSession ¶
func (*Session) AddContact ¶ added in v0.2.2
func (*Session) AddGroupMember ¶ added in v0.2.6
func (*Session) AuthByPasswordGetToken ¶ added in v0.2.0
func (*Session) AuthBySmsGetToken ¶ added in v0.2.0
func (*Session) AuthBySmsSendCode ¶ added in v0.2.0
func (*Session) CreateGroup ¶ added in v0.3.1
func (*Session) CreateTask ¶ added in v0.2.6
func (*Session) DeleteMessage ¶ added in v0.5.0
func (*Session) DropGroupMember ¶ added in v0.3.0
func (*Session) GetMessages ¶ added in v0.5.0
func (*Session) GroupMembers ¶ added in v0.3.0
func (*Session) SendPlaintextMessage ¶ added in v0.2.4
func (*Session) SendUploadMessage ¶ added in v0.7.1
type WsSession ¶ added in v0.1.4
type WsSession struct {
// contains filtered or unexported fields
}
func (*WsSession) DeleteMessage ¶ added in v0.1.4
func (*WsSession) ForeachData ¶ added in v0.7.0
func (*WsSession) ForeachMessage ¶ added in v0.7.0
func (*WsSession) SendCallLeave ¶ added in v0.6.2
func (*WsSession) SendCallOffer ¶ added in v0.6.2
func (*WsSession) SendPlainMessage ¶ added in v0.1.4
func (*WsSession) StopListeners ¶ added in v0.7.0
func (w *WsSession) StopListeners()
func (*WsSession) WaitForConfirm ¶ added in v0.1.4
Click to show internal directories.
Click to hide internal directories.