internal

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Command is a variable that allows overriding the command creation for testing
	CommandContext = exec.CommandContext
	// LookPath is a variable that allows overriding the lookup behavior for testing
	LookPath = exec.LookPath
)

Functions

func ResolveSecretReference

func ResolveSecretReference(ctx context.Context, value string) (string, bool, error)

ResolveSecretReference attempts to resolve a 1Password secret reference (e.g. op://vault/item/field) Returns the resolved value and whether it was a secret reference

func RetryableClient

func RetryableClient(retries int, timeout time.Duration, rps int, logger interface{}) (*http.Client, error)

RetryableClient returns a new http.Client with a retryablehttp.Client configured with the provided parameters.

Types

type HeaderTransport

type HeaderTransport struct {
	Base    http.RoundTripper
	Headers http.Header
}

HeaderTransport is a custom RoundTripper that adds default headers to requests

func (*HeaderTransport) RoundTrip

func (t *HeaderTransport) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip adds the default headers to the request

Jump to

Keyboard shortcuts

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