permissions

package
v0.0.0-...-12bf87c Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2023 License: MPL-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const Admin = "admin"
View Source
const Editor = "editor"
View Source
const Nobody = "nobody"
View Source
const Viewer = "viewer"

Variables

View Source
var RoleNames = []string{Admin, Editor, Viewer, Nobody}

Functions

This section is empty.

Types

type AdminRole

type AdminRole struct{}

func (*AdminRole) DomainRead

func (role *AdminRole) DomainRead() bool

domains

func (*AdminRole) DomainWrite

func (role *AdminRole) DomainWrite() bool

func (*AdminRole) LinksRead

func (role *AdminRole) LinksRead() bool

links

func (*AdminRole) LinksWrite

func (role *AdminRole) LinksWrite() bool

func (*AdminRole) UsersRead

func (role *AdminRole) UsersRead() bool

users

func (*AdminRole) UsersWrite

func (role *AdminRole) UsersWrite() bool

type EditorRole

type EditorRole struct{}

func (*EditorRole) DomainRead

func (role *EditorRole) DomainRead() bool

domains

func (*EditorRole) DomainWrite

func (role *EditorRole) DomainWrite() bool

func (*EditorRole) LinksRead

func (role *EditorRole) LinksRead() bool

links

func (*EditorRole) LinksWrite

func (role *EditorRole) LinksWrite() bool

func (*EditorRole) UsersRead

func (role *EditorRole) UsersRead() bool

users

func (*EditorRole) UsersWrite

func (role *EditorRole) UsersWrite() bool

type NobodyRole

type NobodyRole struct{}

func (*NobodyRole) DomainRead

func (role *NobodyRole) DomainRead() bool

domains

func (*NobodyRole) DomainWrite

func (role *NobodyRole) DomainWrite() bool

func (*NobodyRole) LinksRead

func (role *NobodyRole) LinksRead() bool

links

func (*NobodyRole) LinksWrite

func (role *NobodyRole) LinksWrite() bool

func (*NobodyRole) UsersRead

func (role *NobodyRole) UsersRead() bool

users

func (*NobodyRole) UsersWrite

func (role *NobodyRole) UsersWrite() bool

type Role

type Role interface {
	// domain
	DomainRead() bool
	DomainWrite() bool

	// users
	UsersRead() bool
	UsersWrite() bool

	// links
	LinksRead() bool
	LinksWrite() bool
}

type ViewerRole

type ViewerRole struct{}

func (*ViewerRole) DomainRead

func (role *ViewerRole) DomainRead() bool

domains

func (*ViewerRole) DomainWrite

func (role *ViewerRole) DomainWrite() bool

func (*ViewerRole) LinksRead

func (role *ViewerRole) LinksRead() bool

links

func (*ViewerRole) LinksWrite

func (role *ViewerRole) LinksWrite() bool

func (*ViewerRole) UsersRead

func (role *ViewerRole) UsersRead() bool

users

func (*ViewerRole) UsersWrite

func (role *ViewerRole) UsersWrite() bool

Jump to

Keyboard shortcuts

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