config

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const EnvironmentOptionAuthOpenCommand string = "auth.open_command"

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultManager

type DefaultManager struct {
	// contains filtered or unexported fields
}

func NewDefaultManager

func NewDefaultManager(storage storage.Storage, path string) DefaultManager

func (DefaultManager) GetEnvironment

func (m DefaultManager) GetEnvironment(name string) (EnvironmentState, error)

func (DefaultManager) GetEnvironments

func (m DefaultManager) GetEnvironments() (EnvironmentsState, error)

func (DefaultManager) GetSource

func (m DefaultManager) GetSource() string

func (DefaultManager) SetEnvironment

func (m DefaultManager) SetEnvironment(env EnvironmentState) error

type EnvironmentAuthState

type EnvironmentAuthState struct {
	Type    string      `yaml:"type"`
	Options interface{} `yaml:"options"`
}

func (EnvironmentAuthState) UnmarshalOptions

func (ea EnvironmentAuthState) UnmarshalOptions(typed interface{}) error

type EnvironmentOption added in v0.4.0

type EnvironmentOption interface {
	Key() string
	SetValue(interface{}) error
}

type EnvironmentState

type EnvironmentState struct {
	URL           string                 `yaml:"url"`
	CACertificate string                 `yaml:"ca_certificate,omitempty"`
	Alias         string                 `yaml:"alias,omitempty"`
	Auth          *EnvironmentAuthState  `yaml:"auth,omitempty"`
	Options       map[string]interface{} `yaml:"options,omitempty"`
}

func (EnvironmentState) GetCACertificate

func (e EnvironmentState) GetCACertificate() (*x509.Certificate, error)

func (EnvironmentState) GetOption added in v0.4.0

func (e EnvironmentState) GetOption(option EnvironmentOption, def interface{}) error

func (*EnvironmentState) SetOption added in v0.4.0

func (e *EnvironmentState) SetOption(key string, val interface{})

type EnvironmentsState

type EnvironmentsState []EnvironmentState

type Manager

type Manager interface {
	GetSource() string
	GetEnvironments() (EnvironmentsState, error)
	GetEnvironment(string) (EnvironmentState, error)
	SetEnvironment(EnvironmentState) error
}

type State

type State struct {
	Environments EnvironmentsState `yaml:"environments,omitempty"`
}

type StringSliceEnvironmentOption added in v0.4.0

type StringSliceEnvironmentOption struct {
	// contains filtered or unexported fields
}

func NewStringSliceEnvironmentOption added in v0.4.0

func NewStringSliceEnvironmentOption(key string) StringSliceEnvironmentOption

func (*StringSliceEnvironmentOption) GetValue added in v0.4.0

func (eo *StringSliceEnvironmentOption) GetValue() []string

func (*StringSliceEnvironmentOption) Key added in v0.4.0

func (*StringSliceEnvironmentOption) SetValue added in v0.4.0

func (eo *StringSliceEnvironmentOption) SetValue(value interface{}) error

Directories

Path Synopsis
This file was generated by counterfeiter
This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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