lib

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2017 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRequireCommand      = errors.New("command is required")
	ErrRequireNameAndValue = errors.New("name=value is required")
	ErrRequirePath         = errors.New("path is required")
)

Errors with a fixed message.

View Source
var MaxConnection = 4

MaxConnection is the max number of concurrent connections to the AWS API.

View Source
var UseCommandInsteadOfExec = false

UseCommandInsteadOfExec is a flag to use exec.Command instead of syscall.Exec for testing.

Functions

func Exec

func Exec(svc *ssm.SSM, paths []string, recursive bool, argv []string) error

Exec is the implementation of `ssmenv exec`.

func GetByName

func GetByName(w io.Writer, svc *ssm.SSM, path string, name string) error

GetByName is the implementation of `ssmenv get NAME`.

func GetByPath

func GetByPath(w io.Writer, svc *ssm.SSM, path string, recursive bool, exportFlag bool) error

GetByPath is the implementation of `ssmenv get`.

func GetParametersByNames

func GetParametersByNames(svc *ssm.SSM, names []*string) ([]*ssm.Parameter, error)

GetParametersByNames is a wrapper of SSM.GetParameters()

func GetParametersByPath

func GetParametersByPath(svc *ssm.SSM, path string, recursive bool) ([]*ssm.Parameter, error)

GetParametersByPath is a wrapper of SSM.GetParametersByPath()

func Replace

func Replace(w io.Writer, svc *ssm.SSM, path string, recursive bool, exprs []string) error

Replace is the implementation of `ssmenv replace`.

func ReplaceParameters

func ReplaceParameters(svc *ssm.SSM, path string, recursive bool, params []*ssm.Parameter, log io.Writer) error

ReplaceParameters replaces all the parameters of the given path.

func Set

func Set(w io.Writer, svc *ssm.SSM, path string, exprs []string) error

Set is the implementation of `ssmenv set`.

Types

type ErrAbsNameWithPath

type ErrAbsNameWithPath struct {
	Path, Name string
}

ErrAbsNameWithPath describes an absolute name are given with a path.

func (ErrAbsNameWithPath) Error

func (e ErrAbsNameWithPath) Error() string

type ErrInvalidExpression

type ErrInvalidExpression struct {
	Expr string
}

ErrInvalidExpression describes a problem parsing a expression.

func (ErrInvalidExpression) Error

func (e ErrInvalidExpression) Error() string

type ErrInvalidName

type ErrInvalidName struct {
	Name string
}

ErrInvalidName records an error for an invalid name.

func (ErrInvalidName) Error

func (e ErrInvalidName) Error() string

type ErrInvalidPath

type ErrInvalidPath struct {
	Path string
}

ErrInvalidPath records an error for an invalid path.

func (ErrInvalidPath) Error

func (e ErrInvalidPath) Error() string

type ErrPathMismatch

type ErrPathMismatch struct {
	Path, Name string
}

ErrPathMismatch describes that a name does not begin with a path.

func (ErrPathMismatch) Error

func (e ErrPathMismatch) Error() string

type ErrSlashWithoutRecursive

type ErrSlashWithoutRecursive struct {
	Expr string
}

ErrSlashWithoutRecursive describes that a name contains slashes without a recrusive flag.

func (ErrSlashWithoutRecursive) Error

func (e ErrSlashWithoutRecursive) Error() string

type ErrUnmarshal

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

ErrUnmarshal describes a problem parsing a expression.

func (ErrUnmarshal) Error

func (e ErrUnmarshal) Error() string

Jump to

Keyboard shortcuts

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