query_resolvers

package
v0.0.0-...-870ec01 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2022 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateAuditResolver

func GenerateAuditResolver(ctx context.Context, audit *datastructure.AuditLog, fields map[string]*SelectedField) (*auditResolver, error)

func GenerateBanResolver

func GenerateBanResolver(ctx context.Context, ban *datastructure.Ban, fields map[string]*SelectedField) (*banResolver, error)

func GenerateCosmeticResolver

func GenerateCosmeticResolver(ctx context.Context, cos *datastructure.Cosmetic, fields map[string]*SelectedField) *cosmeticResolver

func GenerateReportResolver

func GenerateReportResolver(ctx context.Context, report *datastructure.Report, fields map[string]*SelectedField) (*reportResolver, error)

Types

type EmoteResolver

type EmoteResolver struct {
	// contains filtered or unexported fields
}

func GenerateEmoteResolver

func GenerateEmoteResolver(ctx context.Context, emote *datastructure.Emote, emoteID *primitive.ObjectID, fields map[string]*SelectedField) (*EmoteResolver, error)

func (*EmoteResolver) AuditEntries

func (r *EmoteResolver) AuditEntries() (*[]*auditResolver, error)

func (*EmoteResolver) ChannelCount

func (r *EmoteResolver) ChannelCount() int32

func (*EmoteResolver) Channels

func (r *EmoteResolver) Channels(ctx context.Context, args struct {
	Page  *int32
	Limit *int32
}) (*[]*UserResolver, error)

func (*EmoteResolver) CreatedAt

func (r *EmoteResolver) CreatedAt() string

func (*EmoteResolver) Height

func (r *EmoteResolver) Height() []int32

func (*EmoteResolver) ID

func (r *EmoteResolver) ID() string

func (*EmoteResolver) Mime

func (r *EmoteResolver) Mime() string

func (*EmoteResolver) Name

func (r *EmoteResolver) Name() string

func (*EmoteResolver) Owner

func (r *EmoteResolver) Owner() (*UserResolver, error)

func (*EmoteResolver) OwnerID

func (r *EmoteResolver) OwnerID() string

func (*EmoteResolver) Provider

func (r *EmoteResolver) Provider() string

func (*EmoteResolver) ProviderID

func (r *EmoteResolver) ProviderID() *string

func (*EmoteResolver) Reports

func (r *EmoteResolver) Reports() (*[]*reportResolver, error)

func (*EmoteResolver) Status

func (r *EmoteResolver) Status() int32

func (*EmoteResolver) Tags

func (r *EmoteResolver) Tags() []string

func (*EmoteResolver) URLs

func (r *EmoteResolver) URLs() [][]string

func (*EmoteResolver) Visibility

func (r *EmoteResolver) Visibility() int32

func (*EmoteResolver) Width

func (r *EmoteResolver) Width() []int32

type EmoteSearchFilter

type EmoteSearchFilter struct {
	WidthRange      *[]int32
	Visibility      *int32
	VisibilityClear *int32
}

type NotificationResolver

type NotificationResolver struct {
	// contains filtered or unexported fields
}

func GenerateNotificationResolver

func GenerateNotificationResolver(ctx context.Context, notification *datastructure.Notification, fields map[string]*SelectedField) (*NotificationResolver, error)

func (*NotificationResolver) Announcement

func (r *NotificationResolver) Announcement() bool

func (*NotificationResolver) Emotes

func (r *NotificationResolver) Emotes() ([]*EmoteResolver, error)

func (*NotificationResolver) ID

func (r *NotificationResolver) ID() string

func (*NotificationResolver) MessageParts

func (r *NotificationResolver) MessageParts() []*messagePart

func (*NotificationResolver) Read

func (r *NotificationResolver) Read() bool

func (*NotificationResolver) ReadAt

func (r *NotificationResolver) ReadAt() *string

func (*NotificationResolver) Timestamp

func (r *NotificationResolver) Timestamp() string

func (*NotificationResolver) Title

func (r *NotificationResolver) Title() string

func (*NotificationResolver) Users

func (r *NotificationResolver) Users() ([]*UserResolver, error)

type QueryResolver

type QueryResolver struct{}

func (*QueryResolver) AuditLogs

func (*QueryResolver) AuditLogs(ctx context.Context, args struct {
	Page  int32
	Limit *int32
	Types *[]int32
}) ([]*auditResolver, error)

func (*QueryResolver) Emote

func (*QueryResolver) Emote(ctx context.Context, args struct{ ID string }) (*EmoteResolver, error)

func (*QueryResolver) Emotes

func (*QueryResolver) Emotes(ctx context.Context, args struct{ List []string }) (*[]*EmoteResolver, error)

func (*QueryResolver) FeaturedBroadcast

func (*QueryResolver) FeaturedBroadcast(ctx context.Context) (string, error)

func (*QueryResolver) Meta

func (*QueryResolver) Role

func (*QueryResolver) Role(ctx context.Context, args struct{ ID string }) (*RoleResolver, error)

func (*QueryResolver) SearchEmotes

