platform

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: May 2, 2022 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllPermissions = NewPermissions()

List of all registered permissions from all the modules

Functions

func RegisterPermissions

func RegisterPermissions(name ...Permission)

Types

type Module

type Module interface {
	ID() string
	Version() string
}

module

type Permission

type Permission string

type Permissions

type Permissions []Permission

func NewPermissions

func NewPermissions() *Permissions

func (*Permissions) Can

func (t *Permissions) Can(per Permission) bool

func (*Permissions) CanAll

func (t *Permissions) CanAll(list ...Permission) bool

func (*Permissions) CanAny

func (t *Permissions) CanAny(list ...Permission) bool

func (*Permissions) Grant

func (t *Permissions) Grant(list ...Permission)

func (*Permissions) GrantAll

func (t *Permissions) GrantAll()

func (*Permissions) Revoke

func (t *Permissions) Revoke(per ...Permission)

func (*Permissions) RevokeAll

func (t *Permissions) RevokeAll()

type Service

type Service interface {
	Start() error
	Stop() error
	Setup() error
}

service that can handle HTTP requests

type ServiceModel

type ServiceModel interface {
	Create() func() error
	Migrate() func(fromVersion string) error
}

Jump to

Keyboard shortcuts

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