Documentation
¶
Overview ¶
Package transport provides facilities for setting up authenticated http.RoundTripper given credentials and base RoundTripper.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authorization ¶
type Authorization struct {
Base http.RoundTripper
Scheme string
Credentials string
}
Authorization is an http.RoundTripper that makes HTTP requests, wrapping a base RoundTripper and adding an Authorization header with credentials
type BasicAuth ¶
type BasicAuth struct {
Base http.RoundTripper
Username string
Password string
}
BasicAuth is an http.RoundTripper that makes HTTP requests, wrapping a base RoundTripper and adding a Basic Authorization header.
type BearerToken ¶
type BearerToken struct {
Base http.RoundTripper
Token string // Bearer token
}
BearerToken is an http.RoundTripper that makes HTTP requests, wrapping a base RoundTripper and adding an Authorization header with the Bearer Token.
type Custom ¶
type Custom struct {
Base http.RoundTripper
// Before defines an func to mutate the http.Request
// before the transaction is executed.
Before func(*http.Request)
}
Custom is an http.RoundTripper that can be used to implement custom HTTP request authorization.
type PrivateToken ¶
type PrivateToken struct {
Base http.RoundTripper
Token string // GitLab personal token
}
PrivateToken is an http.RoundTripper that makes HTTP requests, wrapping a base RoundTripper and adding an Private-Token header with the GitLab personal token.