perm

package
v1.22.3 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: MIT Imports: 3 Imported by: 27

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessMode

type AccessMode int

AccessMode specifies the users access mode

const (
	AccessModeNone AccessMode = iota // 0: no access

	AccessModeRead  // 1: read access
	AccessModeWrite // 2: write access
	AccessModeAdmin // 3: admin access
	AccessModeOwner // 4: owner access
)

func ParseAccessMode

func ParseAccessMode(permission string, allowed ...AccessMode) AccessMode

ParseAccessMode returns corresponding access mode to given permission string.

func (AccessMode) LogString added in v1.20.0

func (mode AccessMode) LogString() string

func (AccessMode) ToString added in v1.22.0

func (mode AccessMode) ToString() string

ToString returns the string representation of the access mode, do not make it a Stringer, otherwise it's difficult to render in templates

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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