Documentation ¶
Overview ¶
Package hsmdbout defines the output database adapters for the HSMModule resource.
Index ¶
- type Repository
- func (repository *Repository) Add(ctx context.Context, data hsmmodule.HSMModule) (*hsmmodule.HSMModule, error)
- func (repository *Repository) All(ctx context.Context, filters hsmmodule.HSMModuleFilters) (*hsmmodule.HSMModulesCollection, error)
- func (repository *Repository) Edit(ctx context.Context, data hsmmodule.HSMModule) (*hsmmodule.HSMModule, error)
- func (repository *Repository) Exists(ctx context.Context, id entities.StandardID) error
- func (repository *Repository) Filter() hsmmodule.HSMModuleFilters
- func (repository *Repository) Get(ctx context.Context, id entities.StandardID) (*hsmmodule.HSMModule, error)
- func (repository *Repository) Remove(ctx context.Context, id entities.StandardID) (*hsmmodule.HSMModule, error)
- type RepositoryOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
Repository implementation of hsmmodule.HSMModuleStorage
func NewRepository ¶
func NewRepository(options RepositoryOptions) (*Repository, error)
NewRepository creates a Repository with the given options
func (*Repository) Add ¶
func (repository *Repository) Add(ctx context.Context, data hsmmodule.HSMModule) (*hsmmodule.HSMModule, error)
Add an HSM to the database
func (*Repository) All ¶
func (repository *Repository) All(ctx context.Context, filters hsmmodule.HSMModuleFilters) (*hsmmodule.HSMModulesCollection, error)
All HSM from storage according to the provided filters
func (*Repository) Edit ¶
func (repository *Repository) Edit(ctx context.Context, data hsmmodule.HSMModule) (*hsmmodule.HSMModule, error)
Edit an HSM in storage
func (*Repository) Exists ¶
func (repository *Repository) Exists(ctx context.Context, id entities.StandardID) error
Exists checks if the HSM is present in storage
func (*Repository) Filter ¶
func (repository *Repository) Filter() hsmmodule.HSMModuleFilters
func (*Repository) Get ¶
func (repository *Repository) Get(ctx context.Context, id entities.StandardID) (*hsmmodule.HSMModule, error)
Get an HSM from storages
func (*Repository) Remove ¶
func (repository *Repository) Remove(ctx context.Context, id entities.StandardID) (*hsmmodule.HSMModule, error)
Remove removes an HSM from storage
type RepositoryOptions ¶
type RepositoryOptions struct {
Infra *hsmmoduledb.HardwareSecurityModuleRepositoryInfra
}
RepositoryOptions configures a Repository
Click to show internal directories.
Click to hide internal directories.