access

package
v3.1.2+incompatible Latest Latest
Warning

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

Go to latest
Published: May 28, 2018 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Access

type Access struct {
	User      string      `json:"user"`
	Namespace string      `json:"namespace"`
	Access    AccessLevel `json:"access"`
}

func (Access) RenderTable

func (access Access) RenderTable() string

func (Access) TableHeaders

func (Access) TableHeaders() []string

func (Access) TableRows

func (access Access) TableRows() [][]string

type AccessLevel

type AccessLevel string
const (
	Owner      AccessLevel = "owner"
	Write      AccessLevel = "write"
	ReadDelete AccessLevel = "read-delete"
	Read       AccessLevel = "read"
	None       AccessLevel = ""

	ErrInvalidAccessLevel chkitErrors.Err = "invalid access level"
)

func LevelFromString

func LevelFromString(str string) (AccessLevel, error)

func Levels

func Levels() []AccessLevel

func (AccessLevel) MarshalText

func (lvl AccessLevel) MarshalText() ([]byte, error)

func (AccessLevel) String

func (lvl AccessLevel) String() string

func (*AccessLevel) UnmarshalText

func (lvl *AccessLevel) UnmarshalText(p []byte) error

type AccessList

type AccessList []Access

func AccessFromNamespace

func AccessFromNamespace(namespace permModel.NamespaceWithPermissionsJSON) AccessList

func (AccessList) RenderTable

func (list AccessList) RenderTable() string

func (AccessList) TableHeaders

func (AccessList) TableHeaders() []string

func (AccessList) TableRows

func (list AccessList) TableRows() [][]string

Jump to

Keyboard shortcuts

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