Documentation ¶
Index ¶
- Constants
- func CheckCatalogDir(catalogDir string) error
- func LoadFile[T any](file string, value *T) error
- func ToContext(parent context.Context, cfg *Config) context.Context
- func ToFlagsContext(parent context.Context, flags *GlobalFlags) context.Context
- type Catalog
- type ColumnWidths
- type Config
- type EnvironmentTemplates
- type Environments
- type GlobalFlags
- type Help
- type ProjectTemplates
- type ReleasePromoteTemplates
- type ReleaseTemplates
- type Releases
- type Templates
- type User
Constants ¶
View Source
const ( CatalogConfigFile = "joy.yaml" JoyrcFile = ".joyrc" JoyDefaultDir = ".joy" )
View Source
const ( DefaultNarrowColumnWidth = 20 DefaultNormalColumnWidth = 40 DefaultWideColumnWidth = 80 )
Variables ¶
This section is empty.
Functions ¶
func CheckCatalogDir ¶
TODO: maybe this function belongs in package catalog?
func ToFlagsContext ¶ added in v0.33.1
func ToFlagsContext(parent context.Context, flags *GlobalFlags) context.Context
Types ¶
type Catalog ¶ added in v0.49.1
type Catalog struct { // MinVersion is the minimum version of the joy CLI required MinVersion string `yaml:"minVersion,omitempty"` // Charts are the known charts that environments and releases can reference Charts map[string]helm.Chart `yaml:"charts,omitempty"` // DefaultChartRef refers to the chart that must be used from Charts if a release doesn't specify any chart configuration DefaultChartRef string `yaml:"defaultChartRef,omitempty"` // ReferenceEnvironment is the name of the environment which represents master in git. // IE: if you deploy by default to an environment called "testing" when merging to your main remote branch // then referenceEnvironment should be "testing". This setting allows release versions to be compared to main version. ReferenceEnvironment string `yaml:"referenceEnvironment,omitempty"` RepositoriesDir string `yaml:"repositoriesDir,omitempty"` // Default GitHub organization to infer the repository from the project name. GitHubOrganization string `yaml:"gitHubOrganization,omitempty"` Templates Templates `yaml:"templates,omitempty"` Helps map[string][]Help `yaml:"help,omitempty"` }
type ColumnWidths ¶ added in v0.41.2
type ColumnWidths struct { Narrow int `yaml:"narrow,omitempty"` Normal int `yaml:"normal,omitempty"` Wide int `yaml:"wide,omitempty"` }
func (ColumnWidths) Get ¶ added in v0.41.2
func (c ColumnWidths) Get(narrow, wide bool) int
type Config ¶
func FromContext ¶
func Load ¶
Load loads config from given configDir (or user home if not specified) and optionally overrides loaded config's catalog directory with given catalogDir, defaulting to ~/.joy if not specified.
func (*Config) KnownChartRefs ¶ added in v0.39.0
type EnvironmentTemplates ¶ added in v0.38.0
type Environments ¶
type Environments struct { // Selected is the list of environments user has selected to work with. // Only those will be displayed in table columns by default. // An empty list means all environments are selected. Selected []string `yaml:"selected,omitempty"` }
type GlobalFlags ¶ added in v0.33.1
type GlobalFlags struct { // SkipCatalogUpdate global flag used to skip catalog update and dirty check. SkipCatalogUpdate bool }
func FlagsFromContext ¶ added in v0.33.1
func FlagsFromContext(ctx context.Context) *GlobalFlags
type ProjectTemplates ¶ added in v0.38.0
type ReleasePromoteTemplates ¶ added in v0.38.0
type ReleaseTemplates ¶ added in v0.38.0
type ReleaseTemplates struct { Promote ReleasePromoteTemplates `yaml:"promote,omitempty"` Links map[string]string `yaml:"links,omitempty"` }
type Releases ¶
type Releases struct { // Selected is the list of releases user has selected to work with. // Only those will be displayed in table rows by default. // An empty list means all releases are selected. Selected []string `yaml:"selected,omitempty"` }
type Templates ¶ added in v0.38.0
type Templates struct { Environment EnvironmentTemplates `yaml:"environment,omitempty"` Project ProjectTemplates `yaml:"project,omitempty"` Release ReleaseTemplates `yaml:"release,omitempty"` }
type User ¶ added in v0.49.1
type User struct { // CatalogDir is the directory containing catalog of environments, projects and releases. // Optional, defaults to ~/.joy CatalogDir string `yaml:"catalogDir,omitempty"` // Environments user has selected to work with. Environments Environments `yaml:"environments,omitempty"` // Releases user has selected to work with. Releases Releases `yaml:"releases,omitempty"` ColumnWidths ColumnWidths `yaml:"columnWidths,omitempty"` // FilePath is the path to the config file that was loaded, used to write back to the same file. FilePath string `yaml:"-"` }
Click to show internal directories.
Click to hide internal directories.