config

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2020 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthConfig

type AuthConfig struct {
	PubKey      *string       `yaml:"pub_key,omitempty"`
	TokenEnvVar *string       `yaml:"token_envvar,omitempty"`
	UserPass    *UserPassword `yaml:"userpass,omitempty"`
}

func (AuthConfig) ExtractAuth

func (a AuthConfig) ExtractAuth() (transport.AuthMethod, error)

type AuthorData

type AuthorData struct {
	Name  string `yaml:"name,omitempty"`
	Email string `yaml:"email,omitempty"`
}

func (AuthorData) ExtractAuthor

func (a AuthorData) ExtractAuthor() *object.Signature

type CLIConfig

type CLIConfig struct {
	// Path to the configuration file to use. If empty this will default to a 'modularise.yaml'
	// file located at the root of the Go module from which the command is invoked.
	ConfigFile string
	// Produce log output in a valid JSON format.
	JSON bool
	// File to which to write execution logs. If empty logs will be written to the standard output
	// of the command invocation.
	LogFile string
	// Directory to which to write all split content.
	WorkDirectory string
	// If set do not push new split content to the associated remotes.
	DryRun bool
	// If set emit verbose debug logs.
	Verbose bool
	// contains filtered or unexported fields
}

func (*CLIConfig) CheckConfig

func (c *CLIConfig) CheckConfig() error

type Split

type Split struct {
	// Module path for the split
	ModulePath string `yaml:"module_path,omitempty"`
	// List of paths relative to the source module's root. Any Go packages below these paths will be
	// made part of this split, unless:
	// - they are explicitly exluded by a longer prefix path in the Excludes list.
	// - they are explicitly included in another split.
	Includes []string `yaml:"includes,omitempty"`
	// List of paths relative to the source module's root. Any Go packages below these paths will
	// not be made part of this split, unless they are explicitly included by a longer prefix path
	// in the Includes list.
	Excludes []string `yaml:"excludes,omitempty"`
	// URL of the Git VCS where this split resides.
	URL string `yaml:"url,omitempty"`
	// Branch on the remote VCS that should be cloned from / pushed to for split content, defaults to 'master'.
	Branch string `yaml:"branch,omitempty"`

	// Internal state.
	splits.DataSplit `yaml:"-"`
}

type Splits

type Splits struct {
	// Authentication setup to clone / push Git repositories.
	Credentials AuthConfig `yaml:"credentials,omitempty"`
	// ID used for new commits generated in split repositories.
	Author AuthorData `yaml:"author,omitempty"`
	// Map of all configured splits.
	Splits map[string]*Split `yaml:"splits,omitempty"`

	// Internal state.
	splits.DataSplits `yaml:"-"`
}

type UserPassword

type UserPassword struct {
	Username     string `yaml:"username,omitempty"`
	PasswordFile string `yaml:"password_file,omitempty"`
}

Jump to

Keyboard shortcuts

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