Help us shape the future of Go! Take the 2026 Go Developer Survey

aliyuncli

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AK                  = AuthenticateMode("AK")
	StsToken            = AuthenticateMode("StsToken")
	RamRoleArn          = AuthenticateMode("RamRoleArn")
	EcsRamRole          = AuthenticateMode("EcsRamRole")
	RsaKeyPair          = AuthenticateMode("RsaKeyPair")
	RamRoleArnWithEcs   = AuthenticateMode("RamRoleArnWithRoleName")
	ChainableRamRoleArn = AuthenticateMode("ChainableRamRoleArn")
	External            = AuthenticateMode("External")
	CredentialsURI      = AuthenticateMode("CredentialsURI")
)
View Source
const (
	DefaultConfigProfileName = "default"
)

Variables

This section is empty.

Functions

func LoadProfile

func LoadProfile(path string, name string) (*Configuration, Profile, error)

Types

type AuthenticateMode added in v0.12.0

type AuthenticateMode string

type Configuration added in v0.12.0

type Configuration struct {
	CurrentProfile string    `json:"current"`
	Profiles       []Profile `json:"profiles"`
	MetaPath       string    `json:"meta_path"`
}

func LoadConfiguration added in v0.12.0

func LoadConfiguration(inputPath string) (conf *Configuration, err error)

func NewConfigFromBytes added in v0.12.0

func NewConfigFromBytes(bytes []byte) (conf *Configuration, err error)

func NewConfiguration added in v0.12.0

func NewConfiguration() *Configuration

func (*Configuration) GetProfile added in v0.12.0

func (c *Configuration) GetProfile(pn string) (Profile, bool)

type CredentialHelper

type CredentialHelper struct {
	// contains filtered or unexported fields
}

func NewCredentialHelper

func NewCredentialHelper(configPath, profileName, stsEndpoint string) (*CredentialHelper, error)

func (CredentialHelper) GetCredentials

func (c CredentialHelper) GetCredentials() (provider.CredentialsProvider, error)

func (CredentialHelper) ProfileName added in v0.12.0

func (c CredentialHelper) ProfileName() string

type Profile

type Profile struct {
	Name            string           `json:"name"`
	Mode            AuthenticateMode `json:"mode"`
	AccessKeyId     string           `json:"access_key_id"`
	AccessKeySecret string           `json:"access_key_secret"`
	StsToken        string           `json:"sts_token"`
	StsRegion       string           `json:"sts_region"`
	RamRoleName     string           `json:"ram_role_name"`
	RamRoleArn      string           `json:"ram_role_arn"`
	RoleSessionName string           `json:"ram_session_name"`
	SourceProfile   string           `json:"source_profile"`
	PrivateKey      string           `json:"private_key"`
	KeyPairName     string           `json:"key_pair_name"`
	ExpiredSeconds  int              `json:"expired_seconds"`
	Verified        string           `json:"verified"`
	RegionId        string           `json:"region_id"`
	OutputFormat    string           `json:"output_format"`
	Language        string           `json:"language"`
	Site            string           `json:"site"`
	ReadTimeout     int              `json:"retry_timeout"`
	ConnectTimeout  int              `json:"connect_timeout"`
	RetryCount      int              `json:"retry_count"`
	ProcessCommand  string           `json:"process_command"`
	CredentialsURI  string           `json:"credentials_uri"`
	// contains filtered or unexported fields
}

func NewProfile added in v0.12.0

func NewProfile(name string) Profile

func (*Profile) GetParent added in v0.12.0

func (cp *Profile) GetParent() *Configuration

func (*Profile) Validate added in v0.12.0

func (cp *Profile) Validate() error

func (*Profile) ValidateAK added in v0.12.0

func (cp *Profile) ValidateAK() error

type ProfileWrapper added in v0.12.0

type ProfileWrapper struct {
	// contains filtered or unexported fields
}

func (*ProfileWrapper) GetCredentialsByAK added in v0.12.0

func (p *ProfileWrapper) GetCredentialsByAK() (provider.CredentialsProvider, error)

func (*ProfileWrapper) GetCredentialsByChainableRamRoleArn added in v0.12.0

func (p *ProfileWrapper) GetCredentialsByChainableRamRoleArn() (provider.CredentialsProvider, error)

func (*ProfileWrapper) GetCredentialsByCredentialsURI added in v0.12.0

func (p *ProfileWrapper) GetCredentialsByCredentialsURI() (provider.CredentialsProvider, error)

func (*ProfileWrapper) GetCredentialsByEcsRamRole added in v0.12.0

func (p *ProfileWrapper) GetCredentialsByEcsRamRole() (provider.CredentialsProvider, error)

func (*ProfileWrapper) GetCredentialsByExternal added in v0.12.0

func (p *ProfileWrapper) GetCredentialsByExternal() (provider.CredentialsProvider, error)

func (*ProfileWrapper) GetCredentialsByRamRoleArnWithEcs added in v0.12.0

func (p *ProfileWrapper) GetCredentialsByRamRoleArnWithEcs() (provider.CredentialsProvider, error)

func (*ProfileWrapper) GetCredentialsByRoleArn added in v0.12.0

func (p *ProfileWrapper) GetCredentialsByRoleArn() (provider.CredentialsProvider, error)

func (*ProfileWrapper) GetCredentialsByRoleArnWithPro added in v0.15.0

func (p *ProfileWrapper) GetCredentialsByRoleArnWithPro(preP provider.CredentialsProvider) (provider.CredentialsProvider, error)

func (*ProfileWrapper) GetCredentialsBySts added in v0.12.0

func (p *ProfileWrapper) GetCredentialsBySts() (provider.CredentialsProvider, error)

func (*ProfileWrapper) GetProvider added in v0.15.0

func (p *ProfileWrapper) GetProvider() (provider.CredentialsProvider, error)

Jump to

Keyboard shortcuts

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