config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aws

type Aws struct {
	AccessKeyID     string `toml:"AWS_ACCESS_KEY_ID"`
	SecretAccessKey string `toml:"AWS_SECRET_ACCESS_KEY"`
	Region          string `toml:"AWS_REGION"`
}

Aws define config about aws.

type Common

type Common struct {
	ColorizedOutput bool `toml:"colorized_output"`
}

Common define configs about common.

type Config

type Config struct {
	Aws    Aws
	Peco   Peco
	SSH    SSH
	Common Common
}

Config describe configuration of ec2s.

func GetConfig

func GetConfig() *Config

GetConfig create Config instance.

func LoadConfig

func LoadConfig(path string) (*Config, error)

LoadConfig load toml config in the path.

func (*Config) AwsCredentials

func (c *Config) AwsCredentials() *credentials.Credentials

AwsCredentials return credentials.Credentials instance.

type IdentityFile

type IdentityFile struct {
	Name string `toml:"name"`
	Path string `toml:"path"`
}

IdentityFile define config about identity file of ssh.

type Peco

type Peco struct {
	Path string `toml:"path"`
}

Peco define config about peco

type SSH

type SSH struct {
	Port          int            `toml:"port"`
	User          string         `toml:"user"`
	IdentityFiles []IdentityFile `toml:"identity_file"`
}

SSH define config about ssh.

func (*SSH) IdentityFileForName

func (ssh *SSH) IdentityFileForName(name string) (*string, error)

IdentityFileForName return path of the IdentityFile.

Jump to

Keyboard shortcuts

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