v4

package
v1.1.35-0...-ce9b3bb Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2016 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Intercept s3 requests for the UnikHub

Package v4 implements signing for AWS V4 signer

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sign

func Sign(req *request.Request)

Sign requests with signature version 4.

Will sign the requests with the service config's Credentials object Signing is skipped if the credentials is the credentials.AnonymousCredentials object.

Types

type RequestToSign

type RequestToSign struct {
	RequestToValidate  RequestToValidate `json:"request_to_validate"`
	FormattedShortTime string            `json:"formatted_short_time"`
	ServiceName        string            `json:"service_name"`
	StringToSign       string            `json:"string_to_sign"`
}

type RequestToValidate

type RequestToValidate struct {
	Pass   string      `json:"pass"`
	Method string      `json:"method"`
	Path   string      `json:"path"`
	Query  url.Values  `json:"query"`
	Header http.Header `json:"headers"`
}

type SignatureResponse

type SignatureResponse struct {
	Signature []byte `json:"signature"`
	Err       string `json:"err"`
}

type ValidationResponse

type ValidationResponse struct {
	Message     string `json:"message"`
	AccessKeyID string `json:"access_key_id"`
	Region      string `json:"region"`
	Bucket      string `json:"bucket"`
}

Jump to

Keyboard shortcuts

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