Documentation ¶
Overview ¶
Package auth authorizes programs to make HTTP requests to the discovery site.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Header ¶
Header returns a header value (typically a Bearer token) to be used in the HTTP 'Authorization' header.
func NewClient ¶
NewClient creates an http.Client for accessing go-discovery services. Its first argument is the JSON contents of a service account credentials file. If nil, default credentials are used. Its second argument determines which client ID to use.
func NewClientBearer ¶
NewClientBearer creates an http.Client that adds an Authorization header containing its argument as a bearer token.
Types ¶
type HeadersTransport ¶
type HeadersTransport struct { Headers map[string]string Base http.RoundTripper }
HeadersTransport is an http.Transport that adds headers to the request.
Click to show internal directories.
Click to hide internal directories.