permissions

package
v0.97.3 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Code generated by extract_actions. DO NOT EDIT.

Index

Constants

View Source
const (
	ReadRepositoryAction     = "fs:ReadRepository"
	CreateRepositoryAction   = "fs:CreateRepository"
	AttachStorageNamespace   = "fs:AttachStorageNamespace"
	ImportFromStorage        = "fs:ImportFromStorage"
	DeleteRepositoryAction   = "fs:DeleteRepository"
	ListRepositoriesAction   = "fs:ListRepositories"
	ReadObjectAction         = "fs:ReadObject"
	WriteObjectAction        = "fs:WriteObject"
	DeleteObjectAction       = "fs:DeleteObject"
	ListObjectsAction        = "fs:ListObjects"
	CreateCommitAction       = "fs:CreateCommit"
	CreateMetaRangeAction    = "fs:CreateMetaRange"
	ReadCommitAction         = "fs:ReadCommit"
	ListCommitsAction        = "fs:ListCommits"
	CreateBranchAction       = "fs:CreateBranch"
	DeleteBranchAction       = "fs:DeleteBranch"
	ReadBranchAction         = "fs:ReadBranch"
	RevertBranchAction       = "fs:RevertBranch"
	ListBranchesAction       = "fs:ListBranches"
	CreateTagAction          = "fs:CreateTag"
	DeleteTagAction          = "fs:DeleteTag"
	ReadTagAction            = "fs:ReadTag"
	ListTagsAction           = "fs:ListTags"
	ReadStorageConfiguration = "fs:ReadConfig"

	ReadUserAction          = "auth:ReadUser"
	CreateUserAction        = "auth:CreateUser"
	DeleteUserAction        = "auth:DeleteUser"
	ListUsersAction         = "auth:ListUsers"
	ReadGroupAction         = "auth:ReadGroup"
	CreateGroupAction       = "auth:CreateGroup"
	DeleteGroupAction       = "auth:DeleteGroup"
	ListGroupsAction        = "auth:ListGroups"
	AddGroupMemberAction    = "auth:AddGroupMember"
	RemoveGroupMemberAction = "auth:RemoveGroupMember"
	ReadPolicyAction        = "auth:ReadPolicy"
	CreatePolicyAction      = "auth:CreatePolicy"
	UpdatePolicyAction      = "auth:UpdatePolicy"
	DeletePolicyAction      = "auth:DeletePolicy"
	ListPoliciesAction      = "auth:ListPolicies"
	AttachPolicyAction      = "auth:AttachPolicy"
	DetachPolicyAction      = "auth:DetachPolicy"
	ReadCredentialsAction   = "auth:ReadCredentials"   //nolint:gosec
	CreateCredentialsAction = "auth:CreateCredentials" //nolint:gosec
	DeleteCredentialsAction = "auth:DeleteCredentials" //nolint:gosec
	ListCredentialsAction   = "auth:ListCredentials"   //nolint:gosec

	ReadActionsAction = "ci:ReadAction"

	PrepareGarbageCollectionCommitsAction     = "retention:PrepareGarbageCollectionCommits"
	GetGarbageCollectionRulesAction           = "retention:GetGarbageCollectionRules"
	SetGarbageCollectionRulesAction           = "retention:SetGarbageCollectionRules"
	PrepareGarbageCollectionUncommittedAction = "retention:PrepareGarbageCollectionUncommitted"

	GetBranchProtectionRulesAction = "branches:GetBranchProtectionRules"
	SetBranchProtectionRulesAction = "branches:SetBranchProtectionRules"
)
View Source
const (
	All = "*"
)

Variables

View Source
var (
	ErrInvalidAction      = errors.New("invalid action")
	ErrInvalidServiceName = errors.New("invalid service name")
)
View Source
var Actions = []string{
	"fs:ReadRepository",
	"fs:CreateRepository",
	"fs:AttachStorageNamespace",
	"fs:ImportFromStorage",
	"fs:DeleteRepository",
	"fs:ListRepositories",
	"fs:ReadObject",
	"fs:WriteObject",
	"fs:DeleteObject",
	"fs:ListObjects",
	"fs:CreateCommit",
	"fs:CreateMetaRange",
	"fs:ReadCommit",
	"fs:ListCommits",
	"fs:CreateBranch",
	"fs:DeleteBranch",
	"fs:ReadBranch",
	"fs:RevertBranch",
	"fs:ListBranches",
	"fs:CreateTag",
	"fs:DeleteTag",
	"fs:ReadTag",
	"fs:ListTags",
	"fs:ReadConfig",
	"auth:ReadUser",
	"auth:CreateUser",
	"auth:DeleteUser",
	"auth:ListUsers",
	"auth:ReadGroup",
	"auth:CreateGroup",
	"auth:DeleteGroup",
	"auth:ListGroups",
	"auth:AddGroupMember",
	"auth:RemoveGroupMember",
	"auth:ReadPolicy",
	"auth:CreatePolicy",
	"auth:UpdatePolicy",
	"auth:DeletePolicy",
	"auth:ListPolicies",
	"auth:AttachPolicy",
	"auth:DetachPolicy",
	"auth:ReadCredentials",
	"auth:CreateCredentials",
	"auth:DeleteCredentials",
	"auth:ListCredentials",
	"ci:ReadAction",
	"retention:PrepareGarbageCollectionCommits",
	"retention:GetGarbageCollectionRules",
	"retention:SetGarbageCollectionRules",
	"retention:PrepareGarbageCollectionUncommitted",
	"branches:GetBranchProtectionRules",
	"branches:SetBranchProtectionRules",
}

Functions

func BranchArn

func BranchArn(repoID, branchID string) string

func GroupArn

func GroupArn(groupID string) string

func IsValidAction

func IsValidAction(name string) error

func ObjectArn

func ObjectArn(repoID, key string) string

func PolicyArn

func PolicyArn(policyID string) string

func RepoArn

func RepoArn(repoID string) string

func StorageNamespace added in v0.51.0

func StorageNamespace(namespace string) string

func TagArn

func TagArn(repoID, tagID string) string

func TemplateArn added in v0.69.0

func TemplateArn(templateID string) string

func UserArn

func UserArn(userID string) string

Types

type Node added in v0.54.0

type Node struct {
	Type       NodeType
	Permission Permission
	Nodes      []Node
}

type NodeType added in v0.54.0

type NodeType int
const (
	NodeTypeNode NodeType = iota
	NodeTypeOr
	NodeTypeAnd
)

type Permission

type Permission struct {
	Action   string
	Resource string
}

Jump to

Keyboard shortcuts

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