util

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 22 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AWSHostname

func AWSHostname(isGov bool) string

func AddGroup

func AddGroup(parent *cobra.Command, title string, cmds ...*cobra.Command)

func Basename

func Basename(str string) string

func ExitOnErr

func ExitOnErr(err error)

func GenerateLoginURL

func GenerateLoginURL(creds aws.Credentials, isGov bool) (url.URL, error)

func GenerateTableHeaders

func GenerateTableHeaders(headers []string) []string

func GetAllProfiles

func GetAllProfiles() ([]string, error)

func GetConfigProfiles

func GetConfigProfiles() ([]string, error)

func GetCredentials

func GetCredentials(profile string) (aws.Credentials, error)

func GetCredentialsProfiles

func GetCredentialsProfiles() ([]string, error)

func GetFederatedToken

func GetFederatedToken(u url.URL) (string, error)

func GetFlagBool

func GetFlagBool(cmd *cobra.Command, str string) (bool, error)

func GetFlagString

func GetFlagString(cmd *cobra.Command, str string) (string, error)

func OpenBrowser

func OpenBrowser(url string) error

func PRsToTable

func PRsToTable(headers []string, prList []*codecommit.GetPullRequestOutput) *pterm.TablePrinter

func RemoveProfiles

func RemoveProfiles(profiles []string) error

func Spinner

func Spinner[T any](startMsg string, closure func() (T, error)) (T, error)

func StringifyCredentials

func StringifyCredentials(creds aws.Credentials) (string, error)

func StringifySessionCredentials

func StringifySessionCredentials(creds aws.Credentials) (string, error)

func WriteCredentials

func WriteCredentials(section string, creds aws.Credentials) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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