Documentation ¶
Overview ¶
Package messages contains message iteration helper.
Index ¶
- type Elem
- 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)
- 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) Search(paramPeer tg.InputPeerClass) *SearchQueryBuilder
- func (q *QueryBuilder) SearchGlobal() *SearchGlobalQueryBuilder
- 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 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.MessageClass Entities peer.Entities }
Elem is a message iterator element.
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.
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 a 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) 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) 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 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.