versioning

package
v1.2.0-main Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

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.

Jump to

Keyboard shortcuts

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