config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultGITHUBAPIKEYKey = "gitHubAPIkey"

	DefaultConfigFileKey = "configfile"

	DefaultHTTPtimeoutkey = "httpTimeout"

	DefaultHTTPinsecureKey = "httpInsecure"

	DefaultSaveLocationKey = "saveLocation"

	DefaultBaseURLKey  = "baseURL"
	DefaultUploadRLKey = "uploadURL"

	DefaultMaxFileSizeKey = "maxFileSize"

	DefaultNotOkCompletionArgsKey = "notOkCompletionArgs"
)

default Keys & values for global values lik saveLocation & HttpTimeout, notice that only the keys are Global

Variables

This section is empty.

Functions

This section is empty.

Types

type Bin

type Bin struct {
	Cli                string   `yaml:"cli"`
	Owner              string   `yaml:"owner"`
	Repo               string   `yaml:"repo"`
	Tag                string   `yaml:"tag"`
	Match              string   `yaml:"match"`
	Download           bool     `yaml:"download"`
	NonGithubURL       string   `yaml:"nonGithubURL"`
	Backup             bool     `yaml:"backup"`
	CompletionLocation string   `yaml:"completionLocation"`
	CompletionArgs     []string `yaml:"completionArgs"`
}

Bin a representation on what to download

type Items

type Items struct {
	Bins                []Bin    `yaml:"bins"`
	GitHubAPIkey        string   `yaml:"githubAPIkey"`
	HTTPtimeout         int      `yaml:"httpTimeout"`
	HTTPinsecure        bool     `yaml:"httpInsecure"`
	SaveLocation        string   `yaml:"saveLocation"`
	BaseURL             string   `yaml:"baseURL"`
	UploadURL           string   `yaml:"uploadURL"`
	MaxFileSize         int64    `yaml:"maxFileSize"`
	NotOkCompletionArgs []string `yaml:"notOkCompletionArgs"`
}

Items config file struct

func ManageConfig added in v0.2.0

func ManageConfig(ctx context.Context) (Items, error)

ManageConfig read all the user input and returns Items

Jump to

Keyboard shortcuts

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