Documentation ¶
Index ¶
- func EnvsOrDefault(devHost *schema.DevHost, workspace *schema.Workspace) []*schema.Workspace_EnvironmentSpec
- func GetMultiple[V proto.Message](config Configuration) ([]V, error)
- func IsValidConfigType(msg *anypb.Any) bool
- func LookupConfigMessage(name protoreflect.FullName) protoreflect.MessageType
- func RegisterConfigurationProvider[V proto.Message](handle func(V) ([]proto.Message, error), aliases ...string)
- func ValidateNoConfigTypeCollisions()
- type ConfigType
- type Configuration
- type ConfigurationSlice
- type Context
- type RootContext
- type Workspace
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnvsOrDefault ¶
func GetMultiple ¶
func GetMultiple[V proto.Message](config Configuration) ([]V, error)
func IsValidConfigType ¶
func LookupConfigMessage ¶
func LookupConfigMessage(name protoreflect.FullName) protoreflect.MessageType
func ValidateNoConfigTypeCollisions ¶
func ValidateNoConfigTypeCollisions()
Types ¶
type ConfigType ¶
func DefineConfigType ¶
func DefineConfigType[V proto.Message](aliases ...string) ConfigType[V]
func (ConfigType[V]) CheckGet ¶
func (ct ConfigType[V]) CheckGet(cfg Configuration) (V, bool)
func (ConfigType[V]) CheckGetForPlatform ¶
func (ct ConfigType[V]) CheckGetForPlatform(cfg Configuration, target specs.Platform) (V, bool)
type Configuration ¶
type Configuration interface { Derive(string, func(ConfigurationSlice) ConfigurationSlice) Configuration // When the configuration is loaded pinned to an environment, returns the // environment name. Else, the return value is undefined. This value MUST // NOT be used as an authoritative cache key. EnvKey() string Workspace() Workspace // contains filtered or unexported methods }
func MakeConfigurationCompat ¶
func MakeConfigurationCompat(errorloc fnerrors.Location, ws Workspace, devHost *schema.DevHost, env *schema.Environment) (Configuration, error)
func MakeConfigurationWith ¶
func MakeConfigurationWith(description string, ws Workspace, merged ConfigurationSlice) Configuration
type ConfigurationSlice ¶
type ConfigurationSlice struct { Configuration []*anypb.Any PlatformConfiguration []*schema.DevHost_ConfigurePlatform }
type Context ¶
type Context interface { fnerrors.Location Workspace() Workspace Configuration() Configuration Environment() *schema.Environment }
func LoadContext ¶
func LoadContext(parent RootContext, name string) (Context, error)
func MakeUnverifiedContext ¶
func MakeUnverifiedContext(config Configuration, env *schema.Environment) Context
type RootContext ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.