Documentation
¶
Index ¶
- type Application
- func (a Application) GetExecutionUnit(id string) ExecutionUnit
- func (a Application) GetExposed(id string) Expose
- func (a Application) GetPersisted(id string, kind core.PersistKind) Persist
- func (a Application) GetPubSub(id string) PubSub
- func (a Application) GetResourceType(resource core.CloudResource) string
- func (a Application) GetStaticUnit(id string) StaticUnit
- func (a *Application) UpdateForResources(res []core.CloudResource)
- type ContentDeliveryNetwork
- type Defaults
- type ExecutionUnit
- type Expose
- type HelmChartOptions
- type InfraParams
- type KindDefaults
- type Persist
- type PersistKindDefaults
- type PubSub
- type StaticUnit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
AppName string `json:"app" yaml:"app" toml:"app"`
Provider string `json:"provider" yaml:"provider" toml:"provider"`
// Format is what format the file was originally in so that when we output
// to compiled, it keeps the same format.
Format string `json:"-" yaml:"-" toml:"-"`
Path string `json:"path" yaml:"path" toml:"path"`
OutDir string `json:"out_dir" yaml:"out_dir" toml:"out_dir"`
Defaults Defaults `json:"defaults" yaml:"defaults" toml:"defaults"`
ExecutionUnits map[string]*ExecutionUnit `json:"execution_units,omitempty" yaml:"execution_units,omitempty" toml:"execution_units,omitempty"`
StaticUnit map[string]*StaticUnit `json:"static_unit,omitempty" yaml:"static_unit,omitempty" toml:"static_unit,omitempty"`
Exposed map[string]*Expose `json:"exposed,omitempty" yaml:"exposed,omitempty" toml:"exposed,omitempty"`
Persisted map[string]*Persist `json:"persisted,omitempty" yaml:"persisted,omitempty" toml:"persisted,omitempty"`
PubSub map[string]*PubSub `json:"pubsub,omitempty" yaml:"pubsub,omitempty" toml:"pubsub,omitempty"`
}
func ReadConfig ¶
func ReadConfig(fpath string) (Application, error)
func (Application) GetExecutionUnit ¶
func (a Application) GetExecutionUnit(id string) ExecutionUnit
GetExecutionUnit returns the `ExecutionUnit` config for the resource specified by `id` merged with the defaults.
func (Application) GetExposed ¶
func (a Application) GetExposed(id string) Expose
GetExposed returns the `Expose` config for the resource specified by `id` merged with the defaults.
func (Application) GetPersisted ¶
func (a Application) GetPersisted(id string, kind core.PersistKind) Persist
GetPersisted returns the `Persist` config for the resource specified by `id` merged with the defaults for `kind`.
func (Application) GetPubSub ¶
func (a Application) GetPubSub(id string) PubSub
GetPubSub returns the `PubSub` config for the resource specified by `id`
func (Application) GetResourceType ¶
func (a Application) GetResourceType(resource core.CloudResource) string
func (Application) GetStaticUnit ¶
func (a Application) GetStaticUnit(id string) StaticUnit
GetStaticUnit returns the `StaticUnit` config for the resource specified by `id`
func (*Application) UpdateForResources ¶
func (a *Application) UpdateForResources(res []core.CloudResource)
UpdateForResources mutates the Application config for all the resources, applying the defaults.
type ContentDeliveryNetwork ¶
type ContentDeliveryNetwork struct {
Id string `json:"id,omitempty" yaml:"id,omitempty" toml:"id,omitempty"`
}
type Defaults ¶
type Defaults struct {
ExecutionUnit KindDefaults `json:"execution_unit" yaml:"execution_unit" toml:"execution_unit"`
StaticUnit KindDefaults `json:"static_unit" yaml:"static_unit" toml:"static_unit"`
Expose KindDefaults `json:"expose" yaml:"expose" toml:"expose"`
Persist PersistKindDefaults `json:"persist" yaml:"persist" toml:"persist"`
PubSub KindDefaults `json:"pubsub" yaml:"pubsub" toml:"pubsub"`
}
type ExecutionUnit ¶
type ExecutionUnit struct {
Type string `json:"type" yaml:"type" toml:"type"`
NetworkPlacement string `json:"network_placement,omitempty" yaml:"network_placement,omitempty" toml:"network_placement,omitempty"`
HelmChartOptions *HelmChartOptions `json:"helm_chart_options,omitempty" yaml:"helm_chart_options,omitempty" toml:"helm_chart_options,omitempty"`
InfraParams InfraParams `json:"pulumi_params,omitempty" yaml:"pulumi_params,omitempty" toml:"pulumi_params,omitempty"`
}
func (*ExecutionUnit) Merge ¶
func (cfg *ExecutionUnit) Merge(other ExecutionUnit)
type Expose ¶
type Expose struct {
Type string `json:"type" yaml:"type" toml:"type"`
ContentDeliveryNetwork ContentDeliveryNetwork `json:"content_delivery_network,omitempty" yaml:"content_delivery_network,omitempty" toml:"content_delivery_network,omitempty"`
InfraParams InfraParams `json:"pulumi_params,omitempty" yaml:"pulumi_params,omitempty" toml:"pulumi_params,omitempty"`
}
type HelmChartOptions ¶
type HelmChartOptions struct {
Directory string `json:"directory,omitempty" yaml:"directory,omitempty" toml:"directory,omitempty"` // Directory signals the directory which will contain the helm chart outputs
Install bool `json:"install,omitempty" yaml:"install,omitempty" toml:"install,omitempty"`
ValuesFiles []string `json:"values_files,omitempty" yaml:"values_files,omitempty" toml:"values_files,omitempty"`
}
A HelmChartOptions represents configuration for execution units attempting to generate helm charts
type InfraParams ¶
type InfraParams map[string]interface{}
InfraParams are passed as-is to the generated IaC
func (*InfraParams) Merge ¶
func (cfg *InfraParams) Merge(other InfraParams)
type KindDefaults ¶
type KindDefaults struct {
Type string `json:"type" yaml:"type" toml:"type"`
InfraParamsByType map[string]InfraParams `json:"pulumi_params_by_type,omitempty" yaml:"pulumi_params_by_type,omitempty" toml:"pulumi_params_by_type,omitempty"`
}
func (*KindDefaults) Merge ¶
func (cfg *KindDefaults) Merge(other KindDefaults)
type Persist ¶
type Persist struct {
Type string `json:"type" yaml:"type" toml:"type"`
InfraParams InfraParams `json:"pulumi_params,omitempty" yaml:"pulumi_params,omitempty" toml:"pulumi_params,omitempty"`
}
func (*Persist) GetPersistDefaults ¶
func (cfg *Persist) GetPersistDefaults(other PersistKindDefaults, persistType core.PersistKind) Persist
type PersistKindDefaults ¶
type PersistKindDefaults struct {
KV KindDefaults `json:"kv" yaml:"kv" toml:"kv"`
FS KindDefaults `json:"fs" yaml:"fs" toml:"fs"`
Secret KindDefaults `json:"secret" yaml:"secret" toml:"secret"`
ORM KindDefaults `json:"orm" yaml:"orm" toml:"orm"`
RedisNode KindDefaults `json:"redis_node" yaml:"redis_node" toml:"redis_node"`
RedisCluster KindDefaults `json:"redis_cluster" yaml:"redis_cluster" toml:"redis_cluster"`
}
func (*PersistKindDefaults) Merge ¶
func (cfg *PersistKindDefaults) Merge(other PersistKindDefaults)
type PubSub ¶
type PubSub struct {
Type string `json:"type" yaml:"type" toml:"type"`
InfraParams InfraParams `json:"pulumi_params,omitempty" yaml:"pulumi_params,omitempty" toml:"pulumi_params,omitempty"`
}
type StaticUnit ¶
type StaticUnit struct {
Type string `json:"type" yaml:"type" toml:"type"`
InfraParams InfraParams `json:"pulumi_params,omitempty" yaml:"pulumi_params,omitempty" toml:"pulumi_params,omitempty"`
ContentDeliveryNetwork ContentDeliveryNetwork `json:"content_delivery_network,omitempty" yaml:"content_delivery_network,omitempty" toml:"content_delivery_network,omitempty"`
}
func (*StaticUnit) Merge ¶
func (cfg *StaticUnit) Merge(other StaticUnit)