channelroleperm

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelRolePerm

type ChannelRolePerm interface {
	GetChannelRolePermission(ctx context.Context, channelId, roleId int64) (model.ChannelRolesPermission, error)
	GetChannelRolePermissions(ctx context.Context, channelId int64) ([]model.ChannelRolesPermission, error)
	SetChannelRolePermission(ctx context.Context, channelId, roleId, accept, deny int64) error
	UpdateChannelRolePermission(ctx context.Context, channelId, roleId, accept, deny int64) error
	RemoveChannelRolePermission(ctx context.Context, channelId, roleId int64) error
	GetChannelRolesBulk(ctx context.Context, channelIds []int64) ([]model.ChannelRoles, error)
}

func New

func New(c *sqlx.DB) ChannelRolePerm

type Entity

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

func (*Entity) GetChannelRolePermission

func (e *Entity) GetChannelRolePermission(ctx context.Context, channelId, roleId int64) (model.ChannelRolesPermission, error)

func (*Entity) GetChannelRolePermissions

func (e *Entity) GetChannelRolePermissions(ctx context.Context, channelId int64) ([]model.ChannelRolesPermission, error)

func (*Entity) GetChannelRolesBulk added in v1.4.0

func (e *Entity) GetChannelRolesBulk(ctx context.Context, channelIDs []int64) ([]model.ChannelRoles, error)

func (*Entity) RemoveChannelRolePermission

func (e *Entity) RemoveChannelRolePermission(ctx context.Context, channelId, roleId int64) error

func (*Entity) SetChannelRolePermission

func (e *Entity) SetChannelRolePermission(ctx context.Context, channelId, roleId, accept, deny int64) error

func (*Entity) UpdateChannelRolePermission

func (e *Entity) UpdateChannelRolePermission(ctx context.Context, channelId, roleId, accept, deny int64) error

Jump to

Keyboard shortcuts

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