utils

package
v1.0.0-rc5 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssumeRole

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

AssumeRole uses STS to assume the given `role`.

func ContainsString

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

ContainsString checks if array contains string

func GetRegion

func GetRegion(profile string) (string, error)

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

func LoadFiles

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

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

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

func ProfileAndRegionFromConfig

func ProfileAndRegionFromConfig(environment string) (string, string, error)

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

func ReadIgnoreFile

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