secret

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package secret implements an agent to read and reload the secrets.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(paths ...string) error

Add registers a new path to the agent.

func AddWithParser

func AddWithParser[T any](path string, parsingFN func([]byte) (T, error)) (func() T, error)

AddWithParser registers a new path to the agent. The secret will only be updated if it can be successfully parsed. The returned getter must be kept, as it is the only way of accessing the typed secret.

func Censor

func Censor(content []byte) []byte

func GetSecret

func GetSecret(secretPath string) []byte

GetSecret returns the value of a secret stored in a map.

func GetTokenGenerator

func GetTokenGenerator(secretPath string) func() []byte

GetTokenGenerator returns a function that gets the value of a given secret.

Types

This section is empty.

Jump to

Keyboard shortcuts

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