account

package
v0.3.16 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account interface {
	GetType() Provider
	SignRequest(req *http.Request, endpoint string) error
}

func AccountFromEnv added in v0.3.9

func AccountFromEnv() Account

type AliyunAccount

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

func AliyunAccountFromEnv

func AliyunAccountFromEnv() *AliyunAccount

func NewAliyunAccount

func NewAliyunAccount(accessId string, accessKey string) *AliyunAccount

func (*AliyunAccount) AccessId

func (account *AliyunAccount) AccessId() string

func (*AliyunAccount) AccessKey

func (account *AliyunAccount) AccessKey() string

func (*AliyunAccount) GetType

func (account *AliyunAccount) GetType() Provider

func (*AliyunAccount) SignRequest

func (account *AliyunAccount) SignRequest(req *http.Request, endpoint string) error

type AppAccount

type AppAccount struct {
	AliyunAccount
}

func NewAppAccount

func NewAppAccount(accessId string, accessKey string) *AppAccount

func (*AppAccount) SignRequest

func (account *AppAccount) SignRequest(req *http.Request, endpoint string) error

type AppStsAccount

type AppStsAccount struct {
	AliyunAccount
	// contains filtered or unexported fields
}

func NewAppStsAccount

func NewAppStsAccount(accessId, accessKey, stsToken string) *AppStsAccount

func (*AppStsAccount) SignRequest

func (account *AppStsAccount) SignRequest(req *http.Request, endpoint string) error

type BearerTokenAccount

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

func NewBearerTokenAccount

func NewBearerTokenAccount(token string) *BearerTokenAccount

func (*BearerTokenAccount) GetType

func (account *BearerTokenAccount) GetType() Provider

func (*BearerTokenAccount) SignRequest

func (account *BearerTokenAccount) SignRequest(req *http.Request, _ string) error

type CredentialProvider added in v0.3.8

type CredentialProvider interface {
	GetType() (*string, error)
	GetCredential() (*credentials.CredentialModel, error)
}

type Provider

type Provider uint
const (
	Taobao Provider
	Aliyun
	STS
	// BearToken logview token
	BearToken
)

func (Provider) String

func (p Provider) String() string

type StsAccount

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

func NewStsAccount

func NewStsAccount(accessId, accessKey, securityToken string) *StsAccount

func NewStsAccountWithCredential added in v0.3.8

func NewStsAccountWithCredential(aliyunCredential credentials.Credential) *StsAccount

func NewStsAccountWithProvider added in v0.3.8

func NewStsAccountWithProvider(provider CredentialProvider) *StsAccount

func (*StsAccount) Credential added in v0.3.9

func (account *StsAccount) Credential() (*credentials.CredentialModel, error)

func (*StsAccount) GetType

func (account *StsAccount) GetType() Provider

func (*StsAccount) SignRequest

func (account *StsAccount) SignRequest(req *http.Request, endpoint string) error

Jump to

Keyboard shortcuts

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