utils

package
v1.7.4 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccountIdToInt64 added in v1.7.4

func AccountIdToInt64(a string) (int64, error)

AccountIdToInt64 returns an int64 version of AWS AccountID in base10

func AccountIdToString

func AccountIdToString(a int64) (string, error)

AccountIdToString returns a string version of AWS AccountID

func EnsureDirExists

func EnsureDirExists(filename string) error

ensures the given directory exists for the filename used by JsonStore and InsecureStore

func GetHomePath

func GetHomePath(path string) string

GetHomePath returns the absolute path of the provided path with the first ~ replaced with the location of the users home directory and the path rewritten for the host operating system

func HandleUrl

func HandleUrl(action, browser, url, pre, post string) error

Prints, opens or copies to clipboard the given URL

func MakeRoleARN

func MakeRoleARN(account int64, name string) string

MakeRoleARN create an IAM Role ARN using an int64 for the account

func MakeRoleARNs added in v1.7.4

func MakeRoleARNs(account, name string) string

MakeRoleARNs creates an IAM Role ARN using a string for the account and role

func ParseRoleARN

func ParseRoleARN(arn string) (int64, string, error)

ParseRoleARN parses an ARN representing a role in long or short format

func ParseTimeString

func ParseTimeString(t string) (int64, error)

func TimeRemain

func TimeRemain(expires int64, space bool) (string, error)

Returns the MMm or HHhMMm

Types

This section is empty.

Jump to

Keyboard shortcuts

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