Documentation
¶
Overview ¶
Package options is a library of common remote.Options that are useful for modifying the behavior of a remote.Transaction.
Index ¶
- func Authorization(auth string) remote.Option
- func BasicAuth(username, password string) remote.Option
- func BearerAuth(accessToken string) remote.Option
- func Debug() remote.Option
- func Opaque(opaqueValue string) remote.Option
- func TestServer(hostname string, filesystem fs.FS) remote.Option
- func WithClient(client *http.Client) remote.Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Authorization ¶
Authorization is remote.Option that adds a HTTP "Authorization" header to every request.
func BasicAuth ¶
BasicAuth is a remote.Option that sets the value of a HTTP header for basic Authentication
func BearerAuth ¶ added in v0.17.2
BearerAuth is a remote.Option that sets the Authorization HTTP header witha for Bearer token
func Opaque ¶
Opaque is a remote.Option that modifies the raw URL string before it is sent to the server. This can be useful when the server requires odd characters in the URL string to NOT be urlencoded. (e.g. Such as the REST API for LinkedIn)
Additional documentation can be found at http://golang.org/pkg/net/url/#URL
func TestServer ¶
TestServer is a remote.Option that mocks requests for a specific hostname.
Types ¶
This section is empty.