masterShard

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: 5 Imported by: 0

Documentation

Overview

Package masterShard シャード

Package masterShard シャード

Package masterShard is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MasterShard

type MasterShard struct {
	MasterShardId int64
	Name          string
	ShardKey      string
	Count         int32
}

func NewMasterShard

func NewMasterShard() *MasterShard

func SetMasterShard

func SetMasterShard(masterShardId int64, name string, shardKey string, count int32) *MasterShard

type MasterShardMysqlRepository

type MasterShardMysqlRepository interface {
	Find(ctx context.Context, masterShardId int64) (*MasterShard, error)
	FindOrNil(ctx context.Context, masterShardId int64) (*MasterShard, error)
	FindByShardKey(ctx context.Context, shardKey string) (*MasterShard, error)
	FindOrNilByShardKey(ctx context.Context, shardKey string) (*MasterShard, error)
	FindList(ctx context.Context) (MasterShards, error)
	FindListByShardKey(ctx context.Context, shardKey string) (MasterShards, error)
	Create(ctx context.Context, tx *gorm.DB, m *MasterShard) (*MasterShard, error)
	CreateList(ctx context.Context, tx *gorm.DB, ms MasterShards) (MasterShards, error)
	Update(ctx context.Context, tx *gorm.DB, m *MasterShard) (*MasterShard, error)
	UpdateList(ctx context.Context, tx *gorm.DB, ms MasterShards) (MasterShards, error)
	Delete(ctx context.Context, tx *gorm.DB, m *MasterShard) error
	DeleteList(ctx context.Context, tx *gorm.DB, ms MasterShards) error
}

type MasterShards

type MasterShards []*MasterShard
var MasterShardInstances MasterShards

func NewMasterShards

func NewMasterShards() MasterShards

func (*MasterShards) GetShardKey

func (s *MasterShards) GetShardKey(ctx context.Context, masterShardMysqlRepository MasterShardMysqlRepository) (string, error)

GetShardKey シャードキーを取得する

type MockMasterShardMysqlRepository

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

MockMasterShardMysqlRepository is a mock of MasterShardMysqlRepository interface.

func NewMockMasterShardMysqlRepository

func NewMockMasterShardMysqlRepository(ctrl *gomock.Controller) *MockMasterShardMysqlRepository

NewMockMasterShardMysqlRepository creates a new mock instance.

func (*MockMasterShardMysqlRepository) Create

Create mocks base method.

func (*MockMasterShardMysqlRepository) CreateList

CreateList mocks base method.

func (*MockMasterShardMysqlRepository) Delete

Delete mocks base method.

func (*MockMasterShardMysqlRepository) DeleteList

DeleteList mocks base method.

func (*MockMasterShardMysqlRepository) EXPECT

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

func (*MockMasterShardMysqlRepository) Find

func (m *MockMasterShardMysqlRepository) Find(ctx context.Context, masterShardId int64) (*MasterShard, error)

Find mocks base method.

func (*MockMasterShardMysqlRepository) FindByShardKey

func (m *MockMasterShardMysqlRepository) FindByShardKey(ctx context.Context, shardKey string) (*MasterShard, error)

FindByShardKey mocks base method.

func (*MockMasterShardMysqlRepository) FindList

FindList mocks base method.

func (*MockMasterShardMysqlRepository) FindListByShardKey

func (m *MockMasterShardMysqlRepository) FindListByShardKey(ctx context.Context, shardKey string) (MasterShards, error)

FindListByShardKey mocks base method.

func (*MockMasterShardMysqlRepository) FindOrNil

func (m *MockMasterShardMysqlRepository) FindOrNil(ctx context.Context, masterShardId int64) (*MasterShard, error)

FindOrNil mocks base method.

func (*MockMasterShardMysqlRepository) FindOrNilByShardKey

func (m *MockMasterShardMysqlRepository) FindOrNilByShardKey(ctx context.Context, shardKey string) (*MasterShard, error)

FindOrNilByShardKey mocks base method.

func (*MockMasterShardMysqlRepository) Update

Update mocks base method.

func (*MockMasterShardMysqlRepository) UpdateList

UpdateList mocks base method.

type MockMasterShardMysqlRepositoryMockRecorder

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

MockMasterShardMysqlRepositoryMockRecorder is the mock recorder for MockMasterShardMysqlRepository.

func (*MockMasterShardMysqlRepositoryMockRecorder) Create

func (mr *MockMasterShardMysqlRepositoryMockRecorder) Create(ctx, tx, m interface{}) *gomock.Call

Create indicates an expected call of Create.

func (*MockMasterShardMysqlRepositoryMockRecorder) CreateList

func (mr *MockMasterShardMysqlRepositoryMockRecorder) CreateList(ctx, tx, ms interface{}) *gomock.Call

CreateList indicates an expected call of CreateList.

func (*MockMasterShardMysqlRepositoryMockRecorder) Delete

func (mr *MockMasterShardMysqlRepositoryMockRecorder) Delete(ctx, tx, m interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockMasterShardMysqlRepositoryMockRecorder) DeleteList

func (mr *MockMasterShardMysqlRepositoryMockRecorder) DeleteList(ctx, tx, ms interface{}) *gomock.Call

DeleteList indicates an expected call of DeleteList.

func (*MockMasterShardMysqlRepositoryMockRecorder) Find

func (mr *MockMasterShardMysqlRepositoryMockRecorder) Find(ctx, masterShardId interface{}) *gomock.Call

Find indicates an expected call of Find.

func (*MockMasterShardMysqlRepositoryMockRecorder) FindByShardKey

func (mr *MockMasterShardMysqlRepositoryMockRecorder) FindByShardKey(ctx, shardKey interface{}) *gomock.Call

FindByShardKey indicates an expected call of FindByShardKey.

func (*MockMasterShardMysqlRepositoryMockRecorder) FindList

func (mr *MockMasterShardMysqlRepositoryMockRecorder) FindList(ctx interface{}) *gomock.Call

FindList indicates an expected call of FindList.

func (*MockMasterShardMysqlRepositoryMockRecorder) FindListByShardKey

func (mr *MockMasterShardMysqlRepositoryMockRecorder) FindListByShardKey(ctx, shardKey interface{}) *gomock.Call

FindListByShardKey indicates an expected call of FindListByShardKey.

func (*MockMasterShardMysqlRepositoryMockRecorder) FindOrNil

func (mr *MockMasterShardMysqlRepositoryMockRecorder) FindOrNil(ctx, masterShardId interface{}) *gomock.Call

FindOrNil indicates an expected call of FindOrNil.

func (*MockMasterShardMysqlRepositoryMockRecorder) FindOrNilByShardKey

func (mr *MockMasterShardMysqlRepositoryMockRecorder) FindOrNilByShardKey(ctx, shardKey interface{}) *gomock.Call

FindOrNilByShardKey indicates an expected call of FindOrNilByShardKey.

func (*MockMasterShardMysqlRepositoryMockRecorder) Update

func (mr *MockMasterShardMysqlRepositoryMockRecorder) Update(ctx, tx, m interface{}) *gomock.Call

Update indicates an expected call of Update.

func (*MockMasterShardMysqlRepositoryMockRecorder) UpdateList

func (mr *MockMasterShardMysqlRepositoryMockRecorder) UpdateList(ctx, tx, ms interface{}) *gomock.Call

UpdateList indicates an expected call of UpdateList.

Jump to

Keyboard shortcuts

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