Help us shape the future of Go! Take the 2026 Go Developer Survey

gateway

package
v1.39.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveVaultGatewayURL

func ResolveVaultGatewayURL(tenantCtx *tenantctx.EnvironmentContext, envSet *environments.EnvironmentSet) string

ResolveVaultGatewayURL returns the vault gateway URL for secrets operations. Precedence: CRE_VAULT_DON_GATEWAY_URL env var, then the user context file vault_gateway_url, then the embedded default from EnvironmentSet.

func ValidateGatewayURL added in v1.22.0

func ValidateGatewayURL(raw string) error

ValidateGatewayURL rejects vault gateway URLs that are not HTTPS with a host, except for HTTP on loopback hosts used by local development and integration tests.

Types

type Client

type Client interface {
	Post(body []byte) (respBody []byte, status int, err error)
	// PostWithBearer sends the JSON-RPC body with Authorization: Bearer for the browser OAuth flow (no allowlist retries).
	PostWithBearer(body []byte, bearerToken string) (respBody []byte, status int, err error)
}

type HTTPClient

type HTTPClient struct {
	URL           string
	Client        *http.Client
	RetryAttempts uint
	RetryDelay    time.Duration
}

func (*HTTPClient) Post

func (g *HTTPClient) Post(body []byte) ([]byte, int, error)

func (*HTTPClient) PostWithBearer

func (g *HTTPClient) PostWithBearer(body []byte, bearerToken string) ([]byte, int, error)

Jump to

Keyboard shortcuts

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