sigv4

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: Apache-2.0 Imports: 6 Imported by: 4

Documentation

Overview

provides sigv4 extensions to connect to Amazon Keyspaces

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AwsAuthenticator

type AwsAuthenticator struct {
	Region              string
	AccessKeyId         string
	SecretAccessKey     string
	SessionToken        string
	CredentialsCallback SigV4CredentialsCallback
	// contains filtered or unexported fields
}

Authenticator for AWS Integration these are exposed publicly to allow for easy initialization and go standard changing after the fact.

func NewAwsAuthenticator

func NewAwsAuthenticator() AwsAuthenticator

initializes authenticator with credentials loaded from AWS SDK's default credential provider chain. region can be specified though environment variable or configuration.

func NewAwsAuthenticatorWithCredentialCallback

func NewAwsAuthenticatorWithCredentialCallback(region string, callback SigV4CredentialsCallback) AwsAuthenticator

initializes authenticator with the provided region and credentials callback

func NewAwsAuthenticatorWithRegion

func NewAwsAuthenticatorWithRegion(region string) AwsAuthenticator

initializes authenticator with credentials loaded from AWS SDK's default credential provider chain. region is accepted as an argument.

func (AwsAuthenticator) Challenge

func (p AwsAuthenticator) Challenge(req []byte) ([]byte, gocql.Authenticator, error)

func (AwsAuthenticator) Success

func (p AwsAuthenticator) Success(data []byte) error

type SigV4Credentials

type SigV4Credentials struct {
	AccessKeyId     string
	SecretAccessKey string
	SessionToken    string
}

type SigV4CredentialsCallback

type SigV4CredentialsCallback func() (SigV4Credentials, error)

Callback used to retrieve V4 credentials, can be used with refreshable credentials

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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