Documentation ¶
Index ¶
- func GetDeprecatedProperties(configDicts ...map[string]interface{}) map[string]string
- func GetUnsupportedProperties(configDicts ...map[string]interface{}) []string
- func Load(configDetails types.ConfigDetails, options ...func(*Options)) (*types.Config, error)
- func LoadConfigObjs(source map[string]interface{}, details types.ConfigDetails) (map[string]types.ConfigObjConfig, error)
- func LoadNetworks(source map[string]interface{}, version string) (map[string]types.NetworkConfig, error)
- func LoadSecrets(source map[string]interface{}, details types.ConfigDetails) (map[string]types.SecretConfig, error)
- func LoadService(name string, serviceDict map[string]interface{}, workingDir string, ...) (*types.ServiceConfig, error)
- func LoadServices(servicesDict map[string]interface{}, workingDir string, ...) ([]types.ServiceConfig, error)
- func LoadVolumes(source map[string]interface{}, version string) (map[string]types.VolumeConfig, error)
- func ParseVolume(spec string) (types.ServiceVolumeConfig, error)
- func ParseYAML(source []byte) (map[string]interface{}, error)
- func Transform(source map[string]interface{}, target interface{}, ...) error
- type ForbiddenPropertiesError
- type Options
- type Transformer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDeprecatedProperties ¶
GetDeprecatedProperties returns the list of any deprecated properties that are used in the compose files.
func GetUnsupportedProperties ¶
GetUnsupportedProperties returns the list of any unsupported properties that are used in the Compose files.
func LoadConfigObjs ¶
func LoadConfigObjs(source map[string]interface{}, details types.ConfigDetails) (map[string]types.ConfigObjConfig, error)
LoadConfigObjs produces a ConfigObjConfig map from a compose file Dict the source Dict is not validated if directly used. Use Load() to enable validation
func LoadNetworks ¶
func LoadNetworks(source map[string]interface{}, version string) (map[string]types.NetworkConfig, error)
LoadNetworks produces a NetworkConfig map from a compose file Dict the source Dict is not validated if directly used. Use Load() to enable validation
func LoadSecrets ¶
func LoadSecrets(source map[string]interface{}, details types.ConfigDetails) (map[string]types.SecretConfig, error)
LoadSecrets produces a SecretConfig map from a compose file Dict the source Dict is not validated if directly used. Use Load() to enable validation
func LoadService ¶
func LoadService(name string, serviceDict map[string]interface{}, workingDir string, lookupEnv template.Mapping) (*types.ServiceConfig, error)
LoadService produces a single ServiceConfig from a compose file Dict the serviceDict is not validated if directly used. Use Load() to enable validation
func LoadServices ¶
func LoadServices(servicesDict map[string]interface{}, workingDir string, lookupEnv template.Mapping) ([]types.ServiceConfig, error)
LoadServices produces a ServiceConfig map from a compose file Dict the servicesDict is not validated if directly used. Use Load() to enable validation
func LoadVolumes ¶
func LoadVolumes(source map[string]interface{}, version string) (map[string]types.VolumeConfig, error)
LoadVolumes produces a VolumeConfig map from a compose file Dict the source Dict is not validated if directly used. Use Load() to enable validation
func ParseVolume ¶
func ParseVolume(spec string) (types.ServiceVolumeConfig, error)
ParseVolume parses a volume spec without any knowledge of the target platform
func ParseYAML ¶
ParseYAML reads the bytes from a file, parses the bytes into a mapping structure, and returns it.
func Transform ¶
func Transform(source map[string]interface{}, target interface{}, additionalTransformers ...Transformer) error
Transform converts the source map into the target struct with compose types transformer and the specified transformers if any.
Types ¶
type ForbiddenPropertiesError ¶
ForbiddenPropertiesError is returned when there are properties in the Compose file that are forbidden.
func (*ForbiddenPropertiesError) Error ¶
func (e *ForbiddenPropertiesError) Error() string
type Options ¶
type Options struct { // Skip schema validation SkipValidation bool // Skip interpolation SkipInterpolation bool // Interpolation options Interpolate *interp.Options }
Options supported by Load
type Transformer ¶
Transformer defines a map to type transformer