apikey

package
v0.5.0-apikeys.2 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IDHeader     = "tmprl-api-key-id"
	SecretHeader = "tmprl-api-secret-key"

	RequestSignatureHeader           = "tmprl-request-signature"
	RequestSignatureAlgorithmHeader  = "tmprl-request-signature-algorithm"
	RequestDatetimeHeader            = "tmprl-request-datetime"
	DefaultRequestSignatureAlgorithm = "tmprl-hmac-sha256"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Credential

type Credential struct {
	ID string
	// contains filtered or unexported fields
}

func NewCredential

func NewCredential(keyID string, secret string, opts ...Option) (Credential, error)

func (Credential) GetRequestMetadata

func (c Credential) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error)

func (Credential) RequireTransportSecurity

func (c Credential) RequireTransportSecurity() bool

type Option

type Option = func(c *Credential)

func WithHMAC

func WithHMAC(enable bool) Option

func WithInsecureTransport

func WithInsecureTransport(insecure bool) Option

Jump to

Keyboard shortcuts

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