basic

package
v0.0.81 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause Imports: 8 Imported by: 49

Documentation

Index

Constants

View Source
const (
	ProjectIdInHeader     = "X-Project-Id"
	SecurityTokenInHeader = "X-Security-Token"
	ContentTypeInHeader   = "Content-Type"
)

Variables

View Source
var DefaultDerivedPredicate = auth.GetDefaultDerivedPredicate()

Functions

This section is empty.

Types

type Credentials

type Credentials struct {
	IamEndpoint      string
	AK               string
	SK               string
	ProjectId        string
	SecurityToken    string
	DerivedPredicate func(*request.DefaultHttpRequest) bool
	// contains filtered or unexported fields
}

func (Credentials) IsDerivedAuth added in v0.0.79

func (s Credentials) IsDerivedAuth(httpRequest *request.DefaultHttpRequest) bool

func (Credentials) ProcessAuthParams

func (s Credentials) ProcessAuthParams(client *impl.DefaultHttpClient, region string) auth.ICredential

func (Credentials) ProcessAuthRequest

func (Credentials) ProcessDerivedAuthParams added in v0.0.79

func (s Credentials) ProcessDerivedAuthParams(derivedAuthServiceName, regionId string) auth.ICredential

type CredentialsBuilder

type CredentialsBuilder struct {
	Credentials Credentials
}

func NewCredentialsBuilder

func NewCredentialsBuilder() *CredentialsBuilder

func (*CredentialsBuilder) Build

func (builder *CredentialsBuilder) Build() Credentials

func (*CredentialsBuilder) WithAk

func (builder *CredentialsBuilder) WithAk(ak string) *CredentialsBuilder

func (*CredentialsBuilder) WithDerivedPredicate added in v0.0.79

func (builder *CredentialsBuilder) WithDerivedPredicate(derivedPredicate func(*request.DefaultHttpRequest) bool) *CredentialsBuilder

func (*CredentialsBuilder) WithIamEndpointOverride

func (builder *CredentialsBuilder) WithIamEndpointOverride(endpoint string) *CredentialsBuilder

func (*CredentialsBuilder) WithProjectId

func (builder *CredentialsBuilder) WithProjectId(projectId string) *CredentialsBuilder

func (*CredentialsBuilder) WithSecurityToken

func (builder *CredentialsBuilder) WithSecurityToken(token string) *CredentialsBuilder

func (*CredentialsBuilder) WithSk

func (builder *CredentialsBuilder) WithSk(sk string) *CredentialsBuilder

Jump to

Keyboard shortcuts

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