role

package
v1.37.1 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Query

Types

type Role

type Role struct {
	mixin.Model[Role]

	Name string `json:"name"`

	// Permissions stored as JSON in datastore
	Permissions  []string `json:"permissions" datastore:"-" orm:"default:[]"`
	Permissions_ string   `json:"-" datastore:",noindex"`

	// Arbitrary metadata
	Metadata  Map    `json:"metadata,omitempty" datastore:"-" orm:"default:{}"`
	Metadata_ string `json:"-" datastore:",noindex"`
}

func New

func New(db *datastore.Datastore) *Role

func (*Role) Load

func (r *Role) Load(ps []datastore.Property) (err error)

func (*Role) Save

func (r *Role) Save() ([]datastore.Property, error)

Jump to

Keyboard shortcuts

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