signer

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SubResource = "SubResource"
	SignTime    = "SignTime"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type NopSigner

type NopSigner struct{}

func (*NopSigner) Sign

func (*NopSigner) Sign(ctx context.Context, signingCtx *SigningContext) error

type Signer

type Signer interface {
	Sign(ctx context.Context, signingCtx *SigningContext) error
}

type SignerV1

type SignerV1 struct {
}

func (*SignerV1) IsSignedHeader

func (*SignerV1) IsSignedHeader(h string) bool

func (*SignerV1) Sign

func (s *SignerV1) Sign(ctx context.Context, signingCtx *SigningContext) error

type SignerV4

type SignerV4 struct {
}

func (*SignerV4) IsSignedHeader

func (*SignerV4) IsSignedHeader(h string) bool

func (*SignerV4) Sign

func (s *SignerV4) Sign(ctx context.Context, signingCtx *SigningContext) error

type SigningContext

type SigningContext struct {
	//input
	Product *string
	Region  *string
	Bucket  *string
	Key     *string
	Request *http.Request

	SubResource       []string
	AdditionalHeaders []string

	Credentials *credentials.Credentials

	AuthMethodQuery bool

	// input and output
	Time        time.Time
	ClockOffset time.Duration

	// output
	SignedHeaders map[string]string
	StringToSign  string
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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