lib

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Task   Task
	Path   string
	GitUrl string
}

func (*Action) Execute

func (act *Action) Execute() *optional.Optional[*error]

type BoolString

type BoolString string

func (BoolString) IsTruthy

func (b BoolString) IsTruthy() bool

type DiscernPathInfo

type DiscernPathInfo func(path string) (fs.PathExistential, fs.PathType)

type Env

type Env struct {
	PersonalAccessToken string     `env:"PERSONAL_ACCESS_TOKEN" yaml:"personal_access_token"`
	ApiUrl              string     `env:"API_URL" yaml:"api_url"`
	WorkingDirectory    string     `env:"WORKING_DIRECTORY" yaml:"working_directory"`
	IsMirror            BoolString `env:"IS_MIRROR" yaml:"is_mirror"`
}

func LoadEnvironmentVariables

func LoadEnvironmentVariables(get GetEnvVar) *Env

func LoadEnvironmentYamlFile

func LoadEnvironmentYamlFile(read ReadYamlFile) *Env

func (*Env) Merge

func (left *Env) Merge(right *Env) *Env

type EnvFile

type EnvFile struct {
	PersonalAccessToken string `yaml:"personal_access_token"`
	ApiUrl              string `yaml:"api_url"`
	WorkingDirectory    string `yaml:"working_directory"`
}

type EnvironmentVariableKey

type EnvironmentVariableKey string
const (
	PersonalAccessToken EnvironmentVariableKey = "PERSONAL_ACCESS_TOKEN"
	ApiUrl              EnvironmentVariableKey = "API_URL"
	WorkingDirectory    EnvironmentVariableKey = "WORKING_DIRECTORY"
)

type GetEnvVar

type GetEnvVar func(string) (string, bool)

type LoadStatus

type LoadStatus int8

type ReadYamlFile

type ReadYamlFile func() ([]byte, error)

type Task

type Task int
const (
	Unknown Task = iota
	Invalid
	Clone
	Pull
)

func DiscernTask

func DiscernTask(path string, fsimpl fs.Fs) Task

func (Task) String

func (t Task) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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