Documentation ¶
Index ¶
- type CreateHSMSlotInput
- type CreateHSMSlotOutput
- type DefaultUseCase
- func (u *DefaultUseCase) CreateHSMSlot(ctx context.Context, input CreateHSMSlotInput) (*CreateHSMSlotOutput, error)
- func (u *DefaultUseCase) DeleteHSMSlot(ctx context.Context, input DeleteHSMSlotInput) (*DeleteHSMSlotOutput, error)
- func (u *DefaultUseCase) EditPin(ctx context.Context, input EditPinInput) (*EditPinOutput, error)
- func (u *DefaultUseCase) GetHSMSlot(ctx context.Context, input GetHSMSlotInput) (*GetHSMSlotOutput, error)
- func (u *DefaultUseCase) GetHSMSlotByApplication(ctx context.Context, input GetHSMSlotByApplicationInput) (*GetHSMSlotByApplicationOutput, error)
- func (u *DefaultUseCase) ListHSMSlotsByApplication(ctx context.Context, input ListHSMSlotsByApplicationInput) (*ListHSMSlotsByApplicationOutput, error)
- func (u *DefaultUseCase) ListHSMSlotsByHSMModule(ctx context.Context, input ListHSMSlotsByHSMModuleInput) (*ListHSMSlotsByHSMModuleOutput, error)
- type DefaultUseCaseOptions
- type DefaultUseCaseTransactionalDecorator
- func (_d *DefaultUseCaseTransactionalDecorator) CreateHSMSlot(ctx context.Context, input CreateHSMSlotInput) (*CreateHSMSlotOutput, error)
- func (_d *DefaultUseCaseTransactionalDecorator) DeleteHSMSlot(ctx context.Context, input DeleteHSMSlotInput) (*DeleteHSMSlotOutput, error)
- func (_d *DefaultUseCaseTransactionalDecorator) EditPin(ctx context.Context, input EditPinInput) (*EditPinOutput, error)
- func (_d *DefaultUseCaseTransactionalDecorator) GetHSMSlot(ctx context.Context, input GetHSMSlotInput) (*GetHSMSlotOutput, error)
- func (_d *DefaultUseCaseTransactionalDecorator) ListHSMSlotsByApplication(ctx context.Context, input ListHSMSlotsByApplicationInput) (*ListHSMSlotsByApplicationOutput, error)
- func (_d *DefaultUseCaseTransactionalDecorator) ListHSMSlotsByHSMModule(ctx context.Context, input ListHSMSlotsByHSMModuleInput) (*ListHSMSlotsByHSMModuleOutput, error)
- type DefaultUseCaseTransactionalDecoratorOptions
- type DeleteHSMSlotInput
- type DeleteHSMSlotOutput
- type EditPinInput
- type EditPinOutput
- type GetHSMSlotByApplicationInput
- type GetHSMSlotByApplicationOutput
- type GetHSMSlotInput
- type GetHSMSlotOutput
- type HSMSlot
- type HSMSlotCollection
- type HSMSlotFilters
- type HSMSlotStorage
- type HSMSlotUseCase
- type ListHSMSlotsByApplicationInput
- type ListHSMSlotsByApplicationOutput
- type ListHSMSlotsByHSMModuleInput
- type ListHSMSlotsByHSMModuleOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateHSMSlotInput ¶
type CreateHSMSlotInput struct { // ID defines the identifier of the User resource. ID *string `valid:"optional"` // ApplicationID defines the identifier of the Application of the HSMSlot. ApplicationID string `valid:"required"` // HSMModuleID defines the identifier of the module of the HSMSlot. HSMModuleID string `valid:"required"` // Slot defines the logical container on the HSM. Slot string `valid:"required"` // Pin defines the alphanumeric code used for authentication in the HSM. Pin string `valid:"required"` }
CreateHSMSlotInput configures the creation of an HSMSlot.
type CreateHSMSlotOutput ¶
type CreateHSMSlotOutput struct {
HSMSlot
}
CreateHSMSlotOutput defines the output of creating an HSMSlot.
type DefaultUseCase ¶
type DefaultUseCase struct {
// contains filtered or unexported fields
}
DefaultUseCase default management of User in configuration implementation.
func ProvideDefaultUseCase ¶
func ProvideDefaultUseCase(options DefaultUseCaseOptions) (*DefaultUseCase, error)
ProvideDefaultUseCase creates a DefaultUseCase with the given options.
func (*DefaultUseCase) CreateHSMSlot ¶
func (u *DefaultUseCase) CreateHSMSlot(ctx context.Context, input CreateHSMSlotInput) (*CreateHSMSlotOutput, error)
func (*DefaultUseCase) DeleteHSMSlot ¶
func (u *DefaultUseCase) DeleteHSMSlot(ctx context.Context, input DeleteHSMSlotInput) (*DeleteHSMSlotOutput, error)
func (*DefaultUseCase) EditPin ¶
func (u *DefaultUseCase) EditPin(ctx context.Context, input EditPinInput) (*EditPinOutput, error)
func (*DefaultUseCase) GetHSMSlot ¶
func (u *DefaultUseCase) GetHSMSlot(ctx context.Context, input GetHSMSlotInput) (*GetHSMSlotOutput, error)
func (*DefaultUseCase) GetHSMSlotByApplication ¶
func (u *DefaultUseCase) GetHSMSlotByApplication(ctx context.Context, input GetHSMSlotByApplicationInput) (*GetHSMSlotByApplicationOutput, error)
func (*DefaultUseCase) ListHSMSlotsByApplication ¶
func (u *DefaultUseCase) ListHSMSlotsByApplication(ctx context.Context, input ListHSMSlotsByApplicationInput) (*ListHSMSlotsByApplicationOutput, error)
func (*DefaultUseCase) ListHSMSlotsByHSMModule ¶
func (u *DefaultUseCase) ListHSMSlotsByHSMModule(ctx context.Context, input ListHSMSlotsByHSMModuleInput) (*ListHSMSlotsByHSMModuleOutput, error)
type DefaultUseCaseOptions ¶
type DefaultUseCaseOptions struct { // HSMSlotStorage is the persistence adapter of the HSMSlot. HSMSlotStorage HSMSlotStorage // ApplicationUseCase defines how to interact with Application resources. ApplicationUseCase application.ApplicationUseCase // HSMModuleUseCase defines how to interact with HSMModule resources. HSMModuleUseCase hsmmodule.HSMModuleUseCase // HSMConnector connects with the HSM and operates with it. HSMConnector hsmconnector.HSMConnector // ReferentialIntegrityUseCase to manage dependencies between resources. ReferentialIntegrityUseCase referentialintegrity.ReferentialIntegrityUseCase }
DefaultUseCaseOptions configures a DefaultUseCase.
type DefaultUseCaseTransactionalDecorator ¶
type DefaultUseCaseTransactionalDecorator struct { // DefaultUseCase is the usecase to be decorated. DefaultUseCase // contains filtered or unexported fields }
DefaultUseCaseTransactionalDecorator decorates struct DefaultUseCase wrapped with a transactional manager.
func ProvideDefaultUseCaseTransactionalDecorator ¶
func ProvideDefaultUseCaseTransactionalDecorator(options DefaultUseCaseTransactionalDecoratorOptions) (*DefaultUseCaseTransactionalDecorator, error)
ProvideDefaultUseCaseTransactionalDecorator creates a new DefaultUseCaseTransactionalDecorator.
func (*DefaultUseCaseTransactionalDecorator) CreateHSMSlot ¶
func (_d *DefaultUseCaseTransactionalDecorator) CreateHSMSlot(ctx context.Context, input CreateHSMSlotInput) (*CreateHSMSlotOutput, error)
CreateHSMSlot implements DefaultUseCase's CreateHSMSlot to be a transactional operation.
func (*DefaultUseCaseTransactionalDecorator) DeleteHSMSlot ¶
func (_d *DefaultUseCaseTransactionalDecorator) DeleteHSMSlot(ctx context.Context, input DeleteHSMSlotInput) (*DeleteHSMSlotOutput, error)
DeleteHSMSlot implements DefaultUseCase's DeleteHSMSlot to be a transactional operation.
func (*DefaultUseCaseTransactionalDecorator) EditPin ¶
func (_d *DefaultUseCaseTransactionalDecorator) EditPin(ctx context.Context, input EditPinInput) (*EditPinOutput, error)
EditPin implements DefaultUseCase's EditPin to be a transactional operation.
func (*DefaultUseCaseTransactionalDecorator) GetHSMSlot ¶
func (_d *DefaultUseCaseTransactionalDecorator) GetHSMSlot(ctx context.Context, input GetHSMSlotInput) (*GetHSMSlotOutput, error)
GetHSMSlot implements DefaultUseCase's GetHSMSlot to be a transactional operation
func (*DefaultUseCaseTransactionalDecorator) ListHSMSlotsByApplication ¶
func (_d *DefaultUseCaseTransactionalDecorator) ListHSMSlotsByApplication(ctx context.Context, input ListHSMSlotsByApplicationInput) (*ListHSMSlotsByApplicationOutput, error)
ListHSMSlotsByApplication implements DefaultUseCase's ListHSMSlotsByApplication to be a transactional operation.
func (*DefaultUseCaseTransactionalDecorator) ListHSMSlotsByHSMModule ¶
func (_d *DefaultUseCaseTransactionalDecorator) ListHSMSlotsByHSMModule(ctx context.Context, input ListHSMSlotsByHSMModuleInput) (*ListHSMSlotsByHSMModuleOutput, error)
ListHSMSlotsByHSMModule implements DefaultUseCase's ListHSMSlotsByHSMModule to be a transactional operation.
type DefaultUseCaseTransactionalDecoratorOptions ¶
type DefaultUseCaseTransactionalDecoratorOptions struct { // DefaultUseCase is the usecase to be decorated. DefaultUseCase *DefaultUseCase // TransactionalManager defines the functionality to execute a transaction in a transactional manner. TransactionalManager transactionalmanager.TransactionalManagerUseCase }
DefaultUseCaseTransactionalDecoratorOptions is the structure representing the DefaultUseCaseTransactionalDecorator dependencies.
type DeleteHSMSlotInput ¶
type DeleteHSMSlotInput struct {
entities.StandardID
}
DeleteHSMSlotInput configures the deletion of an HSMSlot.
type DeleteHSMSlotOutput ¶
type DeleteHSMSlotOutput struct {
HSMSlot
}
DeleteHSMSlotOutput defines the output of deleting an HSMSlot.
type EditPinInput ¶
type EditPinInput struct { entities.StandardID // ResourceVersion resource version for resource locking. ResourceVersion string `valid:"required"` // Pin defines the alphanumeric code used for authentication in the HSM. Pin string `valid:"required"` // HSMModuleID defines the alphanumeric code used for authentication in the HSM. HSMModuleID string `valid:"required"` }
EditPinInput configures the update of an HSMSlot's Pin.
type EditPinOutput ¶
type EditPinOutput struct {
HSMSlot
}
EditPinOutput defines the output of editing an HSMSlot's Pin.
type GetHSMSlotByApplicationInput ¶
type GetHSMSlotByApplicationInput struct {
ApplicationID entities.StandardID `valid:"required"`
}
GetHSMSlotByApplicationInput defines the input for getting an application's HSMSlot.
type GetHSMSlotByApplicationOutput ¶
type GetHSMSlotByApplicationOutput struct {
HSMSlot
}
GetHSMSlotByApplicationOutput defines the output of getting an application's HSMSlot.
type GetHSMSlotInput ¶
type GetHSMSlotInput struct {
entities.StandardID
}
GetHSMSlotInput defines the input for getting an HSMSlot.
type GetHSMSlotOutput ¶
type GetHSMSlotOutput struct {
HSMSlot
}
GetHSMSlotOutput defines the output of getting an HSMSlot.
type HSMSlot ¶
type HSMSlot struct { entities.StandardResourceMeta // InternalResourceID uniquely identifies an HSMSlot by a single ID. entities.InternalResourceID // ApplicationID defines the identifier of the Application of the HSMSlot. ApplicationID string `valid:"required"` // HSMModuleID defines the identifier of the module of the HSMSlot. HSMModuleID string `valid:"required"` // Slot defines the logical container on the HSM. Slot string `valid:"required"` // Pin defines the alphanumeric code used for authentication in the HSM. Pin string `valid:"required"` }
HSMSlot defines the HSMSlot resource.
type HSMSlotCollection ¶
type HSMSlotCollection struct { // Items HSMSlot in collection. Items []HSMSlot // StandardCollectionPage is the page data of the collection. entities.StandardCollectionPage }
HSMSlotCollection defines a collection of HSMSlot resources.
type HSMSlotFilters ¶
type HSMSlotFilters interface { // FilterByApplicationID filters the slots for a specific Application. FilterByApplicationID(applicationID entities.StandardID) HSMSlotFilters // FilterByHSMModuleID filters the slots for a specific HSM. FilterByHSMModuleID(hsmID entities.StandardID) HSMSlotFilters // OrderByCreationDate orders HSMSlot in storage by creation date. OrderByCreationDate(orderDirection persistence.OrderDirection) HSMSlotFilters // OrderByLastUpdateDate orders HSMSlot in storage by last update date. OrderByLastUpdateDate(orderDirection persistence.OrderDirection) HSMSlotFilters // Paged limits the maximum amount of items to limit parameter and starts the list in offset parameter. Paged(limit int, offset int) HSMSlotFilters }
HSMSlotFilters defines filter options for retrieving HSMSlots from storage.
type HSMSlotStorage ¶
type HSMSlotStorage interface { // Add an HSMSlot in storage. Add(ctx context.Context, data HSMSlot) (*HSMSlot, error) // Get an HSMSlot from storage. Get(ctx context.Context, id entities.StandardID) (*HSMSlot, error) // GetByApplication an HSMSlot from storage. GetByApplication(ctx context.Context, applicationID entities.StandardID) (*HSMSlot, error) // EditPin of an HSMSlot in storage. EditPin(ctx context.Context, data HSMSlot) (*HSMSlot, error) // Remove an HSMSlot in storage. Remove(ctx context.Context, id entities.StandardID) (*HSMSlot, error) // All HSMSlot in storage. All(ctx context.Context, filters HSMSlotFilters) (*HSMSlotCollection, error) // Filter all HSMSlot by specific properties. Filter() HSMSlotFilters }
HSMSlotStorage defines the functionality to interact with the HSMSlot in storage.
type HSMSlotUseCase ¶
type HSMSlotUseCase interface { // CreateHSMSlot creates a HSMSlot in storage and returns an error if it fails. CreateHSMSlot(ctx context.Context, input CreateHSMSlotInput) (*CreateHSMSlotOutput, error) // GetHSMSlot gets an HSMSlot by its ID in storage and returns an error if it fails. GetHSMSlot(ctx context.Context, input GetHSMSlotInput) (*GetHSMSlotOutput, error) // GetHSMSlotByApplication gets the HSMSlot for the specified application in storage and returns an error if it fails. GetHSMSlotByApplication(ctx context.Context, input GetHSMSlotByApplicationInput) (*GetHSMSlotByApplicationOutput, error) // EditPin edits the Pin of an HSMSlot in storage and returns an error if it fails. EditPin(ctx context.Context, input EditPinInput) (*EditPinOutput, error) // DeleteHSMSlot deletes a HSMSlot in storage and returns an error if it fails. DeleteHSMSlot(ctx context.Context, input DeleteHSMSlotInput) (*DeleteHSMSlotOutput, error) // ListHSMSlotsByApplication lists HSMSlot for a specific application in storage and returns an error if it fails. ListHSMSlotsByApplication(ctx context.Context, input ListHSMSlotsByApplicationInput) (*ListHSMSlotsByApplicationOutput, error) // ListHSMSlotsByHSMModule lists HSMSlot for a specific HSM in storage and returns an error if it fails. ListHSMSlotsByHSMModule(ctx context.Context, input ListHSMSlotsByHSMModuleInput) (*ListHSMSlotsByHSMModuleOutput, error) }
HSMSlotUseCase defines the management of HSMSlot in storage.
type ListHSMSlotsByApplicationInput ¶
type ListHSMSlotsByApplicationInput struct { // ApplicationID defines the identifier of the Application of the HSMSlot resource. ApplicationID entities.StandardID // PageLimit maximum amount of HSMSlot in list output. PageLimit int `valid:"natural"` // PageOffset amount of HSMSlot elapsed in list output. PageOffset int `valid:"natural"` // OrderBy whether to order by last update date. OrderBy string `valid:"optional"` // OrderDirection the direction in which the list will be ordered base on the attribute selected in OrderBy. OrderDirection string `valid:"optional"` }
ListHSMSlotsByApplicationInput defines all possible options to list HSMSlot resources for a specific Application.
type ListHSMSlotsByApplicationOutput ¶
type ListHSMSlotsByApplicationOutput struct {
HSMSlotCollection
}
ListHSMSlotsByApplicationOutput defines the output of listing HSMSlots for a specific Application.
type ListHSMSlotsByHSMModuleInput ¶
type ListHSMSlotsByHSMModuleInput struct { // HSMModuleID defines the identifier of the HSMModuleID of the HSMSlot resource. HSMModuleID entities.StandardID // PageLimit maximum amount of HSMSlot in list output. PageLimit int `valid:"natural"` // PageOffset amount of HSMSlot elapsed in list output. PageOffset int `valid:"natural"` // OrderBy whether to order by last update date. OrderBy string `valid:"optional"` // OrderDirection the direction in which the list will be ordered base on the attribute selected in OrderBy. OrderDirection string `valid:"optional"` // ApplicationID the application that will be used to filter the slots of the list ApplicationID *string `valid:"optional"` }
ListHSMSlotsByHSMModuleInput defines all possible options to list HSMSlot resources for a specific HSMModuleID.
type ListHSMSlotsByHSMModuleOutput ¶
type ListHSMSlotsByHSMModuleOutput struct {
HSMSlotCollection
}
ListHSMSlotsByHSMModuleOutput defines the output of listing HSMSlots for a specific HSMModuleID.