Documentation ¶
Index ¶
- type Config
- type ConfigProvider
- type DBDriver
- type DriverHolder
- func (h *DriverHolder[S, D, O]) GetByTMSId(sp serviceProvider, tmsID token.TMSID) (S, error)
- func (h *DriverHolder[S, D, O]) GetProvider(sp serviceProvider) (*Manager[S, D, O], error)
- func (h *DriverHolder[S, D, O]) NewManager(cp ConfigProvider, config Config) *Manager[S, D, O]
- func (h *DriverHolder[S, D, O]) Register(name drivers.DriverName, driver O)
- type Manager
- type NamedDriver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigProvider ¶
type ConfigProvider = driver.ConfigProvider
type DBDriver ¶
type DBDriver[D any] interface { Open(cp ConfigProvider, tmsid token.TMSID) (D, error) }
type DriverHolder ¶
type DriverHolder[S any, D any, O DBDriver[D]] struct { *drivers.Holder[*dbOpener[S, D, O]] // contains filtered or unexported fields }
func NewDriverHolder ¶
func NewDriverHolder[S any, D any, O DBDriver[D]](newDB dbInstantiator[S, D, O], ds ...NamedDriver[O]) *DriverHolder[S, D, O]
func (*DriverHolder[S, D, O]) GetByTMSId ¶
func (h *DriverHolder[S, D, O]) GetByTMSId(sp serviceProvider, tmsID token.TMSID) (S, error)
GetByTMSId returns the service for the given TMS id. Nil might be returned if the wallet is not found or an error occurred.
func (*DriverHolder[S, D, O]) GetProvider ¶
func (h *DriverHolder[S, D, O]) GetProvider(sp serviceProvider) (*Manager[S, D, O], error)
func (*DriverHolder[S, D, O]) NewManager ¶
func (h *DriverHolder[S, D, O]) NewManager(cp ConfigProvider, config Config) *Manager[S, D, O]
NewManager creates a new DB manager.
func (*DriverHolder[S, D, O]) Register ¶
func (h *DriverHolder[S, D, O]) Register(name drivers.DriverName, driver O)
type NamedDriver ¶
type NamedDriver[O any] driver3.NamedDriver[O]
Click to show internal directories.
Click to hide internal directories.