secret

package
v1.9.3 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package secret fetches and caches development secrets for Encore apps.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	// Synced is when the values were last synced.
	Synced time.Time
	// Values is a key-value map of defined secrets.
	Values map[string]string
}

Data is a snapshot of an Encore app's development secret values.

type Manager

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

Manager manages the secrets cache for running Encore apps.

func New

func New() *Manager

New returns a new manager.

func (*Manager) Get

func (f *Manager) Get(ctx context.Context, appSlug string) (*Data, error)

Get gets the secrets for the given app.

func (*Manager) Prefetch

func (f *Manager) Prefetch(appSlug string)

Prefetch fires off a background task to prefetch secrets for appSlug.

func (*Manager) UpdateKey

func (f *Manager) UpdateKey(appSlug, key, value string)

UpdateKey updates the cached secret key to the given value.

Jump to

Keyboard shortcuts

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