credential

package
v1.3.0-policy Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2022 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AKPairProvider

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

func NewAKPairProvider

func NewAKPairProvider(ak string, sk string) *AKPairProvider

func (*AKPairProvider) Name

func (a *AKPairProvider) Name() string

func (*AKPairProvider) Resolve

func (a *AKPairProvider) Resolve() (*Credential, error)

type Client added in v1.2.1

type Client interface {
	ECS() *ecs.Client
	VPC() *vpc.Client
}

func NewClientSet added in v1.2.1

func NewClientSet(ak, sk, regionID, credentialPath, secretNamespace, secretName string) (Client, error)

type ClientMgr added in v1.2.1

type ClientMgr struct {

	// protect things below
	sync.RWMutex
	// contains filtered or unexported fields
}

ClientMgr manager of aliyun openapi clientset

func NewClientMgr added in v1.2.1

func NewClientMgr(key, secret, credentialPath, regionID, secretNamespace, secretName string) (*ClientMgr, error)

NewClientMgr return new aliyun client manager

func (*ClientMgr) ECS added in v1.2.1

func (c *ClientMgr) ECS() *ecs.Client

func (*ClientMgr) VPC added in v1.2.1

func (c *ClientMgr) VPC() *vpc.Client

type Credential

type Credential struct {
	Credential auth.Credential
	Expiration time.Time
}

type EncryptedCredentialInfo

type EncryptedCredentialInfo 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"`
}

type EncryptedCredentialProvider

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

func NewEncryptedCredentialProvider

func NewEncryptedCredentialProvider(credentialPath, secretNamespace, secretName string) *EncryptedCredentialProvider

NewEncryptedCredentialProvider get token from file or secret. default filepath /var/addon/token-config

func (*EncryptedCredentialProvider) Name

func (*EncryptedCredentialProvider) Resolve

func (e *EncryptedCredentialProvider) Resolve() (*Credential, error)

type Interface

type Interface interface {
	Resolve() (*Credential, error)
	Name() string
}

type MetadataProvider

type MetadataProvider struct {
}

func NewMetadataProvider

func NewMetadataProvider() *MetadataProvider

NewMetadataProvider get ramRole from metadata

func (*MetadataProvider) Name

func (m *MetadataProvider) Name() string

func (*MetadataProvider) Resolve

func (m *MetadataProvider) Resolve() (*Credential, error)

Jump to

Keyboard shortcuts

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