transaction

package
v0.0.0-...-4834045 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package transaction is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockTransactionService

type MockTransactionService struct {
	// contains filtered or unexported fields
}

MockTransactionService is a mock of TransactionService interface.

func NewMockTransactionService

func NewMockTransactionService(ctrl *gomock.Controller) *MockTransactionService

NewMockTransactionService creates a new mock instance.

func (*MockTransactionService) AdminMysqlBegin

func (m *MockTransactionService) AdminMysqlBegin(ctx context.Context) (*gorm.DB, error)

AdminMysqlBegin mocks base method.

func (*MockTransactionService) AdminMysqlEnd

func (m *MockTransactionService) AdminMysqlEnd(ctx context.Context, tx *gorm.DB, err error)

AdminMysqlEnd mocks base method.

func (*MockTransactionService) CommonMysqlBegin

func (m *MockTransactionService) CommonMysqlBegin(ctx context.Context) (*gorm.DB, error)

CommonMysqlBegin mocks base method.

func (*MockTransactionService) CommonMysqlEnd

func (m *MockTransactionService) CommonMysqlEnd(ctx context.Context, tx *gorm.DB, err error)

CommonMysqlEnd mocks base method.

func (*MockTransactionService) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTransactionService) MasterMysqlBegin

func (m *MockTransactionService) MasterMysqlBegin(ctx context.Context) (*gorm.DB, error)

MasterMysqlBegin mocks base method.

func (*MockTransactionService) MasterMysqlEnd

func (m *MockTransactionService) MasterMysqlEnd(ctx context.Context, tx *gorm.DB, err error)

MasterMysqlEnd mocks base method.

func (*MockTransactionService) MultiUserMysqlBegin

func (m *MockTransactionService) MultiUserMysqlBegin(ctx context.Context, userIds []string) (map[string]*gorm.DB, error)

MultiUserMysqlBegin mocks base method.

func (*MockTransactionService) MultiUserMysqlEnd

func (m *MockTransactionService) MultiUserMysqlEnd(ctx context.Context, txs map[string]*gorm.DB, err error)

MultiUserMysqlEnd mocks base method.

func (*MockTransactionService) UserMysqlBegin

func (m *MockTransactionService) UserMysqlBegin(ctx context.Context, userId string) (*gorm.DB, error)

UserMysqlBegin mocks base method.

func (*MockTransactionService) UserMysqlEnd

func (m *MockTransactionService) UserMysqlEnd(ctx context.Context, tx *gorm.DB, err error)

UserMysqlEnd mocks base method.

func (*MockTransactionService) UserRedisBegin

func (m *MockTransactionService) UserRedisBegin() redis.Pipeliner

UserRedisBegin mocks base method.

func (*MockTransactionService) UserRedisEnd

func (m *MockTransactionService) UserRedisEnd(ctx context.Context, tx redis.Pipeliner, err error)

UserRedisEnd mocks base method.

type MockTransactionServiceMockRecorder

type MockTransactionServiceMockRecorder struct {
	// contains filtered or unexported fields
}

MockTransactionServiceMockRecorder is the mock recorder for MockTransactionService.

func (*MockTransactionServiceMockRecorder) AdminMysqlBegin

func (mr *MockTransactionServiceMockRecorder) AdminMysqlBegin(ctx interface{}) *gomock.Call

AdminMysqlBegin indicates an expected call of AdminMysqlBegin.

func (*MockTransactionServiceMockRecorder) AdminMysqlEnd

func (mr *MockTransactionServiceMockRecorder) AdminMysqlEnd(ctx, tx, err interface{}) *gomock.Call

AdminMysqlEnd indicates an expected call of AdminMysqlEnd.

func (*MockTransactionServiceMockRecorder) CommonMysqlBegin

func (mr *MockTransactionServiceMockRecorder) CommonMysqlBegin(ctx interface{}) *gomock.Call

CommonMysqlBegin indicates an expected call of CommonMysqlBegin.

func (*MockTransactionServiceMockRecorder) CommonMysqlEnd

func (mr *MockTransactionServiceMockRecorder) CommonMysqlEnd(ctx, tx, err interface{}) *gomock.Call

CommonMysqlEnd indicates an expected call of CommonMysqlEnd.

