config

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ConfigFile      string
	AlsoLogToStderr bool
	Verbose         bool
	LocalMode       bool
	ProjectID       string
	DefaultConfig   = &configv1alpha1.Config{
		DashboardURL: "https://dashboard.apoxy.dev",
		Projects: []configv1alpha1.Project{{
			APIBaseURL: "https://api.apoxy.dev",
		}},
	}
)

Functions

func ApoxyDir added in v0.2.0

func ApoxyDir() string

ApoxyDir returns the path to the Apoxy configuration directory.

func DefaultAPIClient added in v0.2.0

func DefaultAPIClient() (*rest.APIClient, error)

DefaultAPIClient returns a new Apoxy API client.

func Load

func Load() (*configv1alpha1.Config, error)

func Store

func Store(cfg *configv1alpha1.Config) error

Types

type Authenticator

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

func NewAuthenticator

func NewAuthenticator(cfg *configv1alpha1.Config) *Authenticator

func (*Authenticator) Authenticate

func (a *Authenticator) Authenticate()

func (*Authenticator) Check

func (a *Authenticator) Check() (bool, error)

type UnversionedConfig added in v0.4.1

type UnversionedConfig struct {
	// The API key to use for authentication.
	APIKey string `yaml:"api_key,omitempty"`
	// The project ID to use for authentication.
	ProjectID uuid.UUID `yaml:"project_id,omitempty"`
	// Whether to enable verbose logging.
	Verbose bool `yaml:"verbose,omitempty"`
	// The base URL for API requests.
	APIBaseURL string `yaml:"api_base_url,omitempty"`
	// The host header to set for API requests.
	APIBaseHost string `yaml:"api_base_host,omitempty"`
	// The URL for the dashboard UI.
	DashboardURL string `yaml:"dashboard_url,omitempty"`
}

Jump to

Keyboard shortcuts

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