func (*QueryResolver) SearchEmotes(ctx context.Context, args struct {
	Query       string
	Page        *int32
	PageSize    *int32
	Limit       *int32
	GlobalState *string
	SortBy      *string
	SortOrder   *int32
	Channel     *string
	SubmittedBy *string
	Filter      *EmoteSearchFilter
}) ([]*EmoteResolver, error)

func (*QueryResolver) SearchUsers

func (*QueryResolver) SearchUsers(ctx context.Context, args struct {
	Query string
	Page  *int32
	Limit *int32
}) ([]*UserResolver, error)

func (*QueryResolver) ThirdPartyEmotes

func (*QueryResolver) ThirdPartyEmotes(ctx context.Context, args struct {
	Providers []string
	Channel   string
	Global    *bool
}) (*[]*EmoteResolver, error)

func (*QueryResolver) User

func (*QueryResolver) User(ctx context.Context, args struct{ ID string }) (*UserResolver, error)

type RoleResolver

type RoleResolver struct {
	// contains filtered or unexported fields
}

func GenerateRoleResolver

func GenerateRoleResolver(ctx context.Context, pRole *datastructure.Role, roleID *primitive.ObjectID, fields map[string]*SelectedField) (*RoleResolver, error)

func (*RoleResolver) Allowed

func (r *RoleResolver) Allowed() string

func (*RoleResolver) Color

func (r *RoleResolver) Color() int32

func (*RoleResolver) Denied

func (r *RoleResolver) Denied() string

func (*RoleResolver) ID

func (r *RoleResolver) ID() string

func (*RoleResolver) Name

func (r *RoleResolver) Name() string

func (*RoleResolver) Position

func (r *RoleResolver) Position() int32

type SelectedField

type SelectedField struct {
	Name     string
	Children map[string]*SelectedField
}

func GenerateSelectedFieldMap

func GenerateSelectedFieldMap(ctx context.Context, max int) (*SelectedField, bool)

type UserResolver

type UserResolver struct {
	// contains filtered or unexported fields
}

func GenerateUserResolver

func GenerateUserResolver(ctx context.Context, user *datastructure.User, userID *primitive.ObjectID, fields map[string]*SelectedField) (*UserResolver, error)

func (*UserResolver) AuditEntries

func (r *UserResolver) AuditEntries() (*[]*auditResolver, error)

func (*UserResolver) Banned

func (r *UserResolver) Banned() bool

func (*UserResolver) Bans

func (r *UserResolver) Bans() (*[]*banResolver, error)

func (*UserResolver) Broadcast

func (r *UserResolver) Broadcast() (*datastructure.Broadcast, error)

Get user's live broadcast, if any

func (*UserResolver) BroadcasterType

func (r *UserResolver) BroadcasterType() string

func (*UserResolver) Cosmetics

func (r *UserResolver) Cosmetics(ctx context.Context) []*cosmeticResolver

func (*UserResolver) CreatedAt

func (r *UserResolver) CreatedAt() string

func (*UserResolver) Description

func (r *UserResolver) Description() string

func (*UserResolver) DisplayName

func (r *UserResolver) DisplayName() string

func (*UserResolver) EditorIDs

func (r *UserResolver) EditorIDs() []string

func (*UserResolver) EditorIn

func (r *UserResolver) EditorIn() ([]*UserResolver, error)

func (*UserResolver) Editors

func (r *UserResolver) Editors() ([]*UserResolver, error)

func (*UserResolver) Email

func (r *UserResolver) Email() *string

func (*UserResolver) EmoteAliases

func (r *UserResolver) EmoteAliases() [][]string

func (*UserResolver) EmoteIDs

func (r *UserResolver) EmoteIDs() []string

func (*UserResolver) EmoteSlots

func (r *UserResolver) EmoteSlots() int32

func (*UserResolver) Emotes

func (r *UserResolver) Emotes() ([]*EmoteResolver, error)

func (*UserResolver) FollowerCount

func (r *UserResolver) FollowerCount() int32

Get user's folloer count

func (*UserResolver) ID

func (r *UserResolver) ID() string

func (*UserResolver) Login

func (r *UserResolver) Login() string

func (*UserResolver) NotificationCount

func (r *UserResolver) NotificationCount() int32

func (*UserResolver) Notifications

func (r *UserResolver) Notifications() ([]*NotificationResolver, error)

func (*UserResolver) OwnedEmotes

func (r *UserResolver) OwnedEmotes() ([]*EmoteResolver, error)

func (*UserResolver) ProfileImageURL

func (r *UserResolver) ProfileImageURL() string

func (*UserResolver) Rank

func (r *UserResolver) Rank() int32

func (*UserResolver) Reports

func (r *UserResolver) Reports() (*[]*reportResolver, error)

func (*UserResolver) Role

func (r *UserResolver) Role() (*RoleResolver, error)

func (*UserResolver) ThirdPartyEmotes

func (r *UserResolver) ThirdPartyEmotes() ([]*EmoteResolver, error)

func (*UserResolver) TwitchID

func (r *UserResolver) TwitchID() string

func (*UserResolver) YouTubeID

func (r *UserResolver) YouTubeID() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL