api

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2025 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartHTTPProxy

func StartHTTPProxy(ctx context.Context, cfg Config) error

Types

type Authorizer

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

func NewAuthorizer

func NewAuthorizer(configDir string) *Authorizer

func (*Authorizer) Load

func (a *Authorizer) Load() error

type Config

type Config struct {
	ConfigDir     string
	APIAddress    string
	APIPort       string
	APITLSEnabled bool
	APITLSCert    string
	APITLSKey     string
}

type Htpasswd

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

func NewHtpasswd

func NewHtpasswd() Htpasswd

func (*Htpasswd) Get

func (h *Htpasswd) Get(user string) (string, error)

type ParsedAuthConfig

type ParsedAuthConfig struct {
	Users map[User][]Role
	Roles map[string]Permissions
}

type Permission

type Permission struct {
	Resource string `yaml:"resource"`
	Action   string `yaml:"action"`
}

func (*Permission) Match

func (p *Permission) Match(resource, action string) bool

type Permissions

type Permissions struct {
	Endpoints []Permission
	Tasks     []Permission
}

type Role

type Role string

type User

type User string

Jump to

Keyboard shortcuts

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