permissions

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	Id   int64  `json:"id"`
	Slug string `json:"slug"`
}

type ContainerChain

type ContainerChain []ContainerItem

type ContainerItem

type ContainerItem struct {
	Slug string
	Id   int64
}

type Permission

type Permission struct {
	Name          string
	ContainerName string
}

type PermissionListImpl

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

func (*PermissionListImpl) GetRoles

func (p *PermissionListImpl) GetRoles(permissionKey string) []int64

func (*PermissionListImpl) ToString

func (p *PermissionListImpl) ToString() string

type Role

type Role struct {
	Id          int64     `json:"id"`
	Name        string    `json:"name"`
	Label       string    `json:"label"`
	CreatedAt   string    `json:"created_at"`
	UpdatedAt   string    `json:"updated_at"`
	ContainerId int64     `json:"container_id"`
	Container   Container `json:"container"`
	Pivot       RolePivot `json:"pivot"`
}

type RolePivot

type RolePivot struct {
	UserId          int64       `json:"user_id"`
	RoleId          int64       `json:"role_id"`
	Option          interface{} `json:"option"`
	ContainerItemId int64       `json:"container_item_id"`
}

type RoleSystem

type RoleSystem interface {
	GetRoles(permissionKey string) []int64
	ToString() string
}

func NewSystemPermissions

func NewSystemPermissions(permissions RolesByPermission) RoleSystem

type RolesByPermission

type RolesByPermission map[string][]int64

Jump to

Keyboard shortcuts

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