models

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatEnvVar

func FormatEnvVar(key, value string) string

FormatEnvVar prints out a key value pair as an export environment variable command

func GetExpirationString

func GetExpirationString(t *time.Time) string

GetExpirationString prints out a user readable string for when the given time will arrive

Types

type CredsDetails

type CredsDetails struct {
	ExpiresAfter    *time.Time `json:"expiresAfter"`
	AccessKeyID     string     `json:"AccessKeyId"`
	SecretAccessKey string     `json:"SecretAccessKey"`
	SessionToken    string     `json:"SessionToken"`
}

CredsDetails holds all of the details we need to print credentials once we have federated

func NewCredsDetails

func NewCredsDetails(out *sts.AssumeRoleOutput) *CredsDetails

NewCredsDetails returns a new CredsDetails object with the right things

func (CredsDetails) ToJSONString

func (c CredsDetails) ToJSONString() (string, error)

ToJSONString converts the struct with the creds to a JSON object

func (CredsDetails) ToString

func (c CredsDetails) ToString() string

ToString converts the struct with the creds to a human readable string

type LinkDetails

type LinkDetails struct {
	ExpiresAfter *time.Time `json:"expiresAfter"`
	LoginURL     string     `json:"loginUrl"`
}

LinkDetails is a struct that contains the right things to help print out the login link once we have federated

func NewLinkDetails

func NewLinkDetails(expiresAfter *time.Time, url string) *LinkDetails

NewLinkDetails returns a new LinkDetails with the right things stored

func (LinkDetails) ToJSONString

func (l LinkDetails) ToJSONString() (string, error)

ToJSONString converts the struct with the creds to a JSON object

func (LinkDetails) ToString

func (l LinkDetails) ToString() string

ToString converts the struct with the creds to a human readable string

Jump to

Keyboard shortcuts

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