scopes

package
v1.45.2 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ScopeDelimiter = ":"

	TypeAPI         Type = "api"
	TypeTargetGroup Type = "targetGroup"
	TypeAccount     Type = "account"

	ResourceDeployment   Resource = "deployment"
	ResourceTenant       Resource = "tenant"
	ResourceOrganization Resource = "organization"
	ResourceAgentHub     Resource = "agentHub"
	ResourceStar         Resource = "*"

	PermissionFull Permission = "full"
)

Variables

View Source
var (
	ScopeOrganizationAdmin     = mustScope(TypeAPI, ResourceOrganization, PermissionFull)
	ScopeTenantAdmin           = mustScope(TypeAPI, ResourceTenant, PermissionFull)
	ScopeDeploymentsFullAccess = mustScope(TypeAPI, ResourceDeployment, PermissionFull)
	ScopeRemoteNetworkAgent    = mustScope(TypeAPI, ResourceAgentHub, PermissionFull)
)
View Source
var (
	ErrInvalidScope = errors.New("invalid scope")
	ErrInvalidGrant = errors.New("invalid grant")
)

Functions

func FromGrant

func FromGrant(g Grant) (string, error)

Types

type Grant

type Grant struct {
	Type       Type
	Resource   Resource
	Permission Permission
}

func GrantFromStrings

func GrantFromStrings(t, r, p string) Grant

func Parse

func Parse(scope string) (Grant, error)

type Permission

type Permission string

type Resource

type Resource string

type Type

type Type string

Jump to

Keyboard shortcuts

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