config

package
v0.14.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ModeAPIServer  = "api-server"
	ModeFileSystem = "file-system"
)

Variables

This section is empty.

Functions

Types

type Context

type Context struct {
	Name              string `yaml:"name"`
	ControlPlane      string `yaml:"controlplane"`          // Reference to controlplanes[].name
	Credentials       string `yaml:"credentials,omitempty"` // Reference to credentials[].name
	Namespace         string `yaml:"namespace,omitempty"`
	Project           string `yaml:"project,omitempty"`
	Component         string `yaml:"component,omitempty"`
	Environment       string `yaml:"environment,omitempty"`
	DataPlane         string `yaml:"dataPlane,omitempty"`
	Mode              string `yaml:"mode,omitempty"`              // "api-server" or "file-system"
	RootDirectoryPath string `yaml:"rootDirectoryPath,omitempty"` // Path for file-system mode
}

Context represents a single named configuration context.

type ControlPlane added in v0.3.0

type ControlPlane struct {
	Name string `yaml:"name"`
	URL  string `yaml:"url"`
}

ControlPlane defines OpenChoreo API server configuration

type Credential added in v0.11.0

type Credential struct {
	Name         string `yaml:"name"`
	ClientID     string `yaml:"clientId,omitempty"`
	ClientSecret string `yaml:"clientSecret,omitempty"`
	Token        string `yaml:"token,omitempty"`
	RefreshToken string `yaml:"refreshToken,omitempty"`
	AuthMethod   string `yaml:"authMethod,omitempty"` // "pkce" or "client_credentials"
}

Credential represents authentication credentials

type StoredConfig

type StoredConfig struct {
	CurrentContext string         `yaml:"currentContext"`
	ControlPlanes  []ControlPlane `yaml:"controlplanes"`
	Credentials    []Credential   `yaml:"credentials,omitempty"`
	Contexts       []Context      `yaml:"contexts"`
}

StoredConfig is the structure to store configuration contexts.

Jump to

Keyboard shortcuts

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