client

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaseTransport added in v1.3.0

func BaseTransport(insecureSkipVerify bool) http.RoundTripper

Types

type Authenticator added in v1.2.0

type Authenticator interface {
	Auth(req *http.Request) error
}

type Client

type Client struct {
	URL url.URL
	// contains filtered or unexported fields
}

Client struct is an *Arr client.

func NewClient

func NewClient(baseURL string, insecureSkipVerify bool, auth Authenticator) (*Client, error)

NewClient method initializes a new *Arr client.

func (*Client) DoRequest

func (c *Client) DoRequest(endpoint string, target interface{}, queryParams ...QueryParams) error

DoRequest - Take a HTTP Request and return Unmarshaled data

type ExportarrTransport added in v1.3.0

type ExportarrTransport struct {
	// contains filtered or unexported fields
}

ArrTransport is a http.RoundTripper that adds authentication to requests

func NewExportarrTransport added in v1.3.0

func NewExportarrTransport(inner http.RoundTripper, auth Authenticator) *ExportarrTransport

func (*ExportarrTransport) RoundTrip added in v1.3.0

func (t *ExportarrTransport) RoundTrip(req *http.Request) (*http.Response, error)

type QueryParams added in v1.6.0

type QueryParams = url.Values

Jump to

Keyboard shortcuts

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