options

package
v0.17.4 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2025 License: Apache-2.0 Imports: 10 Imported by: 5

Documentation

Overview

Package options is a library of common remote.Options that are useful for modifying the behavior of a remote.Transaction.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authorization

func Authorization(auth string) remote.Option

Authorization is remote.Option that adds a HTTP "Authorization" header to every request.

func BasicAuth

func BasicAuth(username, password string) remote.Option

BasicAuth is a remote.Option that sets the value of a HTTP header for basic Authentication

func BearerAuth added in v0.17.2

func BearerAuth(accessToken string) remote.Option

BearerAuth is a remote.Option that sets the Authorization HTTP header witha for Bearer token

func Debug

func Debug() remote.Option

Debug is a remote.Option that adds debugging output to every request.

func Opaque

func Opaque(opaqueValue string) remote.Option

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

func TestServer(hostname string, filesystem fs.FS) remote.Option

TestServer is a remote.Option that mocks requests for a specific hostname.

func WithClient added in v0.16.1

func WithClient(client *http.Client) remote.Option

Types

This section is empty.

Jump to

Keyboard shortcuts

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