Documentation
¶
Index ¶
- type Entity
- func (e *Entity) CreateRole(ctx context.Context, id, guildId int64, name string, color int, ...) error
- func (e *Entity) GetGuildRoles(ctx context.Context, guildId int64) ([]model.Role, error)
- func (e *Entity) GetRoleByID(ctx context.Context, id int64) (model.Role, error)
- func (e *Entity) GetRolesBulk(ctx context.Context, guildID int64, ids []int64) ([]model.Role, error)
- func (e *Entity) RemoveRole(ctx context.Context, id int64) error
- func (e *Entity) SetRoleColor(ctx context.Context, id int64, color int) error
- func (e *Entity) SetRoleHoist(ctx context.Context, id int64, hoist bool) error
- func (e *Entity) SetRoleName(ctx context.Context, id int64, name string) error
- func (e *Entity) SetRolePermissions(ctx context.Context, id int64, permissions int64) error
- func (e *Entity) SetRolePosition(ctx context.Context, updates []model.RoleUpdatePosition) (err error)
- type Role
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entity ¶
type Entity struct {
// contains filtered or unexported fields
}
func (*Entity) CreateRole ¶
func (*Entity) GetGuildRoles ¶
func (*Entity) GetRoleByID ¶
func (*Entity) GetRolesBulk ¶
func (*Entity) SetRoleColor ¶
func (*Entity) SetRoleHoist ¶ added in v1.14.0
func (*Entity) SetRoleName ¶
func (*Entity) SetRolePermissions ¶
func (*Entity) SetRolePosition ¶ added in v1.7.0
type Role ¶
type Role interface {
GetRoleByID(ctx context.Context, id int64) (model.Role, error)
GetGuildRoles(ctx context.Context, guildId int64) ([]model.Role, error)
GetRolesBulk(ctx context.Context, guildID int64, ids []int64) ([]model.Role, error)
CreateRole(ctx context.Context, id, guildId int64, name string, color int, permissions int64, hoist bool) error
RemoveRole(ctx context.Context, id int64) error
SetRoleColor(ctx context.Context, id int64, color int) error
SetRoleName(ctx context.Context, id int64, name string) error
SetRolePermissions(ctx context.Context, id int64, permissions int64) error
SetRoleHoist(ctx context.Context, id int64, hoist bool) error
SetRolePosition(ctx context.Context, updates []model.RoleUpdatePosition) error
}
Click to show internal directories.
Click to hide internal directories.