config

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrConfigFileNotFound error = errors.New("config file not found")
)

Functions

This section is empty.

Types

type App

type App interface {
	Parse() (C, error)
	ParseSpecs(string) (Specs, error)
	InitJSONConfig() error
	InitYamlConfig() error
}

type C

type C struct {
	Commands map[string]Command
	Settings Settings `yaml:"settings" json:"settings"`
}

type Command

type Command struct {
	Description string `yaml:"description" json:"description"`
	Path        string `yaml:"path" json:"path"`
	Git         string `yaml:"git" json:"git"`
	Specs       `yaml:",inline" json:",inline"`
}

type GitSettings added in v0.3.0

type GitSettings struct {
	SSH SSHGitSettings `yaml:"ssh" json:"ssh"`
}

type Item

type Item struct {
	Name  string
	Value interface{}
}

type SSHGitSettings added in v0.3.0

type SSHGitSettings struct {
	PrivateKeyFile     string `yaml:"privateKeyFile" json:"privateKeyFile"`
	PrivateKeyPassword string `yaml:"privateKeyPassword" json:"privateKeyPassword"`
}

type Settings added in v0.3.0

type Settings struct {
	Git GitSettings `yaml:"git" json:"git"`
}

type Specs added in v0.3.0

type Specs struct {
	Variables []Variable `yaml:"vars" json:"vars"`
	Skip      []string   `yaml:"skip" json:"skip"`
}

type Type

type Type string
const (
	String Type = "string"
	Array  Type = "array"
	Bool   Type = "bool"
)

type Variable

type Variable struct {
	Name         string     `yaml:"name" json:"name"`
	Type         Type       `yaml:"type" json:"type"`
	Format       *string    `yaml:"format,omitempty" json:"format,omitempty"`
	Dependencies []Variable `yaml:"deps" json:"deps"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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