config

package
v0.0.2-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRepoList

func GetRepoList() []string

func PrintRepos

func PrintRepos(repos []Repo)

func PrintWorkflows

func PrintWorkflows(workflows []engine.Workflow)

func SaveToConfig

func SaveToConfig(r RepoFile)

func StringInSlice

func StringInSlice(a string, list []string) bool

func TrimSuffix

func TrimSuffix(s, suffix string) string

Types

type Location

type Location struct {
	Path      string `mapstructure:"path" validate:"nonzero"`
	Type      string `mapstructure:"type" validate:"nonzero"`
	Subfolder string `mapstructure:"subfolder,omitempty"`
	Branch    string `mapstructure:"branch,omitempty"`
}

type Repo

type Repo struct {
	Name        string   `mapstructure:"name" validate:"nonzero"`
	Description string   `mapstructure:"description"`
	Location    Location `mapstructure:"location" validate:"nonzero"`
}

func GetConfig

func GetConfig() []Repo

type RepoFile

type RepoFile struct {
	Repositories []Repo `mapstructure:"repositories" validate:"nonzero"`
}
var C RepoFile

func GetConfigFile

func GetConfigFile() *RepoFile

Jump to

Keyboard shortcuts

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