tools

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: MPL-2.0 Imports: 8 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateLoginData

func GenerateLoginData(role string, creds auth.Credential, region string) (map[string]interface{}, error)

Generates the necessary data to send to the Vault server for generating a token. This is useful for other API clients to use. If "" is passed in for accessKeyID, accessKeySecret, and securityToken, attempts to use credentials set as env vars or available through instance metadata.

Types

type RequestCapturer

type RequestCapturer struct {
	// contains filtered or unexported fields
}

RequestCapturer fulfills the Proxy method of http.Transport, so can be used to replace the Proxy method on any transport method to simply capture the request. Its Proxy method always returns an error so the request won't actually be fired. This is useful for quickly finding out what final request a client is sending.

func (*RequestCapturer) GetCapturedRequest

func (r *RequestCapturer) GetCapturedRequest() (*http.Request, error)

func (*RequestCapturer) Proxy

func (r *RequestCapturer) Proxy(req *http.Request) (*url.URL, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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