func (*MockTransactionServiceMockRecorder) MasterMysqlBegin

func (mr *MockTransactionServiceMockRecorder) MasterMysqlBegin(ctx interface{}) *gomock.Call

MasterMysqlBegin indicates an expected call of MasterMysqlBegin.

func (*MockTransactionServiceMockRecorder) MasterMysqlEnd

func (mr *MockTransactionServiceMockRecorder) MasterMysqlEnd(ctx, tx, err interface{}) *gomock.Call

MasterMysqlEnd indicates an expected call of MasterMysqlEnd.

func (*MockTransactionServiceMockRecorder) MultiUserMysqlBegin

func (mr *MockTransactionServiceMockRecorder) MultiUserMysqlBegin(ctx, userIds interface{}) *gomock.Call

MultiUserMysqlBegin indicates an expected call of MultiUserMysqlBegin.

func (*MockTransactionServiceMockRecorder) MultiUserMysqlEnd

func (mr *MockTransactionServiceMockRecorder) MultiUserMysqlEnd(ctx, txs, err interface{}) *gomock.Call

MultiUserMysqlEnd indicates an expected call of MultiUserMysqlEnd.

func (*MockTransactionServiceMockRecorder) UserMysqlBegin

func (mr *MockTransactionServiceMockRecorder) UserMysqlBegin(ctx, userId interface{}) *gomock.Call

UserMysqlBegin indicates an expected call of UserMysqlBegin.

func (*MockTransactionServiceMockRecorder) UserMysqlEnd

func (mr *MockTransactionServiceMockRecorder) UserMysqlEnd(ctx, tx, err interface{}) *gomock.Call

UserMysqlEnd indicates an expected call of UserMysqlEnd.

func (*MockTransactionServiceMockRecorder) UserRedisBegin

func (mr *MockTransactionServiceMockRecorder) UserRedisBegin() *gomock.Call

UserRedisBegin indicates an expected call of UserRedisBegin.

func (*MockTransactionServiceMockRecorder) UserRedisEnd

func (mr *MockTransactionServiceMockRecorder) UserRedisEnd(ctx, tx, err interface{}) *gomock.Call

UserRedisEnd indicates an expected call of UserRedisEnd.

type TransactionService

type TransactionService interface {
	AdminMysqlBegin(ctx context.Context) (*gorm.DB, error)
	AdminMysqlEnd(ctx context.Context, tx *gorm.DB, err error)
	CommonMysqlBegin(ctx context.Context) (*gorm.DB, error)
	CommonMysqlEnd(ctx context.Context, tx *gorm.DB, err error)
	MasterMysqlBegin(ctx context.Context) (*gorm.DB, error)
	MasterMysqlEnd(ctx context.Context, tx *gorm.DB, err error)
	UserMysqlBegin(ctx context.Context, userId string) (*gorm.DB, error)
	UserMysqlEnd(ctx context.Context, tx *gorm.DB, err error)
	MultiUserMysqlBegin(ctx context.Context, userIds []string) (map[string]*gorm.DB, error)
	MultiUserMysqlEnd(ctx context.Context, txs map[string]*gorm.DB, err error)
	UserRedisBegin() redis.Pipeliner
	UserRedisEnd(ctx context.Context, tx redis.Pipeliner, err error)
}

func NewTransactionService

func NewTransactionService(
	adminTransactionMysqlRepository adminTransaction.AdminTransactionMysqlRepository,
	commonTransactionMysqlRepository commonTransaction.CommonTransactionMysqlRepository,
	masterTransactionMysqlRepository masterTransaction.MasterTransactionMysqlRepository,
	userTransactionMysqlRepository userTransaction.UserTransactionMysqlRepository,
	userTransactionRedisRepository userTransaction.UserTransactionRedisRepository,
) TransactionService

Directories

Path Synopsis
Package adminTransaction is a generated GoMock package.
Package adminTransaction is a generated GoMock package.
Package commonTransaction is a generated GoMock package.
Package commonTransaction is a generated GoMock package.
Package masterTransaction is a generated GoMock package.
Package masterTransaction is a generated GoMock package.
Package userTransaction is a generated GoMock package.
Package userTransaction is a generated GoMock package.

Jump to

Keyboard shortcuts

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