secrets

package
v0.1521.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package secrets provides a client for AWS Secrets Manager.

Index

Constants

View Source
const (
	GovUkNotify             = "gov-uk-notify-api-key"
	GovUkPay                = "gov-uk-pay-api-key"
	GovUkOneLoginPrivateKey = "private-jwt-key-base64"
	OrdnanceSurvey          = "os-postcode-lookup-api-key"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(cfg aws.Config, ttl time.Duration) (*Client, error)

func (*Client) CookieSessionKeys

func (c *Client) CookieSessionKeys(ctx context.Context) ([][]byte, error)

func (*Client) Secret

func (c *Client) Secret(ctx context.Context, name string) (string, error)

Secret retrieves the named secret from the cache. If not in the cache or the item is stale then the secret is retrieved from Secrets Manager. On failure the stale secret will be returned, and if that isn't possible an error.

func (*Client) SecretBytes

func (c *Client) SecretBytes(ctx context.Context, name string) ([]byte, error)

Jump to

Keyboard shortcuts

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