Documentation ¶
Overview ¶
Package store is a generated GoMock package.
Index ¶
- Variables
- func NewStore(db *gorm.DB) *datastore
- type ChainStore
- type IStore
- type MinerSetStore
- type MinerStore
- type MockChainStore
- func (m *MockChainStore) Create(arg0 context.Context, arg1 *model.ChainM) error
- func (m *MockChainStore) Delete(arg0 context.Context, arg1 map[string]any) error
- func (m *MockChainStore) EXPECT() *MockChainStoreMockRecorder
- func (m *MockChainStore) Get(arg0 context.Context, arg1 map[string]any) (*model.ChainM, error)
- func (m *MockChainStore) List(arg0 context.Context, arg1 string, arg2 ...meta.ListOption) (int64, []*model.ChainM, error)
- func (m *MockChainStore) Update(arg0 context.Context, arg1 *model.ChainM) error
- type MockChainStoreMockRecorder
- func (mr *MockChainStoreMockRecorder) Create(arg0, arg1 any) *gomock.Call
- func (mr *MockChainStoreMockRecorder) Delete(arg0, arg1 any) *gomock.Call
- func (mr *MockChainStoreMockRecorder) Get(arg0, arg1 any) *gomock.Call
- func (mr *MockChainStoreMockRecorder) List(arg0, arg1 any, arg2 ...any) *gomock.Call
- func (mr *MockChainStoreMockRecorder) Update(arg0, arg1 any) *gomock.Call
- type MockIStore
- type MockIStoreMockRecorder
- type MockMinerSetStore
- func (m *MockMinerSetStore) Create(arg0 context.Context, arg1 *model.MinerSetM) error
- func (m *MockMinerSetStore) Delete(arg0 context.Context, arg1 map[string]any) error
- func (m *MockMinerSetStore) EXPECT() *MockMinerSetStoreMockRecorder
- func (m *MockMinerSetStore) Get(arg0 context.Context, arg1 map[string]any) (*model.MinerSetM, error)
- func (m *MockMinerSetStore) List(arg0 context.Context, arg1 string, arg2 ...meta.ListOption) (int64, []*model.MinerSetM, error)
- func (m *MockMinerSetStore) Update(arg0 context.Context, arg1 *model.MinerSetM) error
- type MockMinerSetStoreMockRecorder
- func (mr *MockMinerSetStoreMockRecorder) Create(arg0, arg1 any) *gomock.Call
- func (mr *MockMinerSetStoreMockRecorder) Delete(arg0, arg1 any) *gomock.Call
- func (mr *MockMinerSetStoreMockRecorder) Get(arg0, arg1 any) *gomock.Call
- func (mr *MockMinerSetStoreMockRecorder) List(arg0, arg1 any, arg2 ...any) *gomock.Call
- func (mr *MockMinerSetStoreMockRecorder) Update(arg0, arg1 any) *gomock.Call
- type MockMinerStore
- func (m *MockMinerStore) Create(arg0 context.Context, arg1 *model.MinerM) error
- func (m *MockMinerStore) Delete(arg0 context.Context, arg1 map[string]any) error
- func (m *MockMinerStore) EXPECT() *MockMinerStoreMockRecorder
- func (m *MockMinerStore) Get(arg0 context.Context, arg1 map[string]any) (*model.MinerM, error)
- func (m *MockMinerStore) List(arg0 context.Context, arg1 string, arg2 ...meta.ListOption) (int64, []*model.MinerM, error)
- func (m *MockMinerStore) Update(arg0 context.Context, arg1 *model.MinerM) error
- type MockMinerStoreMockRecorder
- func (mr *MockMinerStoreMockRecorder) Create(arg0, arg1 any) *gomock.Call
- func (mr *MockMinerStoreMockRecorder) Delete(arg0, arg1 any) *gomock.Call
- func (mr *MockMinerStoreMockRecorder) Get(arg0, arg1 any) *gomock.Call
- func (mr *MockMinerStoreMockRecorder) List(arg0, arg1 any, arg2 ...any) *gomock.Call
- func (mr *MockMinerStoreMockRecorder) Update(arg0, arg1 any) *gomock.Call
Constants ¶
This section is empty.
Variables ¶
ProviderSet is a set that initializes the Store and binds it to the IStore interface.
var (
S *datastore
)
Functions ¶
Types ¶
type ChainStore ¶
type ChainStore interface { Create(ctx context.Context, ch *model.ChainM) error Delete(ctx context.Context, filters map[string]any) error Update(ctx context.Context, ch *model.ChainM) error Get(ctx context.Context, filters map[string]any) (*model.ChainM, error) List(ctx context.Context, namespace string, opts ...meta.ListOption) (int64, []*model.ChainM, error) }
ChainStore defines the chain storage interface.
type IStore ¶
type IStore interface { TX(context.Context, func(ctx context.Context) error) error Chains() ChainStore Miners() MinerStore MinerSets() MinerSetStore }
IStore is an interface defining the required methods for a Store.
type MinerSetStore ¶
type MinerSetStore interface { Create(ctx context.Context, ms *model.MinerSetM) error Delete(ctx context.Context, filters map[string]any) error Update(ctx context.Context, ms *model.MinerSetM) error Get(ctx context.Context, filters map[string]any) (*model.MinerSetM, error) List(ctx context.Context, namespace string, opts ...meta.ListOption) (int64, []*model.MinerSetM, error) }
MinerSetStore defines the minerset storage interface.
type MinerStore ¶
type MinerStore interface { Create(ctx context.Context, miner *model.MinerM) error Delete(ctx context.Context, filters map[string]any) error Update(ctx context.Context, miner *model.MinerM) error Get(ctx context.Context, filters map[string]any) (*model.MinerM, error) List(ctx context.Context, namespace string, opts ...meta.ListOption) (int64, []*model.MinerM, error) }
MinerStore defines the miner storage interface.
type MockChainStore ¶
type MockChainStore struct {
// contains filtered or unexported fields
}
MockChainStore is a mock of ChainStore interface.
func NewMockChainStore ¶
func NewMockChainStore(ctrl *gomock.Controller) *MockChainStore
NewMockChainStore creates a new mock instance.
func (*MockChainStore) EXPECT ¶
func (m *MockChainStore) EXPECT() *MockChainStoreMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockChainStoreMockRecorder ¶
type MockChainStoreMockRecorder struct {
// contains filtered or unexported fields
}
MockChainStoreMockRecorder is the mock recorder for MockChainStore.
func (*MockChainStoreMockRecorder) Create ¶
func (mr *MockChainStoreMockRecorder) Create(arg0, arg1 any) *gomock.Call
Create indicates an expected call of Create.
func (*MockChainStoreMockRecorder) Delete ¶
func (mr *MockChainStoreMockRecorder) Delete(arg0, arg1 any) *gomock.Call
Delete indicates an expected call of Delete.
func (*MockChainStoreMockRecorder) Get ¶
func (mr *MockChainStoreMockRecorder) Get(arg0, arg1 any) *gomock.Call
Get indicates an expected call of Get.
type MockIStore ¶
type MockIStore struct {
// contains filtered or unexported fields
}
MockIStore is a mock of IStore interface.
func NewMockIStore ¶
func NewMockIStore(ctrl *gomock.Controller) *MockIStore
NewMockIStore creates a new mock instance.
func (*MockIStore) EXPECT ¶
func (m *MockIStore) EXPECT() *MockIStoreMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockIStore) MinerSets ¶
func (m *MockIStore) MinerSets() MinerSetStore
MinerSets mocks base method.
type MockIStoreMockRecorder ¶
type MockIStoreMockRecorder struct {
// contains filtered or unexported fields
}
MockIStoreMockRecorder is the mock recorder for MockIStore.
func (*MockIStoreMockRecorder) Chains ¶
func (mr *MockIStoreMockRecorder) Chains() *gomock.Call
Chains indicates an expected call of Chains.
func (*MockIStoreMockRecorder) MinerSets ¶
func (mr *MockIStoreMockRecorder) MinerSets() *gomock.Call
MinerSets indicates an expected call of MinerSets.
func (*MockIStoreMockRecorder) Miners ¶
func (mr *MockIStoreMockRecorder) Miners() *gomock.Call
Miners indicates an expected call of Miners.
type MockMinerSetStore ¶
type MockMinerSetStore struct {
// contains filtered or unexported fields
}
MockMinerSetStore is a mock of MinerSetStore interface.
func NewMockMinerSetStore ¶
func NewMockMinerSetStore(ctrl *gomock.Controller) *MockMinerSetStore
NewMockMinerSetStore creates a new mock instance.
func (*MockMinerSetStore) EXPECT ¶
func (m *MockMinerSetStore) EXPECT() *MockMinerSetStoreMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockMinerSetStore) Get ¶
func (m *MockMinerSetStore) Get(arg0 context.Context, arg1 map[string]any) (*model.MinerSetM, error)
Get mocks base method.
type MockMinerSetStoreMockRecorder ¶
type MockMinerSetStoreMockRecorder struct {
// contains filtered or unexported fields
}
MockMinerSetStoreMockRecorder is the mock recorder for MockMinerSetStore.
func (*MockMinerSetStoreMockRecorder) Create ¶
func (mr *MockMinerSetStoreMockRecorder) Create(arg0, arg1 any) *gomock.Call
Create indicates an expected call of Create.
func (*MockMinerSetStoreMockRecorder) Delete ¶
func (mr *MockMinerSetStoreMockRecorder) Delete(arg0, arg1 any) *gomock.Call
Delete indicates an expected call of Delete.
func (*MockMinerSetStoreMockRecorder) Get ¶
func (mr *MockMinerSetStoreMockRecorder) Get(arg0, arg1 any) *gomock.Call
Get indicates an expected call of Get.
type MockMinerStore ¶
type MockMinerStore struct {
// contains filtered or unexported fields
}
MockMinerStore is a mock of MinerStore interface.
func NewMockMinerStore ¶
func NewMockMinerStore(ctrl *gomock.Controller) *MockMinerStore
NewMockMinerStore creates a new mock instance.
func (*MockMinerStore) EXPECT ¶
func (m *MockMinerStore) EXPECT() *MockMinerStoreMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockMinerStoreMockRecorder ¶
type MockMinerStoreMockRecorder struct {
// contains filtered or unexported fields
}
MockMinerStoreMockRecorder is the mock recorder for MockMinerStore.
func (*MockMinerStoreMockRecorder) Create ¶
func (mr *MockMinerStoreMockRecorder) Create(arg0, arg1 any) *gomock.Call
Create indicates an expected call of Create.
func (*MockMinerStoreMockRecorder) Delete ¶
func (mr *MockMinerStoreMockRecorder) Delete(arg0, arg1 any) *gomock.Call
Delete indicates an expected call of Delete.
func (*MockMinerStoreMockRecorder) Get ¶
func (mr *MockMinerStoreMockRecorder) Get(arg0, arg1 any) *gomock.Call
Get indicates an expected call of Get.