Documentation ¶
Overview ¶
Code generated by go generate; DO NOT EDIT.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PermissionStrings = map[Permission]string{ Api: "api", ReadUser: "read_user", ReadApi: "read_api", ReadRepository: "read_repository", WriteRepository: "write_repository", ReadRegistry: "read_registry", WriteRegistry: "write_registry", Sudo: "sudo", AdminMode: "admin_mode", CreateRunner: "create_runner", ManageRunner: "manage_runner", AiFeatures: "ai_features", K8sProxy: "k8s_proxy", ReadServicePing: "read_service_ping", } StringToPermission = map[string]Permission{ "api": Api, "read_user": ReadUser, "read_api": ReadApi, "read_repository": ReadRepository, "write_repository": WriteRepository, "read_registry": ReadRegistry, "write_registry": WriteRegistry, "sudo": Sudo, "admin_mode": AdminMode, "create_runner": CreateRunner, "manage_runner": ManageRunner, "ai_features": AiFeatures, "k8s_proxy": K8sProxy, "read_service_ping": ReadServicePing, } PermissionIDs = map[Permission]int{ Api: 1, ReadUser: 2, ReadApi: 3, ReadRepository: 4, WriteRepository: 5, ReadRegistry: 6, WriteRegistry: 7, Sudo: 8, AdminMode: 9, CreateRunner: 10, ManageRunner: 11, AiFeatures: 12, K8sProxy: 13, ReadServicePing: 14, } IdToPermission = map[int]Permission{ 1: Api, 2: ReadUser, 3: ReadApi, 4: ReadRepository, 5: WriteRepository, 6: ReadRegistry, 7: WriteRegistry, 8: Sudo, 9: AdminMode, 10: CreateRunner, 11: ManageRunner, 12: AiFeatures, 13: K8sProxy, 14: ReadServicePing, } )
Functions ¶
func AnalyzeAndPrintPermissions ¶ added in v3.80.5
Types ¶
type AccessTokenJSON ¶ added in v3.80.5
type Analyzer ¶ added in v3.80.5
func (Analyzer) Type ¶ added in v3.80.5
func (Analyzer) Type() analyzers.AnalyzerType
type MetadataJSON ¶
type Permission ¶ added in v3.83.0
type Permission int
const ( Invalid Permission = iota Api Permission = iota ReadUser Permission = iota ReadApi Permission = iota ReadRepository Permission = iota WriteRepository Permission = iota ReadRegistry Permission = iota WriteRegistry Permission = iota Sudo Permission = iota AdminMode Permission = iota CreateRunner Permission = iota ManageRunner Permission = iota AiFeatures Permission = iota K8sProxy Permission = iota ReadServicePing Permission = iota )
func PermissionFromID ¶ added in v3.83.0
func PermissionFromID(id int) (Permission, error)
PermissionFromID converts an ID to its Permission enum
func PermissionFromString ¶ added in v3.83.0
func PermissionFromString(s string) (Permission, error)
PermissionFromString converts a string representation to its Permission enum
func (Permission) ToID ¶ added in v3.83.0
func (p Permission) ToID() (int, error)
ToID converts a Permission enum to its ID
func (Permission) ToString ¶ added in v3.83.0
func (p Permission) ToString() (string, error)
ToString converts a Permission enum to its string representation
type ProjectsJSON ¶
type SecretInfo ¶ added in v3.80.5
type SecretInfo struct { AccessToken AccessTokenJSON Metadata MetadataJSON Projects []ProjectsJSON }
func AnalyzePermissions ¶
func AnalyzePermissions(cfg *config.Config, key string) (*SecretInfo, error)
Click to show internal directories.
Click to hide internal directories.