client

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2017 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PayloadHash

func PayloadHash(contentType string) hash.Hash

PayloadHash creates payload hash calculator for given content-type

Types

type Credentials

type Credentials struct {
	ClientID         string   `json:"clientId"`
	AccessToken      string   `json:"accessToken"`
	Certificate      string   `json:"certificate"`
	AuthorizedScopes []string `json:"authorizedScopes"`
}

Credentials for taskcluster and methods to sign requests.

func (*Credentials) SignHeader

func (c *Credentials) SignHeader(method, url string, h hash.Hash) (string, error)

SignHeader generates a request signature for Authorization

func (*Credentials) SignRequest

func (c *Credentials) SignRequest(req *http.Request, hash hash.Hash) error

SignRequest will add an Authorization header

func (*Credentials) SignURL

func (c *Credentials) SignURL(URL string) (string, error)

SignURL will generate a (bewit) signed URL

Jump to

Keyboard shortcuts

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