database

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Save

func Save(db Database) error

Types

type Database

type Database struct {
	Secrets map[string]map[string]map[string]Secret `json:"secrets"`
}

func Restore

func Restore() (Database, error)

func (*Database) GetSecret

func (db *Database) GetSecret(key SecretKey) (Secret, bool)

func (*Database) UpsertSecret

func (db *Database) UpsertSecret(key SecretKey, data string, version int) error

UpsertSecret saves a secret to the Database. Data will be hashed before saving

type Secret

type Secret struct {
	Version int    `json:"version"`
	Hash    string `json:"hash"`
}

type SecretKey

type SecretKey struct {
	ProjectId string `json:"project_id"`
	AppId     string `json:"app_id"`
	EnvName   string `json:"env_name"`
}

Jump to

Keyboard shortcuts

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