config

package
v0.0.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateConfiguration

func CreateConfiguration(configDirPath string, configuration ParticleConfiguration) error

CreateConfiguration creates the particle configuration using sane defaults. It returns the configuration and an error, if found.

Types

type Dependencies

type Dependencies struct {
	RepositoryName string `yaml:"repository-name,omitempty"`
	RepositoryURL  string `yaml:"repository-url,omitempty"`
}

A Dependencies represents the actual list of charts.

type Dependency

type Dependency struct {
	Name   string         `yaml:"name" validate:"eq=helm"`
	Charts []Dependencies `yaml:"charts,omitempty"`
}

A Dependency represents a list of chart's repository install locally.

type Driver

type Driver struct {
	Name              string                 `yaml:"name" validate:"required,eq=kind|eq=minikube"`
	KubernetesVersion string                 `yaml:"kubernetes-version,omitempty"`
	Values            map[string]interface{} `yaml:"values,omitempty"`
}

A Driver represents the driver configuration.

type ParticleConfiguration

type ParticleConfiguration struct {
	Driver      Driver      `yaml:"driver" validate:"required"`
	Provisioner Provisioner `yaml:"provisioner" validate:"required"`
	Linter      string      `yaml:"lint" validate:"required"`
	Verifier    string      `yaml:"verifier" validate:"required"`
	Dependency  Dependency  `yaml:"dependency" validate:"required,eq=helm"`
	Prepare     []Prepare   `yaml:"prepare,omitempty"`
}

A ParticleConfiguration represents the main particle configuration.

func ReadConfiguration

func ReadConfiguration(scenario string) (ParticleConfiguration, error)

ReadConfiguration just reads the configuration. It returns the configuration and an error, if found.

type Prepare

type Prepare struct {
	Name    string                 `yaml:"name"`
	Version string                 `yaml:"version,omitempty"`
	Values  map[string]interface{} `yaml:"values,omitempty"`
}

A Prepare represents the list of dependencies to install.

type Provisioner

type Provisioner struct {
	Name   string                 `yaml:"name" validate:"eq=helm"`
	Values map[string]interface{} `yaml:"values,omitempty"`
}

A Provisioner represents the provisioner configuration.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL