config

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIURL

func APIURL(cfg Getter, path string) (*url.URL, error)

func CatFiles added in v0.5.0

func CatFiles(implicitFiles, explicitFiles []string) ([]byte, error)

CatFiles concatenates the given file contents in order. Files in the implicitFiles slice that don't exist will not cause CatFiles to return an error.

func DefaultNetrcFiles added in v0.5.0

func DefaultNetrcFiles() []string

DefaultNetrcFiles returns paths to search for netrc files in descending precedence order based on environment variables.

func Get

func Get(cfg Getter, section string, key string) string

func GitHubAppURL

func GitHubAppURL() *url.URL

func Load added in v0.6.1

func Load() (ini.FileSet, error)

func ResolveSectionName added in v0.6.1

func ResolveSectionName(cfg Getter, name string) string

func Save added in v0.6.1

func Save(cfg *ini.File) error

func ShouldUploadBuildLogs

func ShouldUploadBuildLogs(cfg Getter) bool

func TokenValidationURL

func TokenValidationURL(cfg Getter) (*url.URL, error)

func UIURL

func UIURL(cfg Getter, path string) (*url.URL, error)

func UserSettingsURL

func UserSettingsURL(cfg Getter) (*url.URL, error)

func UserToken

func UserToken(cfg Getter) (string, error)

Types

type Getter added in v0.6.1

type Getter interface {
	Get(section, key string) string
}

Getter is the interface that wraps the Get method on *ini.File and ini.FileSet.

Jump to

Keyboard shortcuts

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