Documentation
¶
Index ¶
- type AWSConfig
- type AzureConfig
- type Config
- type ConfigFile
- type GCPConfig
- type OpenStackConfig
- type Option
- func (o *Option[T]) IsNone() bool
- func (o Option[T]) IsSome() bool
- func (o Option[T]) MarshalJSON() ([]byte, error)
- func (o Option[T]) MarshalTOML() ([]byte, error)
- func (o *Option[T]) UnmarshalJSON(data []byte) error
- func (o *Option[T]) UnmarshalTOML(v any) error
- func (o *Option[T]) Unwrap() T
- func (o *Option[T]) UnwrapOr(def T) T
- func (o *Option[T]) UnwrapOrElse(f func() T) T
- type OptionTransformer
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWSConfig ¶
type AWSConfig struct {
Region string `toml:"region,omitempty"`
ReplicationRegions []string `toml:"replicationRegions,omitempty"`
AMIName string `toml:"amiName,omitempty" template:"true"`
AMIDescription string `toml:"amiDescription,omitempty" template:"true"`
Bucket string `toml:"bucket,omitempty" template:"true"`
BucketLocationConstraint string `toml:"bucketLocationConstraint,omitempty" template:"false"`
BlobName string `toml:"blobName,omitempty" template:"true"`
SnapshotName string `toml:"snapshotName,omitempty" template:"true"`
Publish Option[bool] `toml:"publish,omitempty"`
}
type AzureConfig ¶
type AzureConfig struct {
SubscriptionID string `toml:"subscriptionID,omitempty"`
Location string `toml:"location,omitempty"`
ReplicationRegions []string `toml:"replicationRegions,omitempty"`
ResourceGroup string `toml:"resourceGroup,omitempty" template:"true"`
AttestationVariant string `toml:"attestationVariant,omitempty" template:"true"`
SharingProfile string `toml:"sharingProfile,omitempty" template:"true"`
SharingNamePrefix string `toml:"sharingNamePrefix,omitempty" template:"true"`
ImageDefinitionName string `toml:"imageDefinitionName,omitempty" template:"true"`
Offer string `toml:"offer,omitempty" template:"true"`
SKU string `toml:"sku,omitempty" template:"true"`
Publisher string `toml:"publisher,omitempty" template:"true"`
DiskName string `toml:"diskName,omitempty" template:"true"`
}
type Config ¶
type Config struct {
Provider string `toml:"provider"`
ImageVersion string `toml:"imageVersion"`
ImageVersionFile string `toml:"imageVersionFile"`
Name string `toml:"name"`
AWS AWSConfig `toml:"aws,omitempty"`
Azure AzureConfig `toml:"azure,omitempty"`
GCP GCPConfig `toml:"gcp,omitempty"`
OpenStack OpenStackConfig `toml:"openstack,omitempty"`
}
func (*Config) Render ¶
Render renders the config by evaluating the version file and all template strings.
func (*Config) SetDefaults ¶
type ConfigFile ¶
func (*ConfigFile) ForEach ¶
func (c *ConfigFile) ForEach(fn func(name string, cfg Config) error, fileLookup fileLookupFn, filters ...variantFilter) error
func (*ConfigFile) Merge ¶
func (c *ConfigFile) Merge(other ConfigFile) error
func (*ConfigFile) RenderedVariant ¶
func (c *ConfigFile) RenderedVariant(fileLookup fileLookupFn, name string) (Config, error)
type GCPConfig ¶
type GCPConfig struct {
Project string `toml:"project,omitempty"`
Location string `toml:"location,omitempty"`
ImageName string `toml:"imageName,omitempty" template:"true"`
ImageFamily string `toml:"imageFamily,omitempty" template:"true"`
Bucket string `toml:"bucket,omitempty" template:"true"`
BlobName string `toml:"blobName,omitempty" template:"true"`
}
type OpenStackConfig ¶ added in v0.2.0
type OpenStackConfig struct {
Cloud string `toml:"cloud"`
ImageName string `toml:"imageName,omitempty" template:"true"`
Visibility string `toml:"visibility,omitempty"`
Hidden Option[bool] `toml:"hidden,omitempty"`
Tags []string `toml:"tags,omitempty"`
MinDiskGB int `toml:"minDiskGB,omitempty"`
MinRamMB int `toml:"minRamMB,omitempty"`
Protected Option[bool] `toml:"protected,omitempty"`
Properties map[string]string `toml:"properties"`
}
type Option ¶
func (Option[T]) MarshalJSON ¶
func (Option[T]) MarshalTOML ¶
func (*Option[T]) UnmarshalJSON ¶
func (*Option[T]) UnmarshalTOML ¶
func (*Option[T]) UnwrapOrElse ¶
func (o *Option[T]) UnwrapOrElse(f func() T) T
Click to show internal directories.
Click to hide internal directories.