signer

package
v0.0.0-...-fb57f4f Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateHeadersString

func CreateHeadersString(headers map[string]string) string

Build from headers map the string with headers line by line

func CreateQueryString

func CreateQueryString(queryParams QueryParams) string

Build from QueryParams the URI encoded string

func HMAC

func HMAC(key []byte, text string) []byte

Apply HMAC to an input text with an input key

func MergeMaps

func MergeMaps(m1 map[string]string, m2 map[string]string) map[string]string

Util for merge two maps map[string]string into one map[string]string

func SHA256

func SHA256(text string) string

Apply SHA256 to an input text

Types

type APII

type APII interface {
	// Return an enpoint url signed
	GetSignedURL(endpoint string, queryParams QueryParams, date *time.Time) (string, error)
}

Signer API provides an interface to enable AWS Signature

type DateProvier

type DateProvier struct {
	ClockOffset time.Duration
}

func (*DateProvier) GetDate

func (d *DateProvier) GetDate() *time.Time

GetDate using config offset

type QueryParams

type QueryParams map[string]string

Query Params from uri

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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