Documentation
¶
Index ¶
Constants ¶
View Source
const ( HeaderAPIVersion = "Flightctl-API-Version" HeaderAPIVersionsSupported = "Flightctl-API-Versions-Supported" HeaderDeprecation = "Deprecation" )
API Header names
View Source
const (
V1Beta1 = "v1beta1"
)
API Version constants
Variables ¶
This section is empty.
Functions ¶
func NewTransport ¶
func NewTransport(base http.RoundTripper, opts ...TransportOption) http.RoundTripper
NewTransport creates an http.RoundTripper that wraps the given base transport. It injects the API version header if missing (when apiVersion is set via options). The API version must be explicitly provided via WithAPIVersion or WithAPIV1Beta1.
Types ¶
type TransportOption ¶
type TransportOption func(*transportOptions)
TransportOption is a functional option for configuring the versioning transport.
func WithAPIV1Beta1 ¶
func WithAPIV1Beta1() TransportOption
WithAPIV1Beta1 is a convenience option that sets API version to v1beta1.
func WithAPIVersion ¶
func WithAPIVersion(version string) TransportOption
WithAPIVersion sets the API version header value.
Click to show internal directories.
Click to hide internal directories.