secret

package
v1.2.7 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 22 Imported by: 2

Documentation

Overview

Package secret retrieves secrets.

Index

Constants

View Source
const (
	DefaultSecretsManagerPrefix = "aws-secretsmanager"
	DefaultParameterStorePrefix = "aws-parameterstore"
	DefaultS3Prefix             = "aws-s3"
	DefaultDynamoDbPrefix       = "aws-dynamodb"
	DefaultLambdaPrefix         = "aws-lambda"
	DefaultHTTPPrefix           = "#http"
)

Define default prefixes for Secrets Manager and Parameter Store.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Printf               boilerplate.FuncPrintf // defaults to log.Printf
	PrefixSecretsManager string                 // defaults to "aws-secretsmanager"
	PrefixParameterStore string                 // defaults to "aws-parameterstore"
	PrefixS3             string                 // defaults to "aws-s3"
	PrefixDynamoDb       string                 // defaults to "aws-dynamodb"
	PrefixLambda         string                 // defaults to "aws-lambda"
	PrefixHTTP           string                 // defaults to "#http"
	RoleArn              string
	RoleSessionName      string
	CrashOnQueryError    bool
	CacheTTL             time.Duration // defaults to 1 minute
}

Options provide optional parameters for client.

type Secret

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

Secret holds context information for retrieving secrets.

func New

func New(opt Options) *Secret

New creates a Secret context for retrieving secrets.

func (*Secret) Retrieve

func (s *Secret) Retrieve(name string) string

Retrieve fetches a secret.

Jump to

Keyboard shortcuts

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