Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByApplicationInput ¶
type ByApplicationInput struct { // ApplicationID identifier of the application. ApplicationID string }
ByApplicationInput input to get an HSMConnector given an application.
type DefaultHSMConnectionResolver ¶
type DefaultHSMConnectionResolver struct {
// contains filtered or unexported fields
}
DefaultHSMConnectionResolver implements the HSMRouter interface. It doesn't cache connections.
func ProvideDefaultHSMConnectionResolver ¶
func ProvideDefaultHSMConnectionResolver(options DefaultHSMConnectionResolverOptions) (*DefaultHSMConnectionResolver, error)
ProvideDefaultHSMConnectionResolver creates a new instance of DefaultHSMConnectionResolver using the provided options, returning an error if it fails.
func (*DefaultHSMConnectionResolver) ByApplication ¶
func (u *DefaultHSMConnectionResolver) ByApplication(ctx context.Context, input ByApplicationInput) (*HSMConnection, error)
type DefaultHSMConnectionResolverOptions ¶
type DefaultHSMConnectionResolverOptions struct { // ModuleUseCase provides the HSM resources ModuleUseCase hsmmodule.HSMModuleUseCase // SlotUseCase provides the HSM slot resources SlotUseCase hsmslot.HSMSlotUseCase // ApplicationUseCase provides the Application resources ApplicationUseCase application.ApplicationUseCase }
DefaultHSMConnectionResolverOptions defines options to create a new instance of DefaultHSMConnectionResolver.
type HSMConnection ¶
type HSMConnection struct { // Slot the HSM slot. Slot string // Pin the pin of the slot. Pin string // ModuleKind type of the HSM module. ModuleKind string // ChainID application's chain ID. ChainID entities.Int256 }
HSMConnection HSM connection details.
type Resolver ¶
type Resolver interface { // ByApplication returns the HSMConnection to use by a specific application depending on its configuration. It returns an error if it fails. ByApplication(ctx context.Context, input ByApplicationInput) (*HSMConnection, error) }
Resolver finds what HSMConnection is required depending on the constraints.
Click to show internal directories.
Click to hide internal directories.