Documentation
¶
Index ¶
- Variables
- 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 Seal()
- func SetupFlags(flags *pflag.FlagSet)
- type ConfigType
- type Configuration
- type ConfigurationSlice
- type Context
- type RootContext
- type Workspace
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultWorkspaceEnvironments = []*schema.Workspace_EnvironmentSpec{
{
Name: "dev",
Runtime: "kubernetes",
Purpose: schema.Environment_DEVELOPMENT,
},
{
Name: "staging",
Runtime: "kubernetes",
Purpose: schema.Environment_PRODUCTION,
},
{
Name: "prod",
Runtime: "kubernetes",
Purpose: schema.Environment_PRODUCTION,
},
}
)
Functions ¶
func EnvsOrDefault ¶
func EnvsOrDefault(devHost *schema.DevHost, workspace *schema.Workspace) []*schema.Workspace_EnvironmentSpec
func GetMultiple ¶
func GetMultiple[V proto.Message](config Configuration) ([]V, error)
func IsValidConfigType ¶
func IsValidConfigType(msg *anypb.Any) bool
func LookupConfigMessage ¶
func LookupConfigMessage(name protoreflect.FullName) protoreflect.MessageType
func RegisterConfigurationProvider ¶
func RegisterConfigurationProvider[V proto.Message](handle func(V) ([]proto.Message, error), aliases ...string)
func SetupFlags ¶ added in v0.0.405
func SetupFlags(flags *pflag.FlagSet)
Types ¶
type ConfigType ¶
type ConfigType[V proto.Message] struct {
// contains filtered or unexported fields
}
func DefineConfigType ¶
func DefineConfigType[V proto.Message](aliases ...string) ConfigType[V]
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 ¶
type RootContext interface {
fnerrors.Location
DevHost() *schema.DevHost
Workspace() Workspace
}
type Workspace ¶
type Workspace interface {
fnerrors.Location
Proto() *schema.Workspace
ModuleName() string
ReadOnlyFS(rel ...string) fs.FS
LoadedFrom() *schema.Workspace_LoadedFrom
}
func MakeSyntheticWorkspace ¶ added in v0.0.84
func MakeSyntheticWorkspace(proto *schema.Workspace, lf *schema.Workspace_LoadedFrom) Workspace
Source Files
¶
Click to show internal directories.
Click to hide internal directories.