utils

package
v1.2.7 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigPath         = "/var/addon/token-config"
	StsTokenTimeLayout = "2006-01-02T15:04:05Z"
)

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(s string, keyring []byte) ([]byte, error)

func GetOwnerAccountFromEnv

func GetOwnerAccountFromEnv() (accountId string, err error)

func GetRegionFromEnv

func GetRegionFromEnv() (region string, err error)

func PKCS5UnPadding

func PKCS5UnPadding(origData []byte) []byte

func ParseOwnerAccountId

func ParseOwnerAccountId() (string, error)

func ParseRegion

func ParseRegion() (string, error)

func ParseRegionFromMeta

func ParseRegionFromMeta() (string, error)

Types

type AKInfo

type AKInfo struct {
	AccessKeyId     string `json:"access.key.id"`
	AccessKeySecret string `json:"access.key.secret"`
	SecurityToken   string `json:"security.token"`
	Expiration      string `json:"expiration"`
	Keyring         string `json:"keyring"`
}

func ParseAKInfoFromConfigPath

func ParseAKInfoFromConfigPath() (*AKInfo, error)

func ParseAKInfoFromMeta

func ParseAKInfoFromMeta() (*AKInfo, error)

Jump to

Keyboard shortcuts

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