utils

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2017 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssumeRole added in v0.12.0

func AssumeRole(role string, config *aws.Config) (*aws.Config, error)

AssumeRole uses STS to assume the given `role`.

func ContainsString added in v0.6.0

func ContainsString(array []string, element string) bool

ContainsString checks if array contains string

func GetRegion added in v0.6.0

func GetRegion(profile string) (string, error)

GetRegion attempts loading the AWS region from ~/.aws/config.

func LoadFiles added in v0.5.0

func LoadFiles(root string, ignoreFile []byte) (files []string, err error)

LoadFiles return filtered map of relative to 'root' file paths; for filtering it uses shell file name pattern matching

func ParseEnv added in v0.10.0

func ParseEnv(env []string) (map[string]string, error)

ParseEnv accepts an `env` slice from the command-line and returns a map.

func ProfileFromConfig added in v0.10.0

func ProfileFromConfig(environment string) (string, error)

ProfileFromConfig attempts to load the .profile setting from `environment`'s config.

func ReadIgnoreFile added in v0.5.0

func ReadIgnoreFile(dir string) ([]byte, error)

ReadIgnoreFile reads .apexignore in `dir` when present and returns a list of patterns.

func Sha256

func Sha256(b []byte) string

Sha256 returns a base64 encoded SHA256 hash of `b`.

Types

This section is empty.

Jump to

Keyboard shortcuts

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