config

package
v1.6.1-beta.0 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2026 License: Apache-2.0 Imports: 17 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const ColorAuto = "auto"

ColorAuto represents the auto-state for colors

View Source
const ColorOff = "off"

ColorOff represents the off-state for colors

View Source
const ColorOn = "on"

ColorOn represnets the on-state for colors

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Profile    Profile
	Color      string
	LogLevel   string
	DeviceName string

	// Helpers
	APIBaseURL       string
	DashboardBaseURL string
	ConsoleBaseURL   string
	WSBaseURL        string
	Insecure         bool

	// Config
	ConfigFileFlag string // flag -- should NOT use this directly
	// contains filtered or unexported fields
}

Config handles all overall configuration for the CLI

func (*Config) FileExists added in v1.3.0

func (c *Config) FileExists(path string) (bool, error)

FileExists checks if a file exists at the given path

func (*Config) GetAPIClient added in v1.2.0

func (c *Config) GetAPIClient() *hookdeck.Client

GetAPIClient returns the internal API client instance

func (*Config) GetClient

func (c *Config) GetClient() *hookdeckclient.Client

func (*Config) GetConfigFile added in v1.3.0

func (c *Config) GetConfigFile() string

GetConfigFile returns the path of the currently loaded config file

func (*Config) InitConfig

func (c *Config) InitConfig()

InitConfig reads in profiles file and ENV variables if set.

func (*Config) ListProfiles

func (c *Config) ListProfiles() []string

func (*Config) RemoveAllProfiles

func (c *Config) RemoveAllProfiles() error

RemoveAllProfiles removes all the profiles from the config file. TODO: consider adding log to clarify which config file is being used

func (*Config) UseProject

func (c *Config) UseProject(projectId string, projectMode string) error

UseProject selects the active project to be used

func (*Config) UseProjectLocal added in v1.3.0

func (c *Config) UseProjectLocal(projectId string, projectMode string) (bool, error)

UseProjectLocal selects the active project to be used in local config Returns true if a new file was created, false if existing file was updated

type ConfigFS added in v1.0.1

type ConfigFS interface {
	// contains filtered or unexported methods
}

type Profile

type Profile struct {
	Name        string // profile name
	APIKey      string
	ProjectId   string
	ProjectMode string
	GuestURL    string // URL to create permanent account for guest users

	Config *Config
}

func (*Profile) RemoveProfile

func (p *Profile) RemoveProfile() error

func (*Profile) SaveProfile

func (p *Profile) SaveProfile() error

func (*Profile) UseProfile

func (p *Profile) UseProfile() error

func (*Profile) ValidateAPIKey

func (p *Profile) ValidateAPIKey() error

Jump to

Keyboard shortcuts

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