merger

package
v0.0.67 Latest Latest
Warning

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

Go to latest
Published: May 10, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MergeAndUpdate

func MergeAndUpdate(ctx context.Context, client mergeClient, list MergeList, skipValidate, confirm bool) error

MergeAndUpdate gathers configurations from each path and merges them. Puts the result at targetPath if confirm is true Will skip an input config if it is invalid and skipValidate is false Other problems are considered fatal and will return an error

Types

type MergeList

type MergeList struct {
	Target  string    `json:"Target"`
	Path    *gcs.Path `json:"-"`
	Sources []Source  `json:"Sources"`
}

MergeList is a list of config sources to merge together ParseAndCheck will construct this from a YAML document

func ParseAndCheck

func ParseAndCheck(data []byte) (list MergeList, err error)

ParseAndCheck parses and checks the configuration file for common errors

type Source

type Source struct {
	Name     string    `json:"Name"`
	Location string    `json:"Location"`
	Path     *gcs.Path `json:"-"`
	Contact  string    `json:"Contact,omitempty"`
}

Source represents a configuration source in cloud storage

Jump to

Keyboard shortcuts

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