common

package
v0.0.0-...-f62340a Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Credential

type Credential struct {
	Transport   http.RoundTripper
	SecretId    string
	SecretKey   string
	Token       string
	ExpiredTime int64
	Role        string
	// contains filtered or unexported fields
}

func NewCredential

func NewCredential(role string) (*Credential, error)

func NewCredentialTransport

func NewCredentialTransport(role string) *Credential

func (*Credential) GetRole

func (c *Credential) GetRole() string

func (*Credential) GetSecretId

func (c *Credential) GetSecretId() string

func (*Credential) GetSecretKey

func (c *Credential) GetSecretKey() string

func (*Credential) GetToken

func (c *Credential) GetToken() string

func (*Credential) Refresh

func (c *Credential) Refresh() error

func (*Credential) RoundTrip

func (c *Credential) RoundTrip(req *http.Request) (*http.Response, error)

type CredentialIface

type CredentialIface interface {
	GetSecretId() string
	GetToken() string
	GetSecretKey() string
	Refresh() error
	GetRole() string
}

Jump to

Keyboard shortcuts

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