account

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

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)
}

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)

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)

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)

type BearerTokenAccount

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

func NewBearerTokenAccount

func NewBearerTokenAccount(endPoint, token string) BearerTokenAccount

func (*BearerTokenAccount) Endpoint

func (account *BearerTokenAccount) Endpoint() string

func (*BearerTokenAccount) GetType

func (account *BearerTokenAccount) GetType() Provider

func (*BearerTokenAccount) SignRequest

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

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 {
	AliyunAccount
	// contains filtered or unexported fields
}

func NewStsAccount

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

func (*StsAccount) GetType

func (account *StsAccount) GetType() Provider

func (*StsAccount) SignRequest

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

Jump to

Keyboard shortcuts

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