storage

package
v1.7.4 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProjectStorage

type ProjectStorage interface {
	ListProjects(name string) ([]*models.Project, error)
	Get(projectId models.Id) (*models.Project, error)
	GetByName(projectName string) (*models.Project, error)
	Save(project *models.Project) (*models.Project, error)
}

func NewProjectStorage

func NewProjectStorage(db *gorm.DB) ProjectStorage

type SecretStorage

type SecretStorage interface {
	// List list all secret within the given project ID.
	// The secrets returned is in encrypted form
	List(projectId models.Id) ([]*models.Secret, error)

	// Save encrypt and save a plain text secret.
	// The secrets returned is in encrypted form
	Save(secret *models.Secret) (*models.Secret, error)

	// GetAsPlainText return a secret in plain text
	GetAsPlainText(id models.Id, projectId models.Id) (*models.Secret, error)

	// GetByNameAsPlainText return a secret in plain text
	GetByNameAsPlainText(name string, projectId models.Id) (*models.Secret, error)

	// Delete delete secret
	Delete(id models.Id, projectId models.Id) error
}

func NewSecretStorage

func NewSecretStorage(db *gorm.DB, passphrase string) SecretStorage

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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