defaults

package
v0.0.0-...-e2f5efa Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2020 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

package defaults provides structures for the defaults of the test definition format

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetViperBindings

func SetViperBindings(v *viper.Viper) error

SetViperBindings adds all of the enviroment bindings to the given viper config provider

func SetViperDefaults

func SetViperDefaults(v *viper.Viper)

SetViperDefaults adds all of the default values to the given viper config provider

Types

type Defaults

type Defaults struct {
	Service   Service
	Resources Resources
	Network   Network
}

Defaults is a top level contain for all of the defaults so that they all may be passed into this library by the user. This is not to be confused with configuration

func New

func New(v *viper.Viper) (def Defaults, err error)

New creates a Defaults by generating each field from the given viper config provider

type Network

type Network struct {
	Name string `mapstructure:"defaultNetworkName"`
}

func NewNetwork

func NewNetwork(v *viper.Viper) (out Network, err error)

type Resources

type Resources struct {
	CPUs    int64 `mapstructure:"defaultCpus"`
	Memory  int64 `mapstructure:"defaultMemory"`
	Storage int64 `mapstructure:"defaultStorage"`
}

func NewResources

func NewResources(v *viper.Viper) (out Resources, err error)

type Service

type Service struct {
	Resources
	Image string `mapstructure:"defaultServiceImage"`
}

func NewService

func NewService(v *viper.Viper) (Service, error)

Jump to

Keyboard shortcuts

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