detokenize

package module
v0.0.0-...-c9bfb34 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

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 GetToken

func GetToken() (string, error)

GetToken is called by the HandleDetokenizeRequest to fetch Bearer Token.

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

func Retry(attempts, delay, multiplier int, callback func() error) (err error)

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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