Documentation ¶
Overview ¶
Package messages contains message iteration helper.
Index ¶
- type Elem
- type File
- type GetHistoryQueryBuilder
- func (b *GetHistoryQueryBuilder) BatchSize(batchSize int) *GetHistoryQueryBuilder
- func (b *GetHistoryQueryBuilder) Collect(ctx context.Context) ([]Elem, error)
- func (b *GetHistoryQueryBuilder) Count(ctx context.Context) (int, error)
- func (b *GetHistoryQueryBuilder) ForEach(ctx context.Context, cb func(context.Context, Elem) error) error
- func (b *GetHistoryQueryBuilder) Iter() *Iterator
- func (b *GetHistoryQueryBuilder) OffsetDate(offsetDate int) *GetHistoryQueryBuilder
- func (b *GetHistoryQueryBuilder) OffsetID(offsetID int) *GetHistoryQueryBuilder
- func (b *GetHistoryQueryBuilder) Peer(paramPeer tg.InputPeerClass) *GetHistoryQueryBuilder
- func (b *GetHistoryQueryBuilder) Query(ctx context.Context, req Request) (tg.MessagesMessagesClass, error)
- type GetRecentLocationsQueryBuilder
- func (b *GetRecentLocationsQueryBuilder) BatchSize(batchSize int) *GetRecentLocationsQueryBuilder
- func (b *GetRecentLocationsQueryBuilder) Collect(ctx context.Context) ([]Elem, error)
- func (b *GetRecentLocationsQueryBuilder) Count(ctx context.Context) (int, error)
- func (b *GetRecentLocationsQueryBuilder) ForEach(ctx context.Context, cb func(context.Context, Elem) error) error
- func (b *GetRecentLocationsQueryBuilder) Iter() *Iterator
- func (b *GetRecentLocationsQueryBuilder) Peer(paramPeer tg.InputPeerClass) *GetRecentLocationsQueryBuilder
- func (b *GetRecentLocationsQueryBuilder) Query(ctx context.Context, req Request) (tg.MessagesMessagesClass, error)
- type GetRepliesQueryBuilder
- func (b *GetRepliesQueryBuilder) BatchSize(batchSize int) *GetRepliesQueryBuilder
- func (b *GetRepliesQueryBuilder) Collect(ctx context.Context) ([]Elem, error)
- func (b *GetRepliesQueryBuilder) Count(ctx context.Context) (int, error)
- func (b *GetRepliesQueryBuilder) ForEach(ctx context.Context, cb func(context.Context, Elem) error) error
- func (b *GetRepliesQueryBuilder) Iter() *Iterator
- func (b *GetRepliesQueryBuilder) MsgID(paramMsgID int) *GetRepliesQueryBuilder
- func (b *GetRepliesQueryBuilder) OffsetDate(offsetDate int) *GetRepliesQueryBuilder
- func (b *GetRepliesQueryBuilder) OffsetID(offsetID int) *GetRepliesQueryBuilder
- func (b *GetRepliesQueryBuilder) Peer(paramPeer tg.InputPeerClass) *GetRepliesQueryBuilder
- func (b *GetRepliesQueryBuilder) Query(ctx context.Context, req Request) (tg.MessagesMessagesClass, error)
- type GetUnreadMentionsQueryBuilder
- func (b *GetUnreadMentionsQueryBuilder) BatchSize(batchSize int) *GetUnreadMentionsQueryBuilder
- func (b *GetUnreadMentionsQueryBuilder) Collect(ctx context.Context) ([]Elem, error)
- func (b *GetUnreadMentionsQueryBuilder) Count(ctx context.Context) (int, error)
- func (b *GetUnreadMentionsQueryBuilder) ForEach(ctx context.Context, cb func(context.Context, Elem) error) error
- func (b *GetUnreadMentionsQueryBuilder) Iter() *Iterator
- func (b *GetUnreadMentionsQueryBuilder) OffsetID(offsetID int) *GetUnreadMentionsQueryBuilder
- func (b *GetUnreadMentionsQueryBuilder) Peer(paramPeer tg.InputPeerClass) *GetUnreadMentionsQueryBuilder
- func (b *GetUnreadMentionsQueryBuilder) Query(ctx context.Context, req Request) (tg.MessagesMessagesClass, error)
- func (b *GetUnreadMentionsQueryBuilder) TopMsgID(paramTopMsgID int) *GetUnreadMentionsQueryBuilder
- type GetUnreadReactionsQueryBuilder
- func (b *GetUnreadReactionsQueryBuilder) BatchSize(batchSize int) *GetUnreadReactionsQueryBuilder
- func (b *GetUnreadReactionsQueryBuilder) Collect(ctx context.Context) ([]Elem, error)
- func (b *GetUnreadReactionsQueryBuilder) Count(ctx context.Context) (int, error)
- func (b *GetUnreadReactionsQueryBuilder) ForEach(ctx context.Context, cb func(context.Context, Elem) error) error
- func (b *GetUnreadReactionsQueryBuilder) Iter() *Iterator
- func (b *GetUnreadReactionsQueryBuilder) OffsetID(offsetID int) *GetUnreadReactionsQueryBuilder
- func (b *GetUnreadReactionsQueryBuilder) Peer(paramPeer tg.InputPeerClass) *GetUnreadReactionsQueryBuilder
- func (b *GetUnreadReactionsQueryBuilder) Query(ctx context.Context, req Request) (tg.MessagesMessagesClass, error)
- func (b *GetUnreadReactionsQueryBuilder) TopMsgID(paramTopMsgID int) *GetUnreadReactionsQueryBuilder
- type Iterator
- func (m *Iterator) Err() error
- func (m *Iterator) FetchTotal(ctx context.Context) (int, error)
- func (m *Iterator) Next(ctx context.Context) bool
- func (m *Iterator) OffsetDate(offsetDate int) *Iterator
- func (m *Iterator) OffsetID(offsetID int) *Iterator
- func (m *Iterator) OffsetPeer(offsetPeer tg.InputPeerClass) *Iterator
- func (m *Iterator) OffsetRate(offsetRate int) *Iterator
- func (m *Iterator) Total(ctx context.Context) (int, error)
- func (m *Iterator) Value() Elem
- type Query
- type QueryBuilder
- func (q *QueryBuilder) GetHistory(paramPeer tg.InputPeerClass) *GetHistoryQueryBuilder
- func (q *QueryBuilder) GetRecentLocations(paramPeer tg.InputPeerClass) *GetRecentLocationsQueryBuilder
- func (q *QueryBuilder) GetReplies(paramPeer tg.InputPeerClass) *GetRepliesQueryBuilder
- func (q *QueryBuilder) GetUnreadMentions(paramPeer tg.InputPeerClass) *GetUnreadMentionsQueryBuilder
- func (q *QueryBuilder) GetUnreadReactions(paramPeer tg.InputPeerClass) *GetUnreadReactionsQueryBuilder
- func (q *QueryBuilder) Search(paramPeer tg.InputPeerClass) *SearchQueryBuilder
- func (q *QueryBuilder) SearchGlobal() *SearchGlobalQueryBuilder
- func (q *QueryBuilder) SearchSentMedia() *SearchSentMediaQueryBuilder
- func (q *QueryBuilder) StatsGetMessagePublicForwards(paramChannel tg.InputChannelClass) *StatsGetMessagePublicForwardsQueryBuilder
- type QueryFunc
- type Request
- type SearchGlobalQueryBuilder
- func (b *SearchGlobalQueryBuilder) BatchSize(batchSize int) *SearchGlobalQueryBuilder
- func (b *SearchGlobalQueryBuilder) ChatPhotos() *SearchGlobalQueryBuilder
- func (b *SearchGlobalQueryBuilder) Collect(ctx context.Context) ([]Elem, error)
- func (b *SearchGlobalQueryBuilder) Contacts() *SearchGlobalQueryBuilder
- func (b *SearchGlobalQueryBuilder) Count(ctx context.Context) (int, error)
- func (b *SearchGlobalQueryBuilder) Document() *SearchGlobalQueryBuilder
- func (b *SearchGlobalQueryBuilder) Filter(paramFilter tg.MessagesFilterClass) *SearchGlobalQueryBuilder
- func (b *SearchGlobalQueryBuilder) FolderID(paramFolderID int) *SearchGlobalQueryBuilder
- func (b *SearchGlobalQueryBuilder) ForEach(ctx context.Context, cb func(context.Context, Elem) error) error
- func (b *SearchGlobalQueryBuilder) Geo() *SearchGlobalQueryBuilder
- func (b *SearchGlobalQueryBuilder) Gif() *SearchGlobalQueryBuilder
- func (b *SearchGlobalQueryBuilder) Iter() *Iterator
- func (b *SearchGlobalQueryBuilder) MaxDate(paramMaxDate int) *SearchGlobalQueryBuilder
- func (b *SearchGlobalQueryBuilder) MinDate(paramMinDate int) *SearchGlobalQueryBuilder
- func (b *SearchGlobalQueryBuilder) Music() *SearchGlobalQueryBuilder
- func (b *SearchGlobalQueryBuilder) MyMentions() *SearchGlobalQueryBuilder
- func (b *SearchGlobalQueryBuilder) OffsetID(offsetID int) *SearchGlobalQueryBuilder
- func (b *SearchGlobalQueryBuilder) PhoneCalls(paramMissed bool) *SearchGlobalQueryBuilder
- func (b *SearchGlobalQueryBuilder) PhotoVideo() *SearchGlobalQueryBuilder
- func (b *SearchGlobalQueryBuilder) Photos() *SearchGlobalQueryBuilder
- func (b *SearchGlobalQueryBuilder) Pinned() *SearchGlobalQueryBuilder
- func (b *SearchGlobalQueryBuilder) Q(paramQ string) *SearchGlobalQueryBuilder
- func (b *SearchGlobalQueryBuilder) Query(ctx context.Context, req Request) (tg.MessagesMessagesClass, error)
- func (b *SearchGlobalQueryBuilder) RoundVideo() *SearchGlobalQueryBuilder
- func (b *SearchGlobalQueryBuilder) RoundVoice() *SearchGlobalQueryBuilder
- func (b *SearchGlobalQueryBuilder) URL() *SearchGlobalQueryBuilder
- func (b *SearchGlobalQueryBuilder) Video() *SearchGlobalQueryBuilder
- func (b *SearchGlobalQueryBuilder) Voice() *SearchGlobalQueryBuilder
- type SearchQueryBuilder
- func (b *SearchQueryBuilder) BatchSize(batchSize int) *SearchQueryBuilder
- func (b *SearchQueryBuilder) ChatPhotos() *SearchQueryBuilder
- func (b *SearchQueryBuilder) Collect(ctx context.Context) ([]Elem, error)
- func (b *SearchQueryBuilder) Contacts() *SearchQueryBuilder
- func (b *SearchQueryBuilder) Count(ctx context.Context) (int, error)
- func (b *SearchQueryBuilder) Document() *SearchQueryBuilder
- func (b *SearchQueryBuilder) Filter(paramFilter tg.MessagesFilterClass) *SearchQueryBuilder
- func (b *SearchQueryBuilder) ForEach(ctx context.Context, cb func(context.Context, Elem) error) error
- func (b *SearchQueryBuilder) FromID(paramFromID tg.InputPeerClass) *SearchQueryBuilder
- func (b *SearchQueryBuilder) Geo() *SearchQueryBuilder
- func (b *SearchQueryBuilder) Gif() *SearchQueryBuilder
- func (b *SearchQueryBuilder) Iter() *Iterator
- func (b *SearchQueryBuilder) MaxDate(paramMaxDate int) *SearchQueryBuilder
- func (b *SearchQueryBuilder) MinDate(paramMinDate int) *SearchQueryBuilder
- func (b *SearchQueryBuilder) Music() *SearchQueryBuilder
- func (b *SearchQueryBuilder) MyMentions() *SearchQueryBuilder
- func (b *SearchQueryBuilder) OffsetID(offsetID int) *SearchQueryBuilder
- func (b *SearchQueryBuilder) Peer(paramPeer tg.InputPeerClass) *SearchQueryBuilder
- func (b *SearchQueryBuilder) PhoneCalls(paramMissed bool) *SearchQueryBuilder
- func (b *SearchQueryBuilder) PhotoVideo() *SearchQueryBuilder
- func (b *SearchQueryBuilder) Photos() *SearchQueryBuilder
- func (b *SearchQueryBuilder) Pinned() *SearchQueryBuilder
- func (b *SearchQueryBuilder) Q(paramQ string) *SearchQueryBuilder
- func (b *SearchQueryBuilder) Query(ctx context.Context, req Request) (tg.MessagesMessagesClass, error)
- func (b *SearchQueryBuilder) RoundVideo() *SearchQueryBuilder
- func (b *SearchQueryBuilder) RoundVoice() *SearchQueryBuilder
- func (b *SearchQueryBuilder) TopMsgID(paramTopMsgID int) *SearchQueryBuilder
- func (b *SearchQueryBuilder) URL() *SearchQueryBuilder
- func (b *SearchQueryBuilder) Video() *SearchQueryBuilder
- func (b *SearchQueryBuilder) Voice() *SearchQueryBuilder
- type SearchSentMediaQueryBuilder
- func (b *SearchSentMediaQueryBuilder) BatchSize(batchSize int) *SearchSentMediaQueryBuilder
- func (b *SearchSentMediaQueryBuilder) ChatPhotos() *SearchSentMediaQueryBuilder
- func (b *SearchSentMediaQueryBuilder) Collect(ctx context.Context) ([]Elem, error)
- func (b *SearchSentMediaQueryBuilder) Contacts() *SearchSentMediaQueryBuilder
- func (b *SearchSentMediaQueryBuilder) Count(ctx context.Context) (int, error)
- func (b *SearchSentMediaQueryBuilder) Document() *SearchSentMediaQueryBuilder
- func (b *SearchSentMediaQueryBuilder) Filter(paramFilter tg.MessagesFilterClass) *SearchSentMediaQueryBuilder
- func (b *SearchSentMediaQueryBuilder) ForEach(ctx context.Context, cb func(context.Context, Elem) error) error
- func (b *SearchSentMediaQueryBuilder) Geo() *SearchSentMediaQueryBuilder
- func (b *SearchSentMediaQueryBuilder) Gif() *SearchSentMediaQueryBuilder
- func (b *SearchSentMediaQueryBuilder) Iter() *Iterator
- func (b *SearchSentMediaQueryBuilder) Music() *SearchSentMediaQueryBuilder
- func (b *SearchSentMediaQueryBuilder) MyMentions() *SearchSentMediaQueryBuilder
- func (b *SearchSentMediaQueryBuilder) PhoneCalls(paramMissed bool) *SearchSentMediaQueryBuilder
- func (b *SearchSentMediaQueryBuilder) PhotoVideo() *SearchSentMediaQueryBuilder
- func (b *SearchSentMediaQueryBuilder) Photos() *SearchSentMediaQueryBuilder
- func (b *SearchSentMediaQueryBuilder) Pinned() *SearchSentMediaQueryBuilder
- func (b *SearchSentMediaQueryBuilder) Q(paramQ string) *SearchSentMediaQueryBuilder
- func (b *SearchSentMediaQueryBuilder) Query(ctx context.Context, req Request) (tg.MessagesMessagesClass, error)
- func (b *SearchSentMediaQueryBuilder) RoundVideo() *SearchSentMediaQueryBuilder
- func (b *SearchSentMediaQueryBuilder) RoundVoice() *SearchSentMediaQueryBuilder
- func (b *SearchSentMediaQueryBuilder) URL() *SearchSentMediaQueryBuilder
- func (b *SearchSentMediaQueryBuilder) Video() *SearchSentMediaQueryBuilder
- func (b *SearchSentMediaQueryBuilder) Voice() *SearchSentMediaQueryBuilder
- type StatsGetMessagePublicForwardsQueryBuilder
- func (b *StatsGetMessagePublicForwardsQueryBuilder) BatchSize(batchSize int) *StatsGetMessagePublicForwardsQueryBuilder
- func (b *StatsGetMessagePublicForwardsQueryBuilder) Channel(paramChannel tg.InputChannelClass) *StatsGetMessagePublicForwardsQueryBuilder
- func (b *StatsGetMessagePublicForwardsQueryBuilder) Collect(ctx context.Context) ([]Elem, error)
- func (b *StatsGetMessagePublicForwardsQueryBuilder) Count(ctx context.Context) (int, error)
- func (b *StatsGetMessagePublicForwardsQueryBuilder) ForEach(ctx context.Context, cb func(context.Context, Elem) error) error
- func (b *StatsGetMessagePublicForwardsQueryBuilder) Iter() *Iterator
- func (b *StatsGetMessagePublicForwardsQueryBuilder) MsgID(paramMsgID int) *StatsGetMessagePublicForwardsQueryBuilder
- func (b *StatsGetMessagePublicForwardsQueryBuilder) OffsetID(offsetID int) *StatsGetMessagePublicForwardsQueryBuilder
- func (b *StatsGetMessagePublicForwardsQueryBuilder) Query(ctx context.Context, req Request) (tg.MessagesMessagesClass, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Elem ¶
type Elem struct { Msg tg.NotEmptyMessage Peer tg.InputPeerClass Entities peer.Entities }
Elem is a message iterator element.
func (Elem) Document ¶
Document returns document object if message has a document attachment (video, voice, audio, basically every type except photo).
type File ¶
type File struct { Name string MIMEType string Location tg.InputFileLocationClass }
File represents file attachment.
type GetHistoryQueryBuilder ¶
type GetHistoryQueryBuilder struct {
// contains filtered or unexported fields
}
GetHistoryQueryBuilder is query builder of MessagesGetHistory.
func (*GetHistoryQueryBuilder) BatchSize ¶
func (b *GetHistoryQueryBuilder) BatchSize(batchSize int) *GetHistoryQueryBuilder
BatchSize sets buffer of message loaded from one request. Be carefully, when set this limit, because Telegram does not return error if limit is too big, so results can be incorrect.
func (*GetHistoryQueryBuilder) Collect ¶
func (b *GetHistoryQueryBuilder) Collect(ctx context.Context) ([]Elem, error)
Collect creates iterator and collects all elements to slice.
func (*GetHistoryQueryBuilder) Count ¶
func (b *GetHistoryQueryBuilder) Count(ctx context.Context) (int, error)
Count fetches remote state to get number of elements.
func (*GetHistoryQueryBuilder) ForEach ¶
func (b *GetHistoryQueryBuilder) ForEach(ctx context.Context, cb func(context.Context, Elem) error) error
ForEach calls given callback on each iterator element.
func (*GetHistoryQueryBuilder) Iter ¶
func (b *GetHistoryQueryBuilder) Iter() *Iterator
Iter returns iterator using built query.
func (*GetHistoryQueryBuilder) OffsetDate ¶
func (b *GetHistoryQueryBuilder) OffsetDate(offsetDate int) *GetHistoryQueryBuilder
OffsetDate sets offsetDate from which iterate start.
func (*GetHistoryQueryBuilder) OffsetID ¶
func (b *GetHistoryQueryBuilder) OffsetID(offsetID int) *GetHistoryQueryBuilder
OffsetID sets offsetID from which iterate start.
func (*GetHistoryQueryBuilder) Peer ¶
func (b *GetHistoryQueryBuilder) Peer(paramPeer tg.InputPeerClass) *GetHistoryQueryBuilder
Peer sets Peer field of GetHistory query.
func (*GetHistoryQueryBuilder) Query ¶
func (b *GetHistoryQueryBuilder) Query(ctx context.Context, req Request) (tg.MessagesMessagesClass, error)
Query implements Query interface.
type GetRecentLocationsQueryBuilder ¶
type GetRecentLocationsQueryBuilder struct {
// contains filtered or unexported fields
}
GetRecentLocationsQueryBuilder is query builder of MessagesGetRecentLocations.
func (*GetRecentLocationsQueryBuilder) BatchSize ¶
func (b *GetRecentLocationsQueryBuilder) BatchSize(batchSize int) *GetRecentLocationsQueryBuilder
BatchSize sets buffer of message loaded from one request. Be carefully, when set this limit, because Telegram does not return error if limit is too big, so results can be incorrect.
func (*GetRecentLocationsQueryBuilder) Collect ¶
func (b *GetRecentLocationsQueryBuilder) Collect(ctx context.Context) ([]Elem, error)
Collect creates iterator and collects all elements to slice.
func (*GetRecentLocationsQueryBuilder) Count ¶
func (b *GetRecentLocationsQueryBuilder) Count(ctx context.Context) (int, error)
Count fetches remote state to get number of elements.
func (*GetRecentLocationsQueryBuilder) ForEach ¶
func (b *GetRecentLocationsQueryBuilder) ForEach(ctx context.Context, cb func(context.Context, Elem) error) error
ForEach calls given callback on each iterator element.
func (*GetRecentLocationsQueryBuilder) Iter ¶
func (b *GetRecentLocationsQueryBuilder) Iter() *Iterator
Iter returns iterator using built query.
func (*GetRecentLocationsQueryBuilder) Peer ¶
func (b *GetRecentLocationsQueryBuilder) Peer(paramPeer tg.InputPeerClass) *GetRecentLocationsQueryBuilder
Peer sets Peer field of GetRecentLocations query.
func (*GetRecentLocationsQueryBuilder) Query ¶
func (b *GetRecentLocationsQueryBuilder) Query(ctx context.Context, req Request) (tg.MessagesMessagesClass, error)
Query implements Query interface.
type GetRepliesQueryBuilder ¶
type GetRepliesQueryBuilder struct {
// contains filtered or unexported fields
}
GetRepliesQueryBuilder is query builder of MessagesGetReplies.
func (*GetRepliesQueryBuilder) BatchSize ¶
func (b *GetRepliesQueryBuilder) BatchSize(batchSize int) *GetRepliesQueryBuilder
BatchSize sets buffer of message loaded from one request. Be carefully, when set this limit, because Telegram does not return error if limit is too big, so results can be incorrect.
func (*GetRepliesQueryBuilder) Collect ¶
func (b *GetRepliesQueryBuilder) Collect(ctx context.Context) ([]Elem, error)
Collect creates iterator and collects all elements to slice.
func (*GetRepliesQueryBuilder) Count ¶
func (b *GetRepliesQueryBuilder) Count(ctx context.Context) (int, error)
Count fetches remote state to get number of elements.
func (*GetRepliesQueryBuilder) ForEach ¶
func (b *GetRepliesQueryBuilder) ForEach(ctx context.Context, cb func(context.Context, Elem) error) error
ForEach calls given callback on each iterator element.
func (*GetRepliesQueryBuilder) Iter ¶
func (b *GetRepliesQueryBuilder) Iter() *Iterator
Iter returns iterator using built query.
func (*GetRepliesQueryBuilder) MsgID ¶
func (b *GetRepliesQueryBuilder) MsgID(paramMsgID int) *GetRepliesQueryBuilder
MsgID sets MsgID field of GetReplies query.
func (*GetRepliesQueryBuilder) OffsetDate ¶
func (b *GetRepliesQueryBuilder) OffsetDate(offsetDate int) *GetRepliesQueryBuilder
OffsetDate sets offsetDate from which iterate start.
func (*GetRepliesQueryBuilder) OffsetID ¶
func (b *GetRepliesQueryBuilder) OffsetID(offsetID int) *GetRepliesQueryBuilder
OffsetID sets offsetID from which iterate start.
func (*GetRepliesQueryBuilder) Peer ¶
func (b *GetRepliesQueryBuilder) Peer(paramPeer tg.InputPeerClass) *GetRepliesQueryBuilder
Peer sets Peer field of GetReplies query.
func (*GetRepliesQueryBuilder) Query ¶
func (b *GetRepliesQueryBuilder) Query(ctx context.Context, req Request) (tg.MessagesMessagesClass, error)
Query implements Query interface.
type GetUnreadMentionsQueryBuilder ¶
type GetUnreadMentionsQueryBuilder struct {
// contains filtered or unexported fields
}
GetUnreadMentionsQueryBuilder is query builder of MessagesGetUnreadMentions.
func (*GetUnreadMentionsQueryBuilder) BatchSize ¶
func (b *GetUnreadMentionsQueryBuilder) BatchSize(batchSize int) *GetUnreadMentionsQueryBuilder
BatchSize sets buffer of message loaded from one request. Be carefully, when set this limit, because Telegram does not return error if limit is too big, so results can be incorrect.
func (*GetUnreadMentionsQueryBuilder) Collect ¶
func (b *GetUnreadMentionsQueryBuilder) Collect(ctx context.Context) ([]Elem, error)
Collect creates iterator and collects all elements to slice.
func (*GetUnreadMentionsQueryBuilder) Count ¶
func (b *GetUnreadMentionsQueryBuilder) Count(ctx context.Context) (int, error)
Count fetches remote state to get number of elements.
func (*GetUnreadMentionsQueryBuilder) ForEach ¶
func (b *GetUnreadMentionsQueryBuilder) ForEach(ctx context.Context, cb func(context.Context, Elem) error) error
ForEach calls given callback on each iterator element.
func (*GetUnreadMentionsQueryBuilder) Iter ¶
func (b *GetUnreadMentionsQueryBuilder) Iter() *Iterator
Iter returns iterator using built query.
func (*GetUnreadMentionsQueryBuilder) OffsetID ¶
func (b *GetUnreadMentionsQueryBuilder) OffsetID(offsetID int) *GetUnreadMentionsQueryBuilder
OffsetID sets offsetID from which iterate start.
func (*GetUnreadMentionsQueryBuilder) Peer ¶
func (b *GetUnreadMentionsQueryBuilder) Peer(paramPeer tg.InputPeerClass) *GetUnreadMentionsQueryBuilder
Peer sets Peer field of GetUnreadMentions query.
func (*GetUnreadMentionsQueryBuilder) Query ¶
func (b *GetUnreadMentionsQueryBuilder) Query(ctx context.Context, req Request) (tg.MessagesMessagesClass, error)
Query implements Query interface.
func (*GetUnreadMentionsQueryBuilder) TopMsgID ¶
func (b *GetUnreadMentionsQueryBuilder) TopMsgID(paramTopMsgID int) *GetUnreadMentionsQueryBuilder
TopMsgID sets TopMsgID field of GetUnreadMentions query.
type GetUnreadReactionsQueryBuilder ¶
type GetUnreadReactionsQueryBuilder struct {
// contains filtered or unexported fields
}
GetUnreadReactionsQueryBuilder is query builder of MessagesGetUnreadReactions.
func (*GetUnreadReactionsQueryBuilder) BatchSize ¶
func (b *GetUnreadReactionsQueryBuilder) BatchSize(batchSize int) *GetUnreadReactionsQueryBuilder
BatchSize sets buffer of message loaded from one request. Be carefully, when set this limit, because Telegram does not return error if limit is too big, so results can be incorrect.
func (*GetUnreadReactionsQueryBuilder) Collect ¶
func (b *GetUnreadReactionsQueryBuilder) Collect(ctx context.Context) ([]Elem, error)
Collect creates iterator and collects all elements to slice.
func (*GetUnreadReactionsQueryBuilder) Count ¶
func (b *GetUnreadReactionsQueryBuilder) Count(ctx context.Context) (int, error)
Count fetches remote state to get number of elements.
func (*GetUnreadReactionsQueryBuilder) ForEach ¶
func (b *GetUnreadReactionsQueryBuilder) ForEach(ctx context.Context, cb func(context.Context, Elem) error) error
ForEach calls given callback on each iterator element.
func (*GetUnreadReactionsQueryBuilder) Iter ¶
func (b *GetUnreadReactionsQueryBuilder) Iter() *Iterator
Iter returns iterator using built query.
func (*GetUnreadReactionsQueryBuilder) OffsetID ¶
func (b *GetUnreadReactionsQueryBuilder) OffsetID(offsetID int) *GetUnreadReactionsQueryBuilder
OffsetID sets offsetID from which iterate start.
func (*GetUnreadReactionsQueryBuilder) Peer ¶
func (b *GetUnreadReactionsQueryBuilder) Peer(paramPeer tg.InputPeerClass) *GetUnreadReactionsQueryBuilder
Peer sets Peer field of GetUnreadReactions query.
func (*GetUnreadReactionsQueryBuilder) Query ¶
func (b *GetUnreadReactionsQueryBuilder) Query(ctx context.Context, req Request) (tg.MessagesMessagesClass, error)
Query implements Query interface.
func (*GetUnreadReactionsQueryBuilder) TopMsgID ¶
func (b *GetUnreadReactionsQueryBuilder) TopMsgID(paramTopMsgID int) *GetUnreadReactionsQueryBuilder
TopMsgID sets TopMsgID field of GetUnreadReactions query.
type Iterator ¶
type Iterator struct {
// contains filtered or unexported fields
}
Iterator is a message stream iterator.
func NewIterator ¶
NewIterator creates new iterator.
func (*Iterator) FetchTotal ¶
FetchTotal fetches and returns count of elements.
func (*Iterator) Next ¶
Next prepares the next message for reading with the Value method. It returns true on success, or false if there is no next message or an error happened while preparing it. Err should be consulted to distinguish between the two cases.
func (*Iterator) OffsetDate ¶
OffsetDate sets OffsetDate request parameter.
func (*Iterator) OffsetPeer ¶
func (m *Iterator) OffsetPeer(offsetPeer tg.InputPeerClass) *Iterator
OffsetPeer sets OffsetPeer request parameter.
func (*Iterator) OffsetRate ¶
OffsetRate sets OffsetRate request parameter.
type Query ¶
Query is an abstraction for messages request. NB: iterator mutates returned data (sorts, at least).
type QueryBuilder ¶
type QueryBuilder struct {
// contains filtered or unexported fields
}
QueryBuilder is a helper to create message queries.
func NewQueryBuilder ¶
func NewQueryBuilder(raw *tg.Client) *QueryBuilder
NewQueryBuilder creates new QueryBuilder.
func (*QueryBuilder) GetHistory ¶
func (q *QueryBuilder) GetHistory(paramPeer tg.InputPeerClass) *GetHistoryQueryBuilder
GetHistory creates query builder of MessagesGetHistory.
func (*QueryBuilder) GetRecentLocations ¶
func (q *QueryBuilder) GetRecentLocations(paramPeer tg.InputPeerClass) *GetRecentLocationsQueryBuilder
GetRecentLocations creates query builder of MessagesGetRecentLocations.
func (*QueryBuilder) GetReplies ¶
func (q *QueryBuilder) GetReplies(paramPeer tg.InputPeerClass) *GetRepliesQueryBuilder
GetReplies creates query builder of MessagesGetReplies.
func (*QueryBuilder) GetUnreadMentions ¶
func (q *QueryBuilder) GetUnreadMentions(paramPeer tg.InputPeerClass) *GetUnreadMentionsQueryBuilder
GetUnreadMentions creates query builder of MessagesGetUnreadMentions.
func (*QueryBuilder) GetUnreadReactions ¶
func (q *QueryBuilder) GetUnreadReactions(paramPeer tg.InputPeerClass) *GetUnreadReactionsQueryBuilder
GetUnreadReactions creates query builder of MessagesGetUnreadReactions.
func (*QueryBuilder) Search ¶
func (q *QueryBuilder) Search(paramPeer tg.InputPeerClass) *SearchQueryBuilder
Search creates query builder of MessagesSearch.
func (*QueryBuilder) SearchGlobal ¶
func (q *QueryBuilder) SearchGlobal() *SearchGlobalQueryBuilder
SearchGlobal creates query builder of MessagesSearchGlobal.
func (*QueryBuilder) SearchSentMedia ¶
func (q *QueryBuilder) SearchSentMedia() *SearchSentMediaQueryBuilder
SearchSentMedia creates query builder of MessagesSearchSentMedia.
func (*QueryBuilder) StatsGetMessagePublicForwards ¶
func (q *QueryBuilder) StatsGetMessagePublicForwards(paramChannel tg.InputChannelClass) *StatsGetMessagePublicForwardsQueryBuilder
StatsGetMessagePublicForwards creates query builder of StatsGetMessagePublicForwards.
type Request ¶
type Request struct { AddOffset int OffsetDate int OffsetID int OffsetPeer tg.InputPeerClass OffsetRate int Limit int }
Request is a parameter for Query.
type SearchGlobalQueryBuilder ¶
type SearchGlobalQueryBuilder struct {
// contains filtered or unexported fields
}
SearchGlobalQueryBuilder is query builder of MessagesSearchGlobal.
func (*SearchGlobalQueryBuilder) BatchSize ¶
func (b *SearchGlobalQueryBuilder) BatchSize(batchSize int) *SearchGlobalQueryBuilder
BatchSize sets buffer of message loaded from one request. Be carefully, when set this limit, because Telegram does not return error if limit is too big, so results can be incorrect.
func (*SearchGlobalQueryBuilder) ChatPhotos ¶
func (b *SearchGlobalQueryBuilder) ChatPhotos() *SearchGlobalQueryBuilder
ChatPhotos sets Filter field of SearchGlobal query.
func (*SearchGlobalQueryBuilder) Collect ¶
func (b *SearchGlobalQueryBuilder) Collect(ctx context.Context) ([]Elem, error)
Collect creates iterator and collects all elements to slice.
func (*SearchGlobalQueryBuilder) Contacts ¶
func (b *SearchGlobalQueryBuilder) Contacts() *SearchGlobalQueryBuilder
Contacts sets Filter field of SearchGlobal query.
func (*SearchGlobalQueryBuilder) Count ¶
func (b *SearchGlobalQueryBuilder) Count(ctx context.Context) (int, error)
Count fetches remote state to get number of elements.
func (*SearchGlobalQueryBuilder) Document ¶
func (b *SearchGlobalQueryBuilder) Document() *SearchGlobalQueryBuilder
Document sets Filter field of SearchGlobal query.
func (*SearchGlobalQueryBuilder) Filter ¶
func (b *SearchGlobalQueryBuilder) Filter(paramFilter tg.MessagesFilterClass) *SearchGlobalQueryBuilder
Filter sets Filter field of SearchGlobal query.
func (*SearchGlobalQueryBuilder) FolderID ¶
func (b *SearchGlobalQueryBuilder) FolderID(paramFolderID int) *SearchGlobalQueryBuilder
FolderID sets FolderID field of SearchGlobal query.
func (*SearchGlobalQueryBuilder) ForEach ¶
func (b *SearchGlobalQueryBuilder) ForEach(ctx context.Context, cb func(context.Context, Elem) error) error
ForEach calls given callback on each iterator element.
func (*SearchGlobalQueryBuilder) Geo ¶
func (b *SearchGlobalQueryBuilder) Geo() *SearchGlobalQueryBuilder
Geo sets Filter field of SearchGlobal query.
func (*SearchGlobalQueryBuilder) Gif ¶
func (b *SearchGlobalQueryBuilder) Gif() *SearchGlobalQueryBuilder
Gif sets Filter field of SearchGlobal query.
func (*SearchGlobalQueryBuilder) Iter ¶
func (b *SearchGlobalQueryBuilder) Iter() *Iterator
Iter returns iterator using built query.
func (*SearchGlobalQueryBuilder) MaxDate ¶
func (b *SearchGlobalQueryBuilder) MaxDate(paramMaxDate int) *SearchGlobalQueryBuilder
MaxDate sets MaxDate field of SearchGlobal query.
func (*SearchGlobalQueryBuilder) MinDate ¶
func (b *SearchGlobalQueryBuilder) MinDate(paramMinDate int) *SearchGlobalQueryBuilder
MinDate sets MinDate field of SearchGlobal query.
func (*SearchGlobalQueryBuilder) Music ¶
func (b *SearchGlobalQueryBuilder) Music() *SearchGlobalQueryBuilder
Music sets Filter field of SearchGlobal query.
func (*SearchGlobalQueryBuilder) MyMentions ¶
func (b *SearchGlobalQueryBuilder) MyMentions() *SearchGlobalQueryBuilder
MyMentions sets Filter field of SearchGlobal query.
func (*SearchGlobalQueryBuilder) OffsetID ¶
func (b *SearchGlobalQueryBuilder) OffsetID(offsetID int) *SearchGlobalQueryBuilder
OffsetID sets offsetID from which iterate start.
func (*SearchGlobalQueryBuilder) PhoneCalls ¶
func (b *SearchGlobalQueryBuilder) PhoneCalls(paramMissed bool) *SearchGlobalQueryBuilder
PhoneCalls sets Filter field of SearchGlobal query.
func (*SearchGlobalQueryBuilder) PhotoVideo ¶
func (b *SearchGlobalQueryBuilder) PhotoVideo() *SearchGlobalQueryBuilder
PhotoVideo sets Filter field of SearchGlobal query.
func (*SearchGlobalQueryBuilder) Photos ¶
func (b *SearchGlobalQueryBuilder) Photos() *SearchGlobalQueryBuilder
Photos sets Filter field of SearchGlobal query.
func (*SearchGlobalQueryBuilder) Pinned ¶
func (b *SearchGlobalQueryBuilder) Pinned() *SearchGlobalQueryBuilder
Pinned sets Filter field of SearchGlobal query.
func (*SearchGlobalQueryBuilder) Q ¶
func (b *SearchGlobalQueryBuilder) Q(paramQ string) *SearchGlobalQueryBuilder
Q sets Q field of SearchGlobal query.
func (*SearchGlobalQueryBuilder) Query ¶
func (b *SearchGlobalQueryBuilder) Query(ctx context.Context, req Request) (tg.MessagesMessagesClass, error)
Query implements Query interface.
func (*SearchGlobalQueryBuilder) RoundVideo ¶
func (b *SearchGlobalQueryBuilder) RoundVideo() *SearchGlobalQueryBuilder
RoundVideo sets Filter field of SearchGlobal query.
func (*SearchGlobalQueryBuilder) RoundVoice ¶
func (b *SearchGlobalQueryBuilder) RoundVoice() *SearchGlobalQueryBuilder
RoundVoice sets Filter field of SearchGlobal query.
func (*SearchGlobalQueryBuilder) URL ¶
func (b *SearchGlobalQueryBuilder) URL() *SearchGlobalQueryBuilder
URL sets Filter field of SearchGlobal query.
func (*SearchGlobalQueryBuilder) Video ¶
func (b *SearchGlobalQueryBuilder) Video() *SearchGlobalQueryBuilder
Video sets Filter field of SearchGlobal query.
func (*SearchGlobalQueryBuilder) Voice ¶
func (b *SearchGlobalQueryBuilder) Voice() *SearchGlobalQueryBuilder
Voice sets Filter field of SearchGlobal query.
type SearchQueryBuilder ¶
type SearchQueryBuilder struct {
// contains filtered or unexported fields
}
SearchQueryBuilder is query builder of MessagesSearch.
func (*SearchQueryBuilder) BatchSize ¶
func (b *SearchQueryBuilder) BatchSize(batchSize int) *SearchQueryBuilder
BatchSize sets buffer of message loaded from one request. Be carefully, when set this limit, because Telegram does not return error if limit is too big, so results can be incorrect.
func (*SearchQueryBuilder) ChatPhotos ¶
func (b *SearchQueryBuilder) ChatPhotos() *SearchQueryBuilder
ChatPhotos sets Filter field of Search query.
func (*SearchQueryBuilder) Collect ¶
func (b *SearchQueryBuilder) Collect(ctx context.Context) ([]Elem, error)
Collect creates iterator and collects all elements to slice.
func (*SearchQueryBuilder) Contacts ¶
func (b *SearchQueryBuilder) Contacts() *SearchQueryBuilder
Contacts sets Filter field of Search query.
func (*SearchQueryBuilder) Count ¶
func (b *SearchQueryBuilder) Count(ctx context.Context) (int, error)
Count fetches remote state to get number of elements.
func (*SearchQueryBuilder) Document ¶
func (b *SearchQueryBuilder) Document() *SearchQueryBuilder
Document sets Filter field of Search query.
func (*SearchQueryBuilder) Filter ¶
func (b *SearchQueryBuilder) Filter(paramFilter tg.MessagesFilterClass) *SearchQueryBuilder
Filter sets Filter field of Search query.
func (*SearchQueryBuilder) ForEach ¶
func (b *SearchQueryBuilder) ForEach(ctx context.Context, cb func(context.Context, Elem) error) error
ForEach calls given callback on each iterator element.
func (*SearchQueryBuilder) FromID ¶
func (b *SearchQueryBuilder) FromID(paramFromID tg.InputPeerClass) *SearchQueryBuilder
FromID sets FromID field of Search query.
func (*SearchQueryBuilder) Geo ¶
func (b *SearchQueryBuilder) Geo() *SearchQueryBuilder
Geo sets Filter field of Search query.
func (*SearchQueryBuilder) Gif ¶
func (b *SearchQueryBuilder) Gif() *SearchQueryBuilder
Gif sets Filter field of Search query.
func (*SearchQueryBuilder) Iter ¶
func (b *SearchQueryBuilder) Iter() *Iterator
Iter returns iterator using built query.
func (*SearchQueryBuilder) MaxDate ¶
func (b *SearchQueryBuilder) MaxDate(paramMaxDate int) *SearchQueryBuilder
MaxDate sets MaxDate field of Search query.
func (*SearchQueryBuilder) MinDate ¶
func (b *SearchQueryBuilder) MinDate(paramMinDate int) *SearchQueryBuilder
MinDate sets MinDate field of Search query.
func (*SearchQueryBuilder) Music ¶
func (b *SearchQueryBuilder) Music() *SearchQueryBuilder
Music sets Filter field of Search query.
func (*SearchQueryBuilder) MyMentions ¶
func (b *SearchQueryBuilder) MyMentions() *SearchQueryBuilder
MyMentions sets Filter field of Search query.
func (*SearchQueryBuilder) OffsetID ¶
func (b *SearchQueryBuilder) OffsetID(offsetID int) *SearchQueryBuilder
OffsetID sets offsetID from which iterate start.
func (*SearchQueryBuilder) Peer ¶
func (b *SearchQueryBuilder) Peer(paramPeer tg.InputPeerClass) *SearchQueryBuilder
Peer sets Peer field of Search query.
func (*SearchQueryBuilder) PhoneCalls ¶
func (b *SearchQueryBuilder) PhoneCalls(paramMissed bool) *SearchQueryBuilder
PhoneCalls sets Filter field of Search query.
func (*SearchQueryBuilder) PhotoVideo ¶
func (b *SearchQueryBuilder) PhotoVideo() *SearchQueryBuilder
PhotoVideo sets Filter field of Search query.
func (*SearchQueryBuilder) Photos ¶
func (b *SearchQueryBuilder) Photos() *SearchQueryBuilder
Photos sets Filter field of Search query.
func (*SearchQueryBuilder) Pinned ¶
func (b *SearchQueryBuilder) Pinned() *SearchQueryBuilder
Pinned sets Filter field of Search query.
func (*SearchQueryBuilder) Q ¶
func (b *SearchQueryBuilder) Q(paramQ string) *SearchQueryBuilder
Q sets Q field of Search query.
func (*SearchQueryBuilder) Query ¶
func (b *SearchQueryBuilder) Query(ctx context.Context, req Request) (tg.MessagesMessagesClass, error)
Query implements Query interface.
func (*SearchQueryBuilder) RoundVideo ¶
func (b *SearchQueryBuilder) RoundVideo() *SearchQueryBuilder
RoundVideo sets Filter field of Search query.
func (*SearchQueryBuilder) RoundVoice ¶
func (b *SearchQueryBuilder) RoundVoice() *SearchQueryBuilder
RoundVoice sets Filter field of Search query.
func (*SearchQueryBuilder) TopMsgID ¶
func (b *SearchQueryBuilder) TopMsgID(paramTopMsgID int) *SearchQueryBuilder
TopMsgID sets TopMsgID field of Search query.
func (*SearchQueryBuilder) URL ¶
func (b *SearchQueryBuilder) URL() *SearchQueryBuilder
URL sets Filter field of Search query.
func (*SearchQueryBuilder) Video ¶
func (b *SearchQueryBuilder) Video() *SearchQueryBuilder
Video sets Filter field of Search query.
func (*SearchQueryBuilder) Voice ¶
func (b *SearchQueryBuilder) Voice() *SearchQueryBuilder
Voice sets Filter field of Search query.
type SearchSentMediaQueryBuilder ¶
type SearchSentMediaQueryBuilder struct {
// contains filtered or unexported fields
}
SearchSentMediaQueryBuilder is query builder of MessagesSearchSentMedia.
func (*SearchSentMediaQueryBuilder) BatchSize ¶
func (b *SearchSentMediaQueryBuilder) BatchSize(batchSize int) *SearchSentMediaQueryBuilder
BatchSize sets buffer of message loaded from one request. Be carefully, when set this limit, because Telegram does not return error if limit is too big, so results can be incorrect.
func (*SearchSentMediaQueryBuilder) ChatPhotos ¶
func (b *SearchSentMediaQueryBuilder) ChatPhotos() *SearchSentMediaQueryBuilder
ChatPhotos sets Filter field of SearchSentMedia query.
func (*SearchSentMediaQueryBuilder) Collect ¶
func (b *SearchSentMediaQueryBuilder) Collect(ctx context.Context) ([]Elem, error)
Collect creates iterator and collects all elements to slice.
func (*SearchSentMediaQueryBuilder) Contacts ¶
func (b *SearchSentMediaQueryBuilder) Contacts() *SearchSentMediaQueryBuilder
Contacts sets Filter field of SearchSentMedia query.
func (*SearchSentMediaQueryBuilder) Count ¶
func (b *SearchSentMediaQueryBuilder) Count(ctx context.Context) (int, error)
Count fetches remote state to get number of elements.
func (*SearchSentMediaQueryBuilder) Document ¶
func (b *SearchSentMediaQueryBuilder) Document() *SearchSentMediaQueryBuilder
Document sets Filter field of SearchSentMedia query.
func (*SearchSentMediaQueryBuilder) Filter ¶
func (b *SearchSentMediaQueryBuilder) Filter(paramFilter tg.MessagesFilterClass) *SearchSentMediaQueryBuilder
Filter sets Filter field of SearchSentMedia query.
func (*SearchSentMediaQueryBuilder) ForEach ¶
func (b *SearchSentMediaQueryBuilder) ForEach(ctx context.Context, cb func(context.Context, Elem) error) error
ForEach calls given callback on each iterator element.
func (*SearchSentMediaQueryBuilder) Geo ¶
func (b *SearchSentMediaQueryBuilder) Geo() *SearchSentMediaQueryBuilder
Geo sets Filter field of SearchSentMedia query.
func (*SearchSentMediaQueryBuilder) Gif ¶
func (b *SearchSentMediaQueryBuilder) Gif() *SearchSentMediaQueryBuilder
Gif sets Filter field of SearchSentMedia query.
func (*SearchSentMediaQueryBuilder) Iter ¶
func (b *SearchSentMediaQueryBuilder) Iter() *Iterator
Iter returns iterator using built query.
func (*SearchSentMediaQueryBuilder) Music ¶
func (b *SearchSentMediaQueryBuilder) Music() *SearchSentMediaQueryBuilder
Music sets Filter field of SearchSentMedia query.
func (*SearchSentMediaQueryBuilder) MyMentions ¶
func (b *SearchSentMediaQueryBuilder) MyMentions() *SearchSentMediaQueryBuilder
MyMentions sets Filter field of SearchSentMedia query.
func (*SearchSentMediaQueryBuilder) PhoneCalls ¶
func (b *SearchSentMediaQueryBuilder) PhoneCalls(paramMissed bool) *SearchSentMediaQueryBuilder
PhoneCalls sets Filter field of SearchSentMedia query.
func (*SearchSentMediaQueryBuilder) PhotoVideo ¶
func (b *SearchSentMediaQueryBuilder) PhotoVideo() *SearchSentMediaQueryBuilder
PhotoVideo sets Filter field of SearchSentMedia query.
func (*SearchSentMediaQueryBuilder) Photos ¶
func (b *SearchSentMediaQueryBuilder) Photos() *SearchSentMediaQueryBuilder
Photos sets Filter field of SearchSentMedia query.
func (*SearchSentMediaQueryBuilder) Pinned ¶
func (b *SearchSentMediaQueryBuilder) Pinned() *SearchSentMediaQueryBuilder
Pinned sets Filter field of SearchSentMedia query.
func (*SearchSentMediaQueryBuilder) Q ¶
func (b *SearchSentMediaQueryBuilder) Q(paramQ string) *SearchSentMediaQueryBuilder
Q sets Q field of SearchSentMedia query.
func (*SearchSentMediaQueryBuilder) Query ¶
func (b *SearchSentMediaQueryBuilder) Query(ctx context.Context, req Request) (tg.MessagesMessagesClass, error)
Query implements Query interface.
func (*SearchSentMediaQueryBuilder) RoundVideo ¶
func (b *SearchSentMediaQueryBuilder) RoundVideo() *SearchSentMediaQueryBuilder
RoundVideo sets Filter field of SearchSentMedia query.
func (*SearchSentMediaQueryBuilder) RoundVoice ¶
func (b *SearchSentMediaQueryBuilder) RoundVoice() *SearchSentMediaQueryBuilder
RoundVoice sets Filter field of SearchSentMedia query.
func (*SearchSentMediaQueryBuilder) URL ¶
func (b *SearchSentMediaQueryBuilder) URL() *SearchSentMediaQueryBuilder
URL sets Filter field of SearchSentMedia query.
func (*SearchSentMediaQueryBuilder) Video ¶
func (b *SearchSentMediaQueryBuilder) Video() *SearchSentMediaQueryBuilder
Video sets Filter field of SearchSentMedia query.
func (*SearchSentMediaQueryBuilder) Voice ¶
func (b *SearchSentMediaQueryBuilder) Voice() *SearchSentMediaQueryBuilder
Voice sets Filter field of SearchSentMedia query.
type StatsGetMessagePublicForwardsQueryBuilder ¶
type StatsGetMessagePublicForwardsQueryBuilder struct {
// contains filtered or unexported fields
}
StatsGetMessagePublicForwardsQueryBuilder is query builder of StatsGetMessagePublicForwards.
func (*StatsGetMessagePublicForwardsQueryBuilder) BatchSize ¶
func (b *StatsGetMessagePublicForwardsQueryBuilder) BatchSize(batchSize int) *StatsGetMessagePublicForwardsQueryBuilder
BatchSize sets buffer of message loaded from one request. Be carefully, when set this limit, because Telegram does not return error if limit is too big, so results can be incorrect.
func (*StatsGetMessagePublicForwardsQueryBuilder) Channel ¶
func (b *StatsGetMessagePublicForwardsQueryBuilder) Channel(paramChannel tg.InputChannelClass) *StatsGetMessagePublicForwardsQueryBuilder
Channel sets Channel field of StatsGetMessagePublicForwards query.
func (*StatsGetMessagePublicForwardsQueryBuilder) Collect ¶
func (b *StatsGetMessagePublicForwardsQueryBuilder) Collect(ctx context.Context) ([]Elem, error)
Collect creates iterator and collects all elements to slice.
func (*StatsGetMessagePublicForwardsQueryBuilder) Count ¶
func (b *StatsGetMessagePublicForwardsQueryBuilder) Count(ctx context.Context) (int, error)
Count fetches remote state to get number of elements.
func (*StatsGetMessagePublicForwardsQueryBuilder) ForEach ¶
func (b *StatsGetMessagePublicForwardsQueryBuilder) ForEach(ctx context.Context, cb func(context.Context, Elem) error) error
ForEach calls given callback on each iterator element.
func (*StatsGetMessagePublicForwardsQueryBuilder) Iter ¶
func (b *StatsGetMessagePublicForwardsQueryBuilder) Iter() *Iterator
Iter returns iterator using built query.
func (*StatsGetMessagePublicForwardsQueryBuilder) MsgID ¶
func (b *StatsGetMessagePublicForwardsQueryBuilder) MsgID(paramMsgID int) *StatsGetMessagePublicForwardsQueryBuilder
MsgID sets MsgID field of StatsGetMessagePublicForwards query.
func (*StatsGetMessagePublicForwardsQueryBuilder) OffsetID ¶
func (b *StatsGetMessagePublicForwardsQueryBuilder) OffsetID(offsetID int) *StatsGetMessagePublicForwardsQueryBuilder
OffsetID sets offsetID from which iterate start.
func (*StatsGetMessagePublicForwardsQueryBuilder) Query ¶
func (b *StatsGetMessagePublicForwardsQueryBuilder) Query(ctx context.Context, req Request) (tg.MessagesMessagesClass, error)
Query implements Query interface.