Documentation ¶
Overview ¶
Package client contains integration code for taskcluster-client-go.
Index ¶
- func PayloadHash(contentType string) hash.Hash
- type Credentials
- func (c *Credentials) SignGotRequest(req *got.Request, hash hash.Hash) error
- func (c *Credentials) SignHeader(method, url string, h hash.Hash) (string, error)
- func (c *Credentials) SignRequest(req *http.Request, hash hash.Hash) error
- func (c *Credentials) SignURL(URL string) (string, error)
- func (c *Credentials) ToClientCredentials() *tcclient.Credentials
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PayloadHash ¶
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 ¶
SignGotRequest will add an Authorization header
func (*Credentials) SignHeader ¶
SignHeader generates a request signature for Authorization
func (*Credentials) SignRequest ¶
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.
Click to show internal directories.
Click to hide internal directories.