repository

package
v1.12.2-rc1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 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 ProjectRepository

type ProjectRepository interface {
	ListAll() ([]*models.Project, error)
	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 NewProjectRepository

func NewProjectRepository(db *gorm.DB) ProjectRepository

type SecretRepository

type SecretRepository interface {
	// Get return a secret given the secret id
	Get(id models.ID) (*models.Secret, error)
	// List lists all secret within the given project ID.
	List(projectID models.ID) ([]*models.Secret, error)
	// Save create or update a secret.
	Save(secret *models.Secret) (*models.Secret, error)
	// Delete delete secret given the secret id
	Delete(id models.ID) error
}

func NewSecretRepository

func NewSecretRepository(db *gorm.DB) SecretRepository

type SecretStorageRepository

type SecretStorageRepository interface {
	// Get returns a Secret Storage with given ID
	Get(id models.ID) (*models.SecretStorage, error)
	// List lists all Secret Storage within a project
	List(projectID models.ID) ([]*models.SecretStorage, error)
	// Save creates or updates a Secret Storage
	Save(secretStorage *models.SecretStorage) (*models.SecretStorage, error)
	// Delete deletes a Secret Storage
	Delete(id models.ID) error
	// ListAll lists all Secret Storage
	ListAll() ([]*models.SecretStorage, error)
	// GetGlobal return a global Secret Storage with a name
	GetGlobal(name string) (*models.SecretStorage, error)
	// ListGlobal lists all global Secret Storage
	ListGlobal() ([]*models.SecretStorage, error)
}

SecretStorageRepository is an interface for interacting with "secret_storages" table in DB

func NewSecretStorageRepository

func NewSecretStorageRepository(db *gorm.DB) SecretStorageRepository

NewSecretStorageRepository creates a new Secret Storage Repository

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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