role

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

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 (e *Entity) CreateRole(ctx context.Context, id, guildId int64, name string, color int, permissions int64) error

func (*Entity) GetGuildRoles

func (e *Entity) GetGuildRoles(ctx context.Context, guildId int64) ([]model.Role, error)

func (*Entity) GetRoleByID

func (e *Entity) GetRoleByID(ctx context.Context, id int64) (model.Role, error)

func (*Entity) GetRolesBulk

func (e *Entity) GetRolesBulk(ctx context.Context, ids []int64) ([]model.Role, error)

func (*Entity) RemoveRole

func (e *Entity) RemoveRole(ctx context.Context, id int64) error

func (*Entity) SetRoleColor

func (e *Entity) SetRoleColor(ctx context.Context, id int64, color int) error

func (*Entity) SetRoleName

func (e *Entity) SetRoleName(ctx context.Context, id int64, name string) error

func (*Entity) SetRolePermissions

func (e *Entity) SetRolePermissions(ctx context.Context, id int64, permissions int64) error

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, ids []int64) ([]model.Role, error)
	CreateRole(ctx context.Context, id, guildId int64, name string, color int, permissions int64) 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
}

func New

func New(c *sqlx.DB) Role

Jump to

Keyboard shortcuts

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