config

package
v1.0.0-alpha-98 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2017 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup() error

Setup the environment

func Teardown

func Teardown()

Teardown resets the configuration environment

Types

type Config

type Config struct {
	Username        string       `ini:"username"`
	Password        string       `ini:"password"`
	Token           string       `ini:"token"`
	Local           bool         `ini:"local"`
	LocalPort       int          `ini:"local_port"`
	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"`
	AnalyticsOption string       `ini:"analytics_option_date"`
	AnalyticsID     string       `ini:"analytics_id"`
	LocalEndpoint   string       `ini:"-"`
	Path            string       `ini:"-"`
	Remotes         remotes.List `ini:"-"`
	// contains filtered or unexported fields
}

Config of the application

var (
	// Global configuration
	Global *Config

	// Context stores the environmental context
	Context *usercontext.Context
)

func (*Config) IsEndpoint

func (c *Config) IsEndpoint(host string) bool

IsEndpoint returns a boolean telling whether the URL is within a WeDeploy endpoint or not

func (*Config) Load

func (c *Config) Load() error

Load the configuration

func (*Config) Save

func (c *Config) Save() error

Save the configuration

Jump to

Keyboard shortcuts

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