secrets

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service handles secret management

func NewService

func NewService(
	cfg *config.Config,
	log *logger.Logger,
	secretRepository models.SecretRepository,
	teeManager *tee.Manager,
) *Service

NewService creates a new secrets service

func (*Service) CreateSecret

func (s *Service) CreateSecret(ctx context.Context, userID int, name, value string) (*models.SecretMetadata, error)

CreateSecret creates a new secret

func (*Service) DeleteSecret

func (s *Service) DeleteSecret(ctx context.Context, id, userID int) error

DeleteSecret deletes a secret

func (*Service) GetSecret

func (s *Service) GetSecret(id, userID int) (*models.Secret, error)

GetSecret gets a secret by ID

func (*Service) GetSecretByName

func (s *Service) GetSecretByName(userID int, name string) (*models.Secret, error)

GetSecretByName gets a secret by name

func (*Service) ListSecrets

func (s *Service) ListSecrets(userID int) ([]*models.SecretMetadata, error)

ListSecrets lists secrets for a user

func (*Service) UpdateSecret

func (s *Service) UpdateSecret(ctx context.Context, id, userID int, value string) (*models.SecretMetadata, error)

UpdateSecret updates an existing secret

Jump to

Keyboard shortcuts

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