settings

package
v0.0.0-...-567bd04 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Environment

type Environment struct {
	Name        string     `json:"name"`
	Description string     `json:"description"`
	Defaults    Parameters `json:"defaults"`
}

type EnvironmentParameters

type EnvironmentParameters struct {
	Cloud               string
	Ev2Cloud            string
	Environment         string
	Region              string
	Stamp               int
	RegionShortOverride string
	RegionShortSuffix   string
}

func Resolve

func Resolve(ctx context.Context, environment Environment) (EnvironmentParameters, error)

type Parameters

type Parameters struct {
	// Cloud determines the cloud entry under which the environment sits in the service configuration.
	Cloud string `json:"cloud"`
	// CloudOverride is the cloud to use for Ev2 data, if different from the name of the cloud itself.
	Ev2Cloud string `json:"ev2Cloud"`
	// Region is the region for which this environment is rendered.
	Region string `json:"region"`
	// CxStamp is the stamp for which this environment is rendered.
	CxStamp int `json:"cxStamp"`
	// RegionShortOverride is a shell-ism that, when run through `echo`, outputs a replacement for the short region variable from the EV2 central config.
	RegionShortOverride string `json:"regionShortOverride"`
	// RegionShortSuffix is a shell-ism that, when run through `echo`, outputs a suffix for the short region variable.
	RegionShortSuffix string `json:"regionShortSuffix"`
}

type Settings

type Settings struct {
	Environments []Environment `json:"environments"`
	// Subscriptions holds a mapping of subscription key to the subscription ID.
	Subscriptions map[string]string `json:"subscriptions"`
}

func Load

func Load(path string) (*Settings, error)

func (*Settings) Resolve

func (s *Settings) Resolve(ctx context.Context, cloud, environment string) (EnvironmentParameters, error)

Jump to

Keyboard shortcuts

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