types

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2021 License: MIT Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AdminPolicy = []*PolicyDocument{
	{
		Scope: ProjectScope,
		Verbs: ReadWriteVerbGroup(),
	},
}
View Source
var DeveloperPolicy = []*PolicyDocument{
	{
		Scope: ProjectScope,
		Verbs: ReadWriteVerbGroup(),
		Children: map[PermissionScope]*PolicyDocument{
			SettingsScope: {
				Scope: SettingsScope,
				Verbs: ReadVerbGroup(),
			},
		},
	},
}
View Source
var ScopeHeirarchy = ScopeTree{
	ProjectScope: {
		ClusterScope: {
			NamespaceScope: {
				ApplicationScope: {},
			},
		},
		SettingsScope: {},
	},
}
 ScopeHeirarchy describes the scope tree:
			Project
		   /	   \
		Cluster   Settings
		/
	Namespace
       |
	 Release
View Source
var ViewerPolicy = []*PolicyDocument{
	{
		Scope: ProjectScope,
		Verbs: ReadVerbGroup(),
		Children: map[PermissionScope]*PolicyDocument{
			SettingsScope: {
				Scope: SettingsScope,
				Verbs: []APIVerb{},
			},
		},
	},
}

Functions

This section is empty.

Types

type APIVerb

type APIVerb string
const (
	APIVerbGet    APIVerb = "get"
	APIVerbCreate APIVerb = "create"
	APIVerbList   APIVerb = "list"
	APIVerbUpdate APIVerb = "update"
	APIVerbDelete APIVerb = "delete"
)

type APIVerbGroup

type APIVerbGroup []APIVerb

func ReadVerbGroup

func ReadVerbGroup() APIVerbGroup

func ReadWriteVerbGroup

func ReadWriteVerbGroup() APIVerbGroup

type NameOrUInt

type NameOrUInt struct {
	Name string `json:"name"`
	UInt uint   `json:"uint"`
}

type PermissionScope

type PermissionScope string
const (
	UserScope        PermissionScope = "user"
	ProjectScope     PermissionScope = "project"
	ClusterScope     PermissionScope = "cluster"
	NamespaceScope   PermissionScope = "namespace"
	SettingsScope    PermissionScope = "settings"
	ApplicationScope PermissionScope = "application"
)

type Policy

type Policy []*PolicyDocument

type PolicyDocument

type PolicyDocument struct {
	Scope     PermissionScope                     `json:"scope"`
	Resources []NameOrUInt                        `json:"resources"`
	Verbs     []APIVerb                           `json:"verbs"`
	Children  map[PermissionScope]*PolicyDocument `json:"children"`
}

type ScopeTree

type ScopeTree map[PermissionScope]ScopeTree

Jump to

Keyboard shortcuts

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