Documentation
¶
Index ¶
- Constants
- func GetToken() (string, error)
- func GetTokenArray(tokenReq TokenRequest) ([]string, error)
- func HandleDetokenizeRequest(_ context.Context, event events.APIGatewayProxyRequest) (*events.APIGatewayProxyResponse, error)
- func Retry(attempts, delay, multiplier int, callback func() error) (err error)
- type TokenRequest
Constants ¶
View Source
const ( // AWSSecretsExtensionBaseEndpoint is the Base Endpoint for AWS Secrets Extension AWSSecretsExtensionBaseEndpoint = "http://localhost:2773/secretsmanager/get?secretId=%s" // AWSSecretsExtensionTokenHeaderName is the Token Header for AWS Secrets Extension AWSSecretsExtensionTokenHeaderName = "X-Aws-Parameters-Secrets-Token" )
Variables ¶
This section is empty.
Functions ¶
func GetTokenArray ¶
func GetTokenArray(tokenReq TokenRequest) ([]string, error)
GetTokenArray is called by the HandleDetokenizeRequest to create an array of tokens
func HandleDetokenizeRequest ¶
func HandleDetokenizeRequest(_ context.Context, event events.APIGatewayProxyRequest) (*events.APIGatewayProxyResponse, error)
HandleDetokenizeRequest is a handler to detokenize tokens passed in the body of the request.
func Retry ¶
Retry wraps a function that may return an error and retries the func using exponential backoff. attempts is the max number of attempts to execute before returning with the last error delay is the initial time to delay in milliseconds multiplier is scaling factor, set to 1 for constant wait of delay between attempts
Types ¶
type TokenRequest ¶
type TokenRequest struct {
Data [][]interface{} `json:"data"`
}
TokenRequest unmarshals request body
Click to show internal directories.
Click to hide internal directories.