httpauth

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorizationTransport

type AuthorizationTransport struct {
	Token string
	// contains filtered or unexported fields
}

AuthorizationTransport a http round tripper

func NewAuthorizationTransport

func NewAuthorizationTransport(token string, transport http.RoundTripper) *AuthorizationTransport

func (*AuthorizationTransport) RoundTrip

func (t *AuthorizationTransport) RoundTrip(req *http.Request) (resp *http.Response, err error)

RoundTrip : The Request's URL and Header fields must be initialized.

type BasicTransport

type BasicTransport struct {
	Username string
	Password string
	// contains filtered or unexported fields
}

BasicTransport a http round tripper

func NewBasicTransport

func NewBasicTransport(username, password string, transport http.RoundTripper) *BasicTransport

NewBasicTransport return a BasicTransport

func (*BasicTransport) RoundTrip

func (t *BasicTransport) RoundTrip(req *http.Request) (resp *http.Response, err error)

RoundTrip : The Request's URL and Header fields must be initialized.

type BearerTransport

type BearerTransport struct {
	AccessToken string
	// contains filtered or unexported fields
}

BearerTransport a http round tripper

func NewBearerTransport

func NewBearerTransport(accessToken string, transport http.RoundTripper) *BearerTransport

NewBearerTransport return a BearerTransport

func (*BearerTransport) RoundTrip

func (t *BearerTransport) RoundTrip(req *http.Request) (resp *http.Response, err error)

RoundTrip : The Request's URL and Header fields must be initialized.

type HeaderTransport

type HeaderTransport struct {
	Header http.Header
	Set    bool
	// contains filtered or unexported fields
}

HeaderTransport a http round tripper

func NewHeaderTransport

func NewHeaderTransport(header http.Header, transport http.RoundTripper, set bool) *HeaderTransport

NewHeaderTransport return a BasicTransport

func (*HeaderTransport) RoundTrip

func (t *HeaderTransport) RoundTrip(req *http.Request) (resp *http.Response, err error)

RoundTrip : The Request's URL and Header fields must be initialized.

Jump to

Keyboard shortcuts

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