config

package
v0.0.0-...-e548ffa Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	// work directory where the listed repositories are located
	WorkDir string `yaml:"workdir"`

	// the remote url prefix lets you change the protocol or use a different git server
	// - for SSL use: 'git@github.com:' (default)
	// - for HTTPS use: 'https://github.com/'
	RemoteUrlPrefix string `yaml:"remote_url_prefix"`

	// clone projects if they do not exist
	Clone bool `yaml:"clone"`

	// remove projects if they are not listed (i.e. moves them into a folder 'removed')
	Remove bool `yaml:"remove"`

	// if command output should be redirected to stdout
	Verbose bool `yaml:"verbose"`

	// list of repositories to be processes if the org is listed
	Repos map[string][]string `yaml:"repos"`
}
Example
config := UnmarshalFile(testFile)
log.Printf("%v\n", config)
log.Printf("%v\n", config.Repositories())
Output:

func Unmarshal

func Unmarshal(yamlContent []byte) Configuration

func UnmarshalFile

func UnmarshalFile(filePath string) Configuration

func UnmarshalString

func UnmarshalString(yamlString string) Configuration

func (*Configuration) Repositories

func (c *Configuration) Repositories() []Repository

type Repository

type Repository struct {
	//
	Organisation string
	//
	Name string
}

Jump to

Keyboard shortcuts

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