scopes

package
v3.14.1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2025 License: MIT Imports: 4 Imported by: 0 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateCommandScopes

func ValidateCommandScopes(cmd *cobra.Command, tokenScopes []string) error

func ValidateScopes

func ValidateScopes(cmdScopes CommandScopes, tokenScopes []string) error

Types

type CommandScopes

type CommandScopes struct {
	Required Scopes
}

func GetCommandScopes

func GetCommandScopes(cmd *cobra.Command) CommandScopes

type Scope

type Scope string
const (
	// Agent scopes
	ReadAgents  Scope = "read_agents"
	WriteAgents Scope = "write_agents"

	// Cluster scopes
	ReadClusters  Scope = "read_clusters"
	WriteClusters Scope = "write_clusters"

	// Team scopes
	ReadTeams  Scope = "read_teams"
	WriteTeams Scope = "write_teams"

	// Artifact scopes
	ReadArtifacts  Scope = "read_artifacts"
	WriteArtifacts Scope = "write_artifacts"

	// Build scopes
	ReadBuilds  Scope = "read_builds"
	WriteBuilds Scope = "write_builds"

	// Build logs and environment scopes
	ReadJobEnv     Scope = "read_job_env"
	ReadBuildLogs  Scope = "read_build_logs"
	WriteBuildLogs Scope = "write_build_logs"

	// Organization scopes
	ReadOrganizations Scope = "read_organizations"

	// Pipeline scopes
	ReadPipelines  Scope = "read_pipelines"
	WritePipelines Scope = "write_pipelines"

	// Pipeline template scopes
	ReadPipelineTemplates  Scope = "read_pipeline_templates"
	WritePipelineTemplates Scope = "write_pipeline_templates"

	// Rule scopes
	ReadRules  Scope = "read_rules"
	WriteRules Scope = "write_rules"

	// User scopes
	ReadUser Scope = "read_user"

	// Test suite scopes
	ReadSuites  Scope = "read_suites"
	WriteSuites Scope = "write_suites"

	// Test plan scopes
	ReadTestPlan  Scope = "read_test_plan"
	WriteTestPlan Scope = "write_test_plan"

	// Registry scopes
	ReadRegistries   Scope = "read_registries"
	WriteRegistries  Scope = "write_registries"
	DeleteRegistries Scope = "delete_registries"

	// Package scopes
	ReadPackages   Scope = "read_packages"
	WritePackages  Scope = "write_packages"
	DeletePackages Scope = "delete_packages"

	// GraphQL scope
	GraphQL Scope = "graphql"
)

type Scopes added in v3.8.0

type Scopes []Scope

Scopes is a helper class to manipulate a list of scopes.

func NewScopes added in v3.8.0

func NewScopes(scopes ...Scope) Scopes

NewScopes creates a new Scopes from the given list of scopes.

func NewScopesFromString added in v3.8.0

func NewScopesFromString(s string) Scopes

NewScopesFromString a list of scopes separated by "," from string s.

func (Scopes) String added in v3.8.0

func (scopes Scopes) String() string

String builds a string with the list of scopes joined by ",".

Jump to

Keyboard shortcuts

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