Documentation ¶
Overview ¶
Package datasource is a generated GoMock package.
Index ¶
- func ErrDBConnectionFailed(errs ...error) error
- type Connection
- type Context
- type MockConnection
- type MockConnectionMockRecorder
- type MockContext
- type MockContextMockRecorder
- type MockTransactionHandler
- type MockTransactionHandlerMockRecorder
- type StoreConnectionTypes
- type TransactionCtxKey
- type TransactionHandler
- type TransactionHandlerFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrDBConnectionFailed ¶
Types ¶
type Connection ¶
type Connection[T StoreConnectionTypes] interface { Connect() (T, error) Close() Context() Context }
func NewConnection ¶
type MockConnection ¶
type MockConnection[T StoreConnectionTypes] struct { // contains filtered or unexported fields }
MockConnection is a mock of Connection interface.
func NewMockConnection ¶
func NewMockConnection[T StoreConnectionTypes](ctrl *gomock.Controller) *MockConnection[T]
NewMockConnection creates a new mock instance.
func (*MockConnection[T]) Connect ¶
func (m *MockConnection[T]) Connect() (T, error)
Connect mocks base method.
func (*MockConnection[T]) Context ¶
func (m *MockConnection[T]) Context() Context
Context mocks base method.
func (*MockConnection[T]) EXPECT ¶
func (m *MockConnection[T]) EXPECT() *MockConnectionMockRecorder[T]
EXPECT returns an object that allows the caller to indicate expected use.
type MockConnectionMockRecorder ¶
type MockConnectionMockRecorder[T StoreConnectionTypes] struct { // contains filtered or unexported fields }
MockConnectionMockRecorder is the mock recorder for MockConnection.
func (*MockConnectionMockRecorder[T]) Close ¶
func (mr *MockConnectionMockRecorder[T]) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockConnectionMockRecorder[T]) Connect ¶
func (mr *MockConnectionMockRecorder[T]) Connect() *gomock.Call
Connect indicates an expected call of Connect.
func (*MockConnectionMockRecorder[T]) Context ¶
func (mr *MockConnectionMockRecorder[T]) Context() *gomock.Call
Context indicates an expected call of Context.
type MockContext ¶
type MockContext struct {
// contains filtered or unexported fields
}
MockContext is a mock of Context interface.
func NewMockContext ¶
func NewMockContext(ctrl *gomock.Controller) *MockContext
NewMockContext creates a new mock instance.
func (*MockContext) EXPECT ¶
func (m *MockContext) EXPECT() *MockContextMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockContextMockRecorder ¶
type MockContextMockRecorder struct {
// contains filtered or unexported fields
}
MockContextMockRecorder is the mock recorder for MockContext.
func (*MockContextMockRecorder) Server ¶
func (mr *MockContextMockRecorder) Server() *gomock.Call
Server indicates an expected call of Server.
func (*MockContextMockRecorder) Service ¶
func (mr *MockContextMockRecorder) Service() *gomock.Call
Service indicates an expected call of Service.
func (*MockContextMockRecorder) Url ¶
func (mr *MockContextMockRecorder) Url() *gomock.Call
Url indicates an expected call of Url.
type MockTransactionHandler ¶
type MockTransactionHandler[T StoreConnectionTypes] struct { // contains filtered or unexported fields }
MockTransactionHandler is a mock of TransactionHandler interface.
func NewMockTransactionHandler ¶
func NewMockTransactionHandler[T StoreConnectionTypes](ctrl *gomock.Controller) *MockTransactionHandler[T]
NewMockTransactionHandler creates a new mock instance.
func (*MockTransactionHandler[T]) EXPECT ¶
func (m *MockTransactionHandler[T]) EXPECT() *MockTransactionHandlerMockRecorder[T]
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockTransactionHandler[T]) HandleTransaction ¶
func (m *MockTransactionHandler[T]) HandleTransaction(ctx context.Context, fn TransactionHandlerFn[T]) error
HandleTransaction mocks base method.
type MockTransactionHandlerMockRecorder ¶
type MockTransactionHandlerMockRecorder[T StoreConnectionTypes] struct { // contains filtered or unexported fields }
MockTransactionHandlerMockRecorder is the mock recorder for MockTransactionHandler.
func (*MockTransactionHandlerMockRecorder[T]) HandleTransaction ¶
func (mr *MockTransactionHandlerMockRecorder[T]) HandleTransaction(ctx, fn any) *gomock.Call
HandleTransaction indicates an expected call of HandleTransaction.
type StoreConnectionTypes ¶
type TransactionCtxKey ¶
type TransactionCtxKey struct{}
type TransactionHandler ¶
type TransactionHandler[T StoreConnectionTypes] interface { HandleTransaction(ctx context.Context, fn TransactionHandlerFn[T]) error }
func NewOrmTransactionHandler ¶
func NewOrmTransactionHandler(connection Connection[*gorm.DB]) TransactionHandler[*gorm.DB]
type TransactionHandlerFn ¶
type TransactionHandlerFn[T StoreConnectionTypes] func(ctx context.Context, tx T) error