Documentation ¶
Index ¶
- Constants
- type BanMap
- type BanQueryOptions
- type BanQueryResult
- type InboxMessagesQueryOptions
- type ManyRolesOptions
- type MessageQueryOptions
- type ModRequestMessagesQueryOptions
- type QueriableType
- type Query
- func (q *Query) Bans(ctx context.Context, opt BanQueryOptions) (*BanQueryResult, error)
- func (q *Query) EmoteChannels(ctx context.Context, emoteID primitive.ObjectID, page int, limit int) ([]structures.User, int64, error)
- func (q *Query) EmoteSets(ctx context.Context, filter bson.M) *QueryResult[structures.EmoteSet]
- func (q *Query) Emotes(ctx context.Context, filter bson.M) *QueryResult[structures.Emote]
- func (q *Query) GlobalEmoteSet(ctx context.Context) (structures.EmoteSet, error)
- func (q *Query) InboxMessages(ctx context.Context, opt InboxMessagesQueryOptions) *QueryResult[structures.Message[bson.Raw]]
- func (q *Query) Messages(ctx context.Context, filter bson.M, opt MessageQueryOptions) *QueryResult[structures.Message[bson.Raw]]
- func (q *Query) ModRequestMessages(ctx context.Context, opt ModRequestMessagesQueryOptions) *QueryResult[structures.Message[bson.Raw]]
- func (q *Query) NewBinder(ctx context.Context) *QueryBinder
- func (q *Query) Roles(ctx context.Context, filter bson.M) ([]structures.Role, error)
- func (q *Query) SearchEmotes(ctx context.Context, opt SearchEmotesOptions) ([]structures.Emote, int, error)
- func (q *Query) SearchUsers(ctx context.Context, filter bson.M, opts ...UserSearchOptions) ([]structures.User, int, error)
- func (q *Query) UserEditorOf(ctx context.Context, id primitive.ObjectID) ([]structures.UserEditor, error)
- func (q *Query) UserEmoteSets(ctx context.Context, filter bson.M) (map[primitive.ObjectID][]structures.EmoteSet, error)
- func (q *Query) Users(ctx context.Context, filter bson.M) *QueryResult[structures.User]
- type QueryBinder
- type QueryResult
- func (qr *QueryResult[T]) Empty() bool
- func (qr *QueryResult[T]) Error() error
- func (qr *QueryResult[T]) First() (T, error)
- func (qr *QueryResult[T]) Index(pos int) (T, error)
- func (qr *QueryResult[T]) Items() ([]T, error)
- func (qr *QueryResult[T]) Last() (T, error)
- func (qr *QueryResult[T]) Total() int64
- type SearchEmotesFilter
- type SearchEmotesOptions
- type UserSearchOptions
Constants ¶
View Source
const EMOTES_QUERY_LIMIT = 300
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BanQueryOptions ¶
type BanQueryResult ¶
type BanQueryResult struct { All []structures.Ban // A list of user IDs which will not have any permissions at all NoPermissions BanMap // A list of user IDs not allowed to authenticate NoAuth BanMap // A list of user IDs who own nothing and are happy NoOwnership BanMap // A list of user IDs in the memory hole // (filtered from API results) MemoryHole BanMap }
type ManyRolesOptions ¶
type ManyRolesOptions struct {
DefaultOnly bool
}
type MessageQueryOptions ¶
type QueriableType ¶
type Query ¶
type Query struct {
// contains filtered or unexported fields
}
func (*Query) Bans ¶
func (q *Query) Bans(ctx context.Context, opt BanQueryOptions) (*BanQueryResult, error)
func (*Query) EmoteChannels ¶
func (*Query) GlobalEmoteSet ¶
func (*Query) InboxMessages ¶
func (q *Query) InboxMessages(ctx context.Context, opt InboxMessagesQueryOptions) *QueryResult[structures.Message[bson.Raw]]
func (*Query) Messages ¶
func (q *Query) Messages(ctx context.Context, filter bson.M, opt MessageQueryOptions) *QueryResult[structures.Message[bson.Raw]]
func (*Query) ModRequestMessages ¶
func (q *Query) ModRequestMessages(ctx context.Context, opt ModRequestMessagesQueryOptions) *QueryResult[structures.Message[bson.Raw]]
func (*Query) SearchEmotes ¶
func (*Query) SearchUsers ¶
func (*Query) UserEditorOf ¶
func (*Query) UserEmoteSets ¶
type QueryBinder ¶
type QueryBinder struct {
// contains filtered or unexported fields
}
type QueryResult ¶
type QueryResult[T QueriableType] struct { // contains filtered or unexported fields }
func (*QueryResult[T]) Empty ¶
func (qr *QueryResult[T]) Empty() bool
func (*QueryResult[T]) Error ¶
func (qr *QueryResult[T]) Error() error
func (*QueryResult[T]) First ¶
func (qr *QueryResult[T]) First() (T, error)
func (*QueryResult[T]) Index ¶
func (qr *QueryResult[T]) Index(pos int) (T, error)
func (*QueryResult[T]) Items ¶
func (qr *QueryResult[T]) Items() ([]T, error)
func (*QueryResult[T]) Last ¶
func (qr *QueryResult[T]) Last() (T, error)
func (*QueryResult[T]) Total ¶
func (qr *QueryResult[T]) Total() int64
type SearchEmotesFilter ¶
type SearchEmotesOptions ¶
Click to show internal directories.
Click to hide internal directories.