config

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2017 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Global configuration
	Global *Config

	// Context stores the environmental context
	Context *ContextType
)

Functions

func SetEndpointContext

func SetEndpointContext(remote string) error

SetEndpointContext for a given remote

func Setup

func Setup(path string) (err error)

Setup the environment

func Teardown

func Teardown()

Teardown resets the configuration environment

Types

type Config

type Config struct {
	DefaultRemote   string       `ini:"default_remote"`
	NoAutocomplete  bool         `ini:"disable_autocomplete_autoinstall"`
	NoColor         bool         `ini:"disable_colors"`
	NotifyUpdates   bool         `ini:"notify_updates"`
	ReleaseChannel  string       `ini:"release_channel"`
	LastUpdateCheck string       `ini:"last_update_check"`
	PastVersion     string       `ini:"past_version"`
	NextVersion     string       `ini:"next_version"`
	EnableAnalytics bool         `ini:"enable_analytics"`
	AnalyticsID     string       `ini:"analytics_id"`
	Path            string       `ini:"-"`
	Remotes         remotes.List `ini:"-"`
	// contains filtered or unexported fields
}

Config of the application

func (*Config) Load

func (c *Config) Load() error

Load the configuration

func (*Config) Save

func (c *Config) Save() error

Save the configuration

type ContextType

type ContextType struct {
	Remote               string
	Infrastructure       string
	InfrastructureDomain string
	ServiceDomain        string
	Username             string
	Token                string
}

ContextType structure

Jump to

Keyboard shortcuts

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