hsmconnection

package
v0.0.0-...-29e199f Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

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

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.

Jump to

Keyboard shortcuts

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