epinio

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Actions = []string{
	"namespace",
	"namespace_read",
	"namespace_write",
	"app",
	"app_read",
	"app_write",
	"app_logs",
	"app_exec",
	"app_portforward",
	"configuration",
	"configuration_read",
	"configuration_write",
	"service",
	"service_read",
	"service_write",
	"service_portforward",
	"gitconfig",
	"gitconfig_read",
	"gitconfig_write",
	"export_registries_read",
}
View Source
var ErrUserNotFound error = errors.New("user not found")

Functions

This section is empty.

Types

type KubeClient

type KubeClient struct {
	// contains filtered or unexported fields
}

func NewKubeClient

func NewKubeClient(kubeClient kubernetes.Interface) (k *KubeClient)

func (*KubeClient) CreateRole

func (k *KubeClient) CreateRole(ctx context.Context, role Role) error

func (*KubeClient) CreateUser

func (k *KubeClient) CreateUser(ctx context.Context, user User) error

func (*KubeClient) GetUser

func (k *KubeClient) GetUser(ctx context.Context, username string) (User, error)

func (*KubeClient) ListNamespaces

func (k *KubeClient) ListNamespaces(ctx context.Context) ([]string, error)

func (*KubeClient) ListRoles

func (k *KubeClient) ListRoles(ctx context.Context) ([]Role, error)

func (*KubeClient) ListUsers

func (k *KubeClient) ListUsers(ctx context.Context) ([]User, error)

func (*KubeClient) UpdateUser

func (k *KubeClient) UpdateUser(ctx context.Context, user User) error

type Role

type Role struct {
	ID      string
	Default bool
	Name    string
	Actions []string
}

func (Role) GetID

func (r Role) GetID() string

type User

type User struct {
	Username   string `yaml:"username"`
	Password   string
	Namespaces []string
	Role       string
	Roles      []string
	// contains filtered or unexported fields
}

func NewUser

func NewUser(secretName string) User

func (User) GetID

func (u User) GetID() string

func (User) SecretName

func (u User) SecretName() string

Directories

Path Synopsis
internal
names
Package names collects functions encapsulating the rules for constructing a variety of kube resource names
Package names collects functions encapsulating the rules for constructing a variety of kube resource names

Jump to

Keyboard shortcuts

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