transport

package
v0.3.8-0...-d4430a9 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIKeyHeader       = "signadot-api-key"
	ClusterTokenHeader = "signadot-cluster-token"
)

Variables

This section is empty.

Functions

func FixAPIErrors

func FixAPIErrors(transport runtime.ClientTransport) runtime.ClientTransport

FixAPIErrors is middleware that extracts the remote, server-provided API error message from an SDK error.

func InitAPITransport

func InitAPITransport(conf *APIConfig) (runtime.ClientTransport, error)

Types

type APIConfig

type APIConfig struct {
	APIKey          string
	ClusterToken    string
	BearerToken     string
	APIURL          string
	ArtifactsAPIURL string
	UserAgent       string
	Debug           bool

	// Advanced (optional) settings
	Consumers         map[string]runtime.Consumer
	OverrideConsumers bool
	Producers         map[string]runtime.Producer
	OverrideProducers bool
	HTTPClient        *http.Client
}

type APIError

type APIError struct {
	models.ErrorResponse
}

func (*APIError) Error

func (e *APIError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