Documentation ¶
Index ¶
- Constants
- type CreateBanOptions
- type DeleteEmoteOptions
- type DeleteUserOptions
- type EditBanOptions
- type EmoteEditOptions
- type EmoteSetMutationOptions
- type EmoteSetMutationSetEmoteItem
- type EmoteSetMutationSetEmoteOptions
- type InstanceOptions
- type MergeEmoteOptions
- type MessageReadStateOptions
- type MessageReadStateResponse
- type Mutate
- func (m *Mutate) CreateBan(ctx context.Context, bb *structures.BanBuilder, opt CreateBanOptions) error
- func (m *Mutate) CreateEmoteSet(ctx context.Context, esb *structures.EmoteSetBuilder, ...) error
- func (m *Mutate) CreateRole(ctx context.Context, rb *structures.RoleBuilder, opt RoleMutationOptions) error
- func (m *Mutate) DeleteEmote(ctx context.Context, eb *structures.EmoteBuilder, opt DeleteEmoteOptions) error
- func (m *Mutate) DeleteEmoteSet(ctx context.Context, esb *structures.EmoteSetBuilder, ...) error
- func (m *Mutate) DeleteRole(ctx context.Context, rb *structures.RoleBuilder, opt RoleMutationOptions) error
- func (m *Mutate) DeleteUser(ctx context.Context, opt DeleteUserOptions) (int, error)
- func (m *Mutate) EditBan(ctx context.Context, bb *structures.BanBuilder, opt EditBanOptions) error
- func (m *Mutate) EditEmote(ctx context.Context, eb *structures.EmoteBuilder, opt EmoteEditOptions) error
- func (m *Mutate) EditEmotesInSet(ctx context.Context, esb *structures.EmoteSetBuilder, ...) error
- func (m *Mutate) EditRole(ctx context.Context, rb *structures.RoleBuilder, opt RoleEditOptions) error
- func (m *Mutate) MergeEmote(ctx context.Context, eb *structures.EmoteBuilder, opt MergeEmoteOptions) error
- func (m *Mutate) ModifyUserEditors(ctx context.Context, ub *structures.UserBuilder, opt UserEditorsOptions) error
- func (m *Mutate) SendInboxMessage(ctx context.Context, ...) error
- func (m *Mutate) SendModRequestMessage(ctx context.Context, ...) error
- func (m *Mutate) SetMessageReadStates(ctx context.Context, mb *structures.MessageBuilder[bson.Raw], read bool, ...) (*MessageReadStateResponse, error)
- func (m *Mutate) SetRole(ctx context.Context, ub *structures.UserBuilder, opt SetUserRoleOptions) error
- func (m *Mutate) SetUserConnectionActiveEmoteSet(ctx context.Context, ub *structures.UserBuilder, opt SetUserActiveEmoteSet) error
- func (m *Mutate) TransferUserConnection(ctx context.Context, actor structures.User, ...) error
- func (m *Mutate) UpdateEmoteSet(ctx context.Context, esb *structures.EmoteSetBuilder, ...) error
- type RoleEditOptions
- type RoleMutationOptions
- type SendInboxMessageOptions
- type SetUserActiveEmoteSet
- type SetUserRoleOptions
- type UserEditorsOptions
Constants ¶
View Source
const ( EMOTE_SET_PERSONAL_MIN_EMOTE_LIFETIME = time.Hour EMOTE_SET_PERSONAL_MIN_CHANNEL_COUNT int32 = 50 )
View Source
const EDITORS_MOST_COUNT = 15
View Source
const EMOTE_CLAIMANTS_MOST = 10
View Source
const MAXIMUM_ALLOWED_EMOTE_SETS = 10
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateBanOptions ¶
type DeleteEmoteOptions ¶
type DeleteEmoteOptions struct { Actor structures.User // If true, this is a un-delete operation Undo bool // If specified, only this version will be deleted // // by default, all versions will be deleted VersionID primitive.ObjectID // The reason given for the deletion: will appear in audit logs Reason string // If set, the emote will be given an instruction to be replaced with the specified emote ReplaceID primitive.ObjectID SkipValidation bool }
type DeleteUserOptions ¶
type DeleteUserOptions struct { Actor structures.User Victim structures.User }
type EditBanOptions ¶
type EditBanOptions struct { Actor *structures.User SkipValidation bool }
type EmoteEditOptions ¶
type EmoteEditOptions struct { Actor structures.User SkipValidation bool }
type EmoteSetMutationOptions ¶
type EmoteSetMutationOptions struct { Actor structures.User SkipValidation bool }
type EmoteSetMutationSetEmoteOptions ¶
type EmoteSetMutationSetEmoteOptions struct { Actor structures.User Emotes []EmoteSetMutationSetEmoteItem Channels []primitive.ObjectID }
type InstanceOptions ¶
type MergeEmoteOptions ¶
type MergeEmoteOptions struct { Actor structures.User NewEmote structures.Emote // If specified, only this version will be merged // // by default, the latest version will be merged VersionID primitive.ObjectID // The reason given for the merger: will appear in audit logs Reason string SkipValidation bool }
type MessageReadStateOptions ¶
type Mutate ¶
type Mutate struct {
// contains filtered or unexported fields
}
func New ¶
func New(opt InstanceOptions) *Mutate
func (*Mutate) CreateBan ¶
func (m *Mutate) CreateBan(ctx context.Context, bb *structures.BanBuilder, opt CreateBanOptions) error
func (*Mutate) CreateEmoteSet ¶
func (m *Mutate) CreateEmoteSet(ctx context.Context, esb *structures.EmoteSetBuilder, opt EmoteSetMutationOptions) error
Create: create the new emote set
func (*Mutate) CreateRole ¶
func (m *Mutate) CreateRole(ctx context.Context, rb *structures.RoleBuilder, opt RoleMutationOptions) error
Create: create the new role
func (*Mutate) DeleteEmote ¶
func (m *Mutate) DeleteEmote(ctx context.Context, eb *structures.EmoteBuilder, opt DeleteEmoteOptions) error
func (*Mutate) DeleteEmoteSet ¶
func (m *Mutate) DeleteEmoteSet(ctx context.Context, esb *structures.EmoteSetBuilder, opt EmoteSetMutationOptions) error
func (*Mutate) DeleteRole ¶
func (m *Mutate) DeleteRole(ctx context.Context, rb *structures.RoleBuilder, opt RoleMutationOptions) error
Delete: delete the role
func (*Mutate) DeleteUser ¶
func (*Mutate) EditBan ¶
func (m *Mutate) EditBan(ctx context.Context, bb *structures.BanBuilder, opt EditBanOptions) error
func (*Mutate) EditEmote ¶
func (m *Mutate) EditEmote(ctx context.Context, eb *structures.EmoteBuilder, opt EmoteEditOptions) error
Edit: edit the emote. Modify the EmoteBuilder beforehand!
To account for editor permissions, the "editor_of" relation should be included in the actor's data
func (*Mutate) EditEmotesInSet ¶
func (m *Mutate) EditEmotesInSet(ctx context.Context, esb *structures.EmoteSetBuilder, opt EmoteSetMutationSetEmoteOptions) error
SetEmote: enable, edit or disable active emotes in the set
func (*Mutate) EditRole ¶
func (m *Mutate) EditRole(ctx context.Context, rb *structures.RoleBuilder, opt RoleEditOptions) error
Edit: edit the role. Modify the RoleBuilder beforehand!
func (*Mutate) MergeEmote ¶
func (m *Mutate) MergeEmote(ctx context.Context, eb *structures.EmoteBuilder, opt MergeEmoteOptions) error
func (*Mutate) ModifyUserEditors ¶
func (m *Mutate) ModifyUserEditors(ctx context.Context, ub *structures.UserBuilder, opt UserEditorsOptions) error
func (*Mutate) SendInboxMessage ¶
func (m *Mutate) SendInboxMessage(ctx context.Context, mb *structures.MessageBuilder[structures.MessageDataInbox], opt SendInboxMessageOptions) error
func (*Mutate) SendModRequestMessage ¶
func (*Mutate) SetMessageReadStates ¶
func (m *Mutate) SetMessageReadStates(ctx context.Context, mb *structures.MessageBuilder[bson.Raw], read bool, opt MessageReadStateOptions) (*MessageReadStateResponse, error)
func (*Mutate) SetRole ¶
func (m *Mutate) SetRole(ctx context.Context, ub *structures.UserBuilder, opt SetUserRoleOptions) error
SetRole: add or remove a role for the user
func (*Mutate) SetUserConnectionActiveEmoteSet ¶
func (m *Mutate) SetUserConnectionActiveEmoteSet(ctx context.Context, ub *structures.UserBuilder, opt SetUserActiveEmoteSet) error
func (*Mutate) TransferUserConnection ¶
func (*Mutate) UpdateEmoteSet ¶
func (m *Mutate) UpdateEmoteSet(ctx context.Context, esb *structures.EmoteSetBuilder, opt EmoteSetMutationOptions) error
type RoleEditOptions ¶
type RoleEditOptions struct { Actor *structures.User OriginalPosition int32 }
type RoleMutationOptions ¶
type RoleMutationOptions struct {
Actor *structures.User
}
type SendInboxMessageOptions ¶
type SetUserActiveEmoteSet ¶
type SetUserRoleOptions ¶
type SetUserRoleOptions struct { Role structures.Role Actor structures.User Action structures.ListItemAction }
type UserEditorsOptions ¶
type UserEditorsOptions struct { Actor *structures.User Editor *structures.User EditorPermissions structures.UserEditorPermission EditorVisible bool Action structures.ListItemAction }
Source Files ¶
- ban.mutation.go
- emote.delete.go
- emote.merge.go
- emote.mutation.go
- emote_set.active_emote.mutation.go
- emote_set.create.mutation.go
- emote_set.delete.mutation.go
- emote_set.edit.mutation.go
- message.inbox.go
- message.mod_request.go
- message.mutation.go
- mutations.go
- role.mutation.go
- user.active_emote_set.mutation.go
- user.delete.mutation.go
- user.editors.mutation.go
- user.set_role.mutation.go
- user.transfer-user-connection.mutation.go
Click to show internal directories.
Click to hide internal directories.