database

package
v0.22.3 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database interface {
	GetSecret(key SecretKey) (Secret, bool)
	UpsertSecret(key SecretKey, data string, version int) error
}

func Restore

func Restore() (Database, error)

type MockDatabase added in v0.21.0

type MockDatabase struct {
	mock.Mock
}

func (*MockDatabase) GetSecret added in v0.21.0

func (m *MockDatabase) GetSecret(key SecretKey) (Secret, bool)

func (*MockDatabase) UpsertSecret added in v0.21.0

func (m *MockDatabase) UpsertSecret(key SecretKey, data string, version int) error

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