Documentation
¶
Index ¶
- func ApplyURLTransformer(urlTransformer URLTransformer, baseURLs ...string) ([]string, error)
- func Bytes(ctx context.Context, url string, display func(string), checker ResponseChecker, ...) ([]byte, error)
- func GetPGPKey(ctx context.Context, keyPath string, display func(string)) ([]byte, error)
- func JSON(ctx context.Context, url string, display func(string), checker ResponseChecker, ...) (any, error)
- func NoCheck(*http.Response) error
- func NoDisplay(string)
- func NoTransform(value string) (string, error)
- type RequestOption
- type ResponseChecker
- type URLTransformer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyURLTransformer ¶
func ApplyURLTransformer(urlTransformer URLTransformer, baseURLs ...string) ([]string, error)
func Bytes ¶
func Bytes(ctx context.Context, url string, display func(string), checker ResponseChecker, requestOptions ...RequestOption) ([]byte, error)
func GetPGPKey ¶ added in v4.7.0
GetPGPKey retrieves the PGP key from either a local file or URL. If keyPath starts with "http://" or "https://", it will be treated as a URL. Otherwise, it will be treated as a local file path. If keyPath is empty, it will use the default HashiCorp PGP key URL.
func JSON ¶
func JSON(ctx context.Context, url string, display func(string), checker ResponseChecker, requestOptions ...RequestOption) (any, error)
func NoTransform ¶
Types ¶
type RequestOption ¶
func WithBasicAuth ¶
func WithBasicAuth(username string, password string) RequestOption
type ResponseChecker ¶
type URLTransformer ¶
func NewURLTransformer ¶
func NewURLTransformer(prevBaseURL string, baseURL string) URLTransformer
Click to show internal directories.
Click to hide internal directories.