secrets

package
v0.2.11 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2022 License: Unlicense Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Secrets

type Secrets struct {
	ConfigName string `json:"ConfigName"`
	Records    []struct {
		Key   string `json:"Key"`
		Value string `json:"Value"`
	} `json:"Records"`
}

func Initialize

func Initialize(location string) (*Secrets, error)

Initialize - accepts either a path to a file or a path to a GCP Secrets entry

func InitializeFromEnvironment

func InitializeFromEnvironment(ev string) (*Secrets, error)

InitializeFromEnvironment - accepts environment variable name that holds either a path to a file or a path to a GCP Secrets entry

func Parse

func Parse(data []byte) (*Secrets, error)

Parse - attempts to unmarshall the data into Secrets struct

func (Secrets) GetBool

func (s Secrets) GetBool(key string) bool

func (Secrets) GetFile

func (s Secrets) GetFile(key string) ([]byte, error)

GetFile - assumes value contains location of either a file or GCP secrets entry

func (Secrets) GetInt

func (s Secrets) GetInt(key string) int

func (Secrets) GetName

func (s Secrets) GetName() string

func (Secrets) GetString

func (s Secrets) GetString(key string) string

func (Secrets) KeyExists

func (s Secrets) KeyExists(key string) bool

Jump to

Keyboard shortcuts

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