client

package
v28.2.3 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2020 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package client contains integration code for taskcluster-client-go.

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) SignGotRequest

func (c *Credentials) SignGotRequest(req *got.Request, hash hash.Hash) error

SignGotRequest will add an Authorization header

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

func (*Credentials) ToClientCredentials

func (c *Credentials) ToClientCredentials() *tcclient.Credentials

ToClientCredentials generates a credentials object that tcclient expects.

Jump to

Keyboard shortcuts

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