gitops

package
v12.0.403 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package gitops provides functionality to manage RBAC configuration via a Git repository.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpdateRBACRepo

func UpdateRBACRepo(username, email, firstName, lastName, orgName string) (string, error)

UpdateRBACRepo clones the remote repo, adds the new user/org, and pushes changes.

Types

type Config

type Config struct {
	Orgs  []Org  `yaml:"orgs,omitempty"`
	Users []User `yaml:"users"`
	Roles []Role `yaml:"roles,omitempty"`
}

Config represents the local structure for RBAC YAML parsing.

type Member

type Member struct {
	Username string `yaml:"username"`
	Role     string `yaml:"role"`
}

Member represents a user member of an organization.

type Org

type Org struct {
	Name        string            `yaml:"name"`
	DisplayName string            `yaml:"display_name,omitempty"`
	Description string            `yaml:"description,omitempty"`
	Metadata    map[string]string `yaml:"metadata,omitempty"`
	Members     []Member          `yaml:"members,omitempty"`
}

Org represents an organization structure in the YAML config.

type Role

type Role struct {
	Name        string   `yaml:"name"`
	Description string   `yaml:"description,omitempty"`
	Permissions []string `yaml:"permissions,omitempty"`
}

Role represents a role definition structure.

type User

type User struct {
	Username     string `yaml:"username"`
	Email        string `yaml:"email"`
	AuthProvider string `yaml:"auth_provider,omitempty"`
}

User represents a user identity structure.

Jump to

Keyboard shortcuts

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