secrets

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Overview

Package secrets manages secrets config for outreach applications

All secrets are assumed to be stored securely in the filesystem. This is compatible with the k8s approach of fetch and mounting secrets on separate volume/files. See https://kubernetes.io/docs/concepts/configuration/secret/#use-cases

For the dev environment, call InitDevSecrets to initialize the secrets provider with a custom implementation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Config

func Config(ctx context.Context, filePath string) (string, error)

Config fetches the secret for the provided config file path.

Use MustConfig if a config is required, particularly on app init.

func MustConfig

func MustConfig(ctx context.Context, filePath string) string

MustConfig is like Config except it panics on error.

Use this if a config is read at startup. Use the Config() function if the config is fetched on a per-request basis

func SetDevLookup

func SetDevLookup(lookup func(context.Context, string) ([]byte, error)) func(context.Context, string) ([]byte, error)

SetDevLookup sets the lookup bypass for dev environments

func TryMapWindowsKeys

func TryMapWindowsKeys(filePath string) string

Make this public such that can be used by test cases too.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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