adapter

package
v0.0.1-dev.12 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: Apache-2.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(body io.Reader, output any) error

func Guard

func Guard(bearer, realm string, timeout time.Duration, deny func(http.ResponseWriter), next http.Handler) http.Handler

Guard answers a request without the shared bearer with deny and the challenge of RFC 6750 §3, and gives every other request a deadline.

func HTTPSURL

func HTTPSURL(value string) bool

func HasMediaType

func HasMediaType(r *http.Request, want string) bool

func NoRedirects

func NoRedirects(transport *http.Client, timeout time.Duration) *http.Client

Types

type Client

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

func NewClient

func NewClient(endpoint, bearer string, transport *http.Client, timeout time.Duration) (*Client, error)

func (*Client) Do

func (c *Client) Do(ctx context.Context, method, path, accept, contentType string, body []byte) (*http.Response, error)

Jump to

Keyboard shortcuts

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