Documentation ¶
Overview ¶
Package consensus is a generated GoMock package.
Index ¶
- type Consensus
- type MockConsensus
- func (m *MockConsensus) AvailableGlobalVirtualGroupFamilies(ctx context.Context, globalVirtualGroupFamiliesIDs []uint32) ([]uint32, error)
- func (m *MockConsensus) Close() error
- func (m *MockConsensus) ConfirmTransaction(ctx context.Context, txHash string) (*types3.TxResponse, error)
- func (m *MockConsensus) CurrentHeight(ctx context.Context) (uint64, error)
- func (m *MockConsensus) EXPECT() *MockConsensusMockRecorder
- func (m *MockConsensus) HasAccount(ctx context.Context, account string) (bool, error)
- func (m *MockConsensus) ListBondedValidators(ctx context.Context) ([]types4.Validator, error)
- func (m *MockConsensus) ListGlobalVirtualGroupsByFamilyID(ctx context.Context, vgfID uint32) ([]*types2.GlobalVirtualGroup, error)
- func (m *MockConsensus) ListSPs(ctx context.Context) ([]*types0.StorageProvider, error)
- func (m *MockConsensus) ListVirtualGroupFamilies(ctx context.Context, spID uint32) ([]*types2.GlobalVirtualGroupFamily, error)
- func (m *MockConsensus) ListenObjectSeal(ctx context.Context, objectID uint64, timeOutHeight int) (bool, error)
- func (m *MockConsensus) ListenRejectUnSealObject(ctx context.Context, objectID uint64, timeoutHeight int) (bool, error)
- func (m *MockConsensus) QueryBucketExtraInfo(ctx context.Context, bucket string) (*types1.BucketExtraInfo, error)
- func (m *MockConsensus) QueryBucketInfo(ctx context.Context, bucket string) (*types1.BucketInfo, error)
- func (m *MockConsensus) QueryBucketInfoAndObjectInfo(ctx context.Context, bucket, object string) (*types1.BucketInfo, *types1.ObjectInfo, error)
- func (m *MockConsensus) QueryBucketInfoById(ctx context.Context, bucketId uint64) (*types1.BucketInfo, error)
- func (m *MockConsensus) QueryGlobalVirtualGroup(ctx context.Context, gvgID uint32) (*types2.GlobalVirtualGroup, error)
- func (m *MockConsensus) QueryObjectInfo(ctx context.Context, bucket, object string) (*types1.ObjectInfo, error)
- func (m *MockConsensus) QueryObjectInfoByID(ctx context.Context, objectID string) (*types1.ObjectInfo, error)
- func (m *MockConsensus) QueryPaymentStreamRecord(ctx context.Context, account string) (*types.StreamRecord, error)
- func (m *MockConsensus) QuerySP(arg0 context.Context, arg1 string) (*types0.StorageProvider, error)
- func (m *MockConsensus) QuerySPByID(arg0 context.Context, arg1 uint32) (*types0.StorageProvider, error)
- func (m *MockConsensus) QuerySPFreeQuota(arg0 context.Context, arg1 string) (uint64, error)
- func (m *MockConsensus) QuerySPPrice(ctx context.Context, operatorAddress string) (types0.SpStoragePrice, error)
- func (m *MockConsensus) QueryShadowObjectInfo(ctx context.Context, bucket, object string) (*types1.ShadowObjectInfo, error)
- func (m *MockConsensus) QueryStorageParams(ctx context.Context) (*types1.Params, error)
- func (m *MockConsensus) QueryStorageParamsByTimestamp(ctx context.Context, timestamp int64) (*types1.Params, error)
- func (m *MockConsensus) QuerySwapInInfo(ctx context.Context, familyID, gvgID uint32) (*types2.SwapInInfo, error)
- func (m *MockConsensus) QueryVirtualGroupFamily(ctx context.Context, vgfID uint32) (*types2.GlobalVirtualGroupFamily, error)
- func (m *MockConsensus) QueryVirtualGroupParams(ctx context.Context) (*types2.Params, error)
- func (m *MockConsensus) VerifyGetObjectPermission(ctx context.Context, account, bucket, object string) (bool, error)
- func (m *MockConsensus) VerifyPutObjectPermission(ctx context.Context, account, bucket, object string) (bool, error)
- func (m *MockConsensus) VerifyUpdateObjectPermission(ctx context.Context, account, bucket, object string) (bool, error)
- func (m *MockConsensus) WaitForNextBlock(ctx context.Context) error
- type MockConsensusMockRecorder
- func (mr *MockConsensusMockRecorder) AvailableGlobalVirtualGroupFamilies(ctx, globalVirtualGroupFamiliesIDs any) *gomock.Call
- func (mr *MockConsensusMockRecorder) Close() *gomock.Call
- func (mr *MockConsensusMockRecorder) ConfirmTransaction(ctx, txHash any) *gomock.Call
- func (mr *MockConsensusMockRecorder) CurrentHeight(ctx any) *gomock.Call
- func (mr *MockConsensusMockRecorder) HasAccount(ctx, account any) *gomock.Call
- func (mr *MockConsensusMockRecorder) ListBondedValidators(ctx any) *gomock.Call
- func (mr *MockConsensusMockRecorder) ListGlobalVirtualGroupsByFamilyID(ctx, vgfID any) *gomock.Call
- func (mr *MockConsensusMockRecorder) ListSPs(ctx any) *gomock.Call
- func (mr *MockConsensusMockRecorder) ListVirtualGroupFamilies(ctx, spID any) *gomock.Call
- func (mr *MockConsensusMockRecorder) ListenObjectSeal(ctx, objectID, timeOutHeight any) *gomock.Call
- func (mr *MockConsensusMockRecorder) ListenRejectUnSealObject(ctx, objectID, timeoutHeight any) *gomock.Call
- func (mr *MockConsensusMockRecorder) QueryBucketExtraInfo(ctx, bucket any) *gomock.Call
- func (mr *MockConsensusMockRecorder) QueryBucketInfo(ctx, bucket any) *gomock.Call
- func (mr *MockConsensusMockRecorder) QueryBucketInfoAndObjectInfo(ctx, bucket, object any) *gomock.Call
- func (mr *MockConsensusMockRecorder) QueryBucketInfoById(ctx, bucketId any) *gomock.Call
- func (mr *MockConsensusMockRecorder) QueryGlobalVirtualGroup(ctx, gvgID any) *gomock.Call
- func (mr *MockConsensusMockRecorder) QueryObjectInfo(ctx, bucket, object any) *gomock.Call
- func (mr *MockConsensusMockRecorder) QueryObjectInfoByID(ctx, objectID any) *gomock.Call
- func (mr *MockConsensusMockRecorder) QueryPaymentStreamRecord(ctx, account any) *gomock.Call
- func (mr *MockConsensusMockRecorder) QuerySP(arg0, arg1 any) *gomock.Call
- func (mr *MockConsensusMockRecorder) QuerySPByID(arg0, arg1 any) *gomock.Call
- func (mr *MockConsensusMockRecorder) QuerySPFreeQuota(arg0, arg1 any) *gomock.Call
- func (mr *MockConsensusMockRecorder) QuerySPPrice(ctx, operatorAddress any) *gomock.Call
- func (mr *MockConsensusMockRecorder) QueryShadowObjectInfo(ctx, bucket, object any) *gomock.Call
- func (mr *MockConsensusMockRecorder) QueryStorageParams(ctx any) *gomock.Call
- func (mr *MockConsensusMockRecorder) QueryStorageParamsByTimestamp(ctx, timestamp any) *gomock.Call
- func (mr *MockConsensusMockRecorder) QuerySwapInInfo(ctx, familyID, gvgID any) *gomock.Call
- func (mr *MockConsensusMockRecorder) QueryVirtualGroupFamily(ctx, vgfID any) *gomock.Call
- func (mr *MockConsensusMockRecorder) QueryVirtualGroupParams(ctx any) *gomock.Call
- func (mr *MockConsensusMockRecorder) VerifyGetObjectPermission(ctx, account, bucket, object any) *gomock.Call
- func (mr *MockConsensusMockRecorder) VerifyPutObjectPermission(ctx, account, bucket, object any) *gomock.Call
- func (mr *MockConsensusMockRecorder) VerifyUpdateObjectPermission(ctx, account, bucket, object any) *gomock.Call
- func (mr *MockConsensusMockRecorder) WaitForNextBlock(ctx any) *gomock.Call
- type NullConsensus
- func (*NullConsensus) AvailableGlobalVirtualGroupFamilies(context.Context, []uint32) ([]uint32, error)
- func (*NullConsensus) Close() error
- func (*NullConsensus) ConfirmTransaction(context.Context, string) (*sdk.TxResponse, error)
- func (*NullConsensus) CurrentHeight(context.Context) (uint64, error)
- func (*NullConsensus) HasAccount(context.Context, string) (bool, error)
- func (*NullConsensus) ListBondedValidators(context.Context) ([]stakingtypes.Validator, error)
- func (*NullConsensus) ListGlobalVirtualGroupsByFamilyID(context.Context, uint32) ([]*virtualgrouptypes.GlobalVirtualGroup, error)
- func (*NullConsensus) ListSPs(context.Context) ([]*sptypes.StorageProvider, error)
- func (*NullConsensus) ListVirtualGroupFamilies(context.Context, uint32) ([]*virtualgrouptypes.GlobalVirtualGroupFamily, error)
- func (*NullConsensus) ListenObjectSeal(context.Context, uint64, int) (bool, error)
- func (*NullConsensus) ListenRejectUnSealObject(context.Context, uint64, int) (bool, error)
- func (*NullConsensus) QueryBucketExtraInfo(context.Context, string) (*storagetypes.BucketExtraInfo, error)
- func (*NullConsensus) QueryBucketInfo(context.Context, string) (*storagetypes.BucketInfo, error)
- func (*NullConsensus) QueryBucketInfoAndObjectInfo(context.Context, string, string) (*storagetypes.BucketInfo, *storagetypes.ObjectInfo, error)
- func (*NullConsensus) QueryBucketInfoById(context.Context, uint64) (*storagetypes.BucketInfo, error)
- func (*NullConsensus) QueryGlobalVirtualGroup(context.Context, uint32) (*virtualgrouptypes.GlobalVirtualGroup, error)
- func (*NullConsensus) QueryObjectInfo(context.Context, string, string) (*storagetypes.ObjectInfo, error)
- func (*NullConsensus) QueryObjectInfoByID(context.Context, string) (*storagetypes.ObjectInfo, error)
- func (*NullConsensus) QueryPaymentStreamRecord(context.Context, string) (*paymenttypes.StreamRecord, error)
- func (*NullConsensus) QuerySP(context.Context, string) (*sptypes.StorageProvider, error)
- func (*NullConsensus) QuerySPByID(context.Context, uint32) (*sptypes.StorageProvider, error)
- func (*NullConsensus) QuerySPFreeQuota(context.Context, string) (uint64, error)
- func (*NullConsensus) QuerySPPrice(context.Context, string) (sptypes.SpStoragePrice, error)
- func (c *NullConsensus) QueryShadowObjectInfo(ctx context.Context, bucket, object string) (*storagetypes.ShadowObjectInfo, error)
- func (*NullConsensus) QueryStorageParams(context.Context) (*storagetypes.Params, error)
- func (*NullConsensus) QueryStorageParamsByTimestamp(context.Context, int64) (*storagetypes.Params, error)
- func (c *NullConsensus) QuerySwapInInfo(ctx context.Context, familyID, gvgID uint32) (*virtualgrouptypes.SwapInInfo, error)
- func (*NullConsensus) QueryVirtualGroupFamily(context.Context, uint32) (*virtualgrouptypes.GlobalVirtualGroupFamily, error)
- func (*NullConsensus) QueryVirtualGroupParams(context.Context) (*virtualgrouptypes.Params, error)
- func (*NullConsensus) VerifyGetObjectPermission(context.Context, string, string, string) (bool, error)
- func (*NullConsensus) VerifyPutObjectPermission(context.Context, string, string, string) (bool, error)
- func (c *NullConsensus) VerifyUpdateObjectPermission(ctx context.Context, account, bucket, object string) (bool, error)
- func (*NullConsensus) WaitForNextBlock(context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Consensus ¶
type Consensus interface { // CurrentHeight returns the current greenfield height - 1, CurrentHeight(ctx context.Context) (uint64, error) // HasAccount returns an indicator whether the account has been created. HasAccount(ctx context.Context, account string) (bool, error) // ListSPs returns all SP info. ListSPs(ctx context.Context) ([]*sptypes.StorageProvider, error) // QuerySP returns the sp info by operator address. QuerySP(context.Context, string) (*sptypes.StorageProvider, error) // QuerySPByID returns the sp info by sp id. QuerySPByID(context.Context, uint32) (*sptypes.StorageProvider, error) // QuerySPFreeQuota returns the sp free quota by operator address. QuerySPFreeQuota(context.Context, string) (uint64, error) // QuerySPPrice returns the sp price info QuerySPPrice(ctx context.Context, operatorAddress string) (sptypes.SpStoragePrice, error) // ListBondedValidators returns all bonded validators info. ListBondedValidators(ctx context.Context) ([]stakingtypes.Validator, error) // ListVirtualGroupFamilies return all virtual group family which primary sp is spID. ListVirtualGroupFamilies(ctx context.Context, spID uint32) ([]*virtualgrouptypes.GlobalVirtualGroupFamily, error) // QueryVirtualGroupFamily return the virtual group family info. QueryVirtualGroupFamily(ctx context.Context, vgfID uint32) (*virtualgrouptypes.GlobalVirtualGroupFamily, error) // QueryGlobalVirtualGroup returns the global virtual group info. QueryGlobalVirtualGroup(ctx context.Context, gvgID uint32) (*virtualgrouptypes.GlobalVirtualGroup, error) // ListGlobalVirtualGroupsByFamilyID returns gvg list by family. ListGlobalVirtualGroupsByFamilyID(ctx context.Context, vgfID uint32) ([]*virtualgrouptypes.GlobalVirtualGroup, error) // AvailableGlobalVirtualGroupFamilies submits a list global virtual group families Id to chain and return the filtered families which are able to serve create bucket request. AvailableGlobalVirtualGroupFamilies(ctx context.Context, globalVirtualGroupFamiliesIDs []uint32) ([]uint32, error) // QueryVirtualGroupParams returns the virtual group params. QueryVirtualGroupParams(ctx context.Context) (*virtualgrouptypes.Params, error) // QueryStorageParams returns the storage params. QueryStorageParams(ctx context.Context) (params *storagetypes.Params, err error) // QueryStorageParamsByTimestamp returns the storage params by block create time. QueryStorageParamsByTimestamp(ctx context.Context, timestamp int64) (params *storagetypes.Params, err error) // QueryBucketInfo returns the bucket info by bucket name. QueryBucketInfo(ctx context.Context, bucket string) (*storagetypes.BucketInfo, error) // QueryBucketExtraInfo returns the bucket extra info by bucket name. QueryBucketExtraInfo(ctx context.Context, bucket string) (bucketInfo *storagetypes.BucketExtraInfo, err error) // QueryBucketInfoById returns the bucket info by bucket id. QueryBucketInfoById(ctx context.Context, bucketId uint64) (bucketInfo *storagetypes.BucketInfo, err error) // QueryObjectInfo returns the object info by bucket and object name. QueryObjectInfo(ctx context.Context, bucket, object string) (*storagetypes.ObjectInfo, error) // QueryObjectInfoByID returns the object info by object ID. QueryObjectInfoByID(ctx context.Context, objectID string) (*storagetypes.ObjectInfo, error) // QueryBucketInfoAndObjectInfo returns the bucket and object info by bucket and object name. QueryBucketInfoAndObjectInfo(ctx context.Context, bucket, object string) (*storagetypes.BucketInfo, *storagetypes.ObjectInfo, error) // QueryPaymentStreamRecord returns the account payment status. QueryPaymentStreamRecord(ctx context.Context, account string) (*paymenttypes.StreamRecord, error) // VerifyGetObjectPermission returns an indicator whether the account has permission to get object. VerifyGetObjectPermission(ctx context.Context, account, bucket, object string) (bool, error) // VerifyPutObjectPermission returns an indicator whether the account has permission to put object. VerifyPutObjectPermission(ctx context.Context, account, bucket, object string) (bool, error) // ListenObjectSeal returns an indicator whether the object is successfully sealed before timeOutHeight. ListenObjectSeal(ctx context.Context, objectID uint64, timeOutHeight int) (bool, error) // ListenRejectUnSealObject returns an indication of the object is rejected. ListenRejectUnSealObject(ctx context.Context, objectID uint64, timeoutHeight int) (bool, error) // ConfirmTransaction is used to confirm whether the transaction is on the chain. ConfirmTransaction(ctx context.Context, txHash string) (*sdk.TxResponse, error) // WaitForNextBlock is used to chain generate a new block. WaitForNextBlock(ctx context.Context) error // QuerySwapInInfo is used to query the onchain swapIn info QuerySwapInInfo(ctx context.Context, familyID, gvgID uint32) (*virtualgrouptypes.SwapInInfo, error) // VerifyUpdateObjectPermission returns an indicator whether the account has permission to update object. VerifyUpdateObjectPermission(ctx context.Context, account, bucket, object string) (bool, error) // QueryShadowObjectInfo is used to query the onchain ShadowObjectInfo QueryShadowObjectInfo(ctx context.Context, bucket, object string) (*storagetypes.ShadowObjectInfo, error) // Close the Consensus interface. Close() error }
Consensus is the interface to query greenfield consensus data. the consensus data can come from validator, full-node, or other off-chain data service
type MockConsensus ¶ added in v0.2.4
type MockConsensus struct {
// contains filtered or unexported fields
}
MockConsensus is a mock of Consensus interface.
func NewMockConsensus ¶ added in v0.2.4
func NewMockConsensus(ctrl *gomock.Controller) *MockConsensus
NewMockConsensus creates a new mock instance.
func (*MockConsensus) AvailableGlobalVirtualGroupFamilies ¶ added in v0.2.4
func (m *MockConsensus) AvailableGlobalVirtualGroupFamilies(ctx context.Context, globalVirtualGroupFamiliesIDs []uint32) ([]uint32, error)
AvailableGlobalVirtualGroupFamilies mocks base method.
func (*MockConsensus) Close ¶ added in v0.2.4
func (m *MockConsensus) Close() error
Close mocks base method.
func (*MockConsensus) ConfirmTransaction ¶ added in v0.2.4
func (m *MockConsensus) ConfirmTransaction(ctx context.Context, txHash string) (*types3.TxResponse, error)
ConfirmTransaction mocks base method.
func (*MockConsensus) CurrentHeight ¶ added in v0.2.4
func (m *MockConsensus) CurrentHeight(ctx context.Context) (uint64, error)
CurrentHeight mocks base method.
func (*MockConsensus) EXPECT ¶ added in v0.2.4
func (m *MockConsensus) EXPECT() *MockConsensusMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockConsensus) HasAccount ¶ added in v0.2.4
HasAccount mocks base method.
func (*MockConsensus) ListBondedValidators ¶ added in v0.2.4
ListBondedValidators mocks base method.
func (*MockConsensus) ListGlobalVirtualGroupsByFamilyID ¶ added in v0.2.4
func (m *MockConsensus) ListGlobalVirtualGroupsByFamilyID(ctx context.Context, vgfID uint32) ([]*types2.GlobalVirtualGroup, error)
ListGlobalVirtualGroupsByFamilyID mocks base method.
func (*MockConsensus) ListSPs ¶ added in v0.2.4
func (m *MockConsensus) ListSPs(ctx context.Context) ([]*types0.StorageProvider, error)
ListSPs mocks base method.
func (*MockConsensus) ListVirtualGroupFamilies ¶ added in v0.2.4
func (m *MockConsensus) ListVirtualGroupFamilies(ctx context.Context, spID uint32) ([]*types2.GlobalVirtualGroupFamily, error)
ListVirtualGroupFamilies mocks base method.
func (*MockConsensus) ListenObjectSeal ¶ added in v0.2.4
func (m *MockConsensus) ListenObjectSeal(ctx context.Context, objectID uint64, timeOutHeight int) (bool, error)
ListenObjectSeal mocks base method.
func (*MockConsensus) ListenRejectUnSealObject ¶ added in v0.2.4
func (m *MockConsensus) ListenRejectUnSealObject(ctx context.Context, objectID uint64, timeoutHeight int) (bool, error)
ListenRejectUnSealObject mocks base method.
func (*MockConsensus) QueryBucketExtraInfo ¶ added in v1.6.0
func (m *MockConsensus) QueryBucketExtraInfo(ctx context.Context, bucket string) (*types1.BucketExtraInfo, error)
QueryBucketExtraInfo mocks base method.
func (*MockConsensus) QueryBucketInfo ¶ added in v0.2.4
func (m *MockConsensus) QueryBucketInfo(ctx context.Context, bucket string) (*types1.BucketInfo, error)
QueryBucketInfo mocks base method.
func (*MockConsensus) QueryBucketInfoAndObjectInfo ¶ added in v0.2.4
func (m *MockConsensus) QueryBucketInfoAndObjectInfo(ctx context.Context, bucket, object string) (*types1.BucketInfo, *types1.ObjectInfo, error)
QueryBucketInfoAndObjectInfo mocks base method.
func (*MockConsensus) QueryBucketInfoById ¶ added in v0.2.4
func (m *MockConsensus) QueryBucketInfoById(ctx context.Context, bucketId uint64) (*types1.BucketInfo, error)
QueryBucketInfoById mocks base method.
func (*MockConsensus) QueryGlobalVirtualGroup ¶ added in v0.2.4
func (m *MockConsensus) QueryGlobalVirtualGroup(ctx context.Context, gvgID uint32) (*types2.GlobalVirtualGroup, error)
QueryGlobalVirtualGroup mocks base method.
func (*MockConsensus) QueryObjectInfo ¶ added in v0.2.4
func (m *MockConsensus) QueryObjectInfo(ctx context.Context, bucket, object string) (*types1.ObjectInfo, error)
QueryObjectInfo mocks base method.
func (*MockConsensus) QueryObjectInfoByID ¶ added in v0.2.4
func (m *MockConsensus) QueryObjectInfoByID(ctx context.Context, objectID string) (*types1.ObjectInfo, error)
QueryObjectInfoByID mocks base method.
func (*MockConsensus) QueryPaymentStreamRecord ¶ added in v0.2.4
func (m *MockConsensus) QueryPaymentStreamRecord(ctx context.Context, account string) (*types.StreamRecord, error)
QueryPaymentStreamRecord mocks base method.
func (*MockConsensus) QuerySP ¶ added in v0.2.4
func (m *MockConsensus) QuerySP(arg0 context.Context, arg1 string) (*types0.StorageProvider, error)
QuerySP mocks base method.
func (*MockConsensus) QuerySPByID ¶ added in v0.2.4
func (m *MockConsensus) QuerySPByID(arg0 context.Context, arg1 uint32) (*types0.StorageProvider, error)
QuerySPByID mocks base method.
func (*MockConsensus) QuerySPFreeQuota ¶ added in v0.2.4
QuerySPFreeQuota mocks base method.
func (*MockConsensus) QuerySPPrice ¶ added in v0.2.4
func (m *MockConsensus) QuerySPPrice(ctx context.Context, operatorAddress string) (types0.SpStoragePrice, error)
QuerySPPrice mocks base method.
func (*MockConsensus) QueryShadowObjectInfo ¶ added in v1.5.0
func (m *MockConsensus) QueryShadowObjectInfo(ctx context.Context, bucket, object string) (*types1.ShadowObjectInfo, error)
QueryShadowObjectInfo mocks base method.
func (*MockConsensus) QueryStorageParams ¶ added in v0.2.4
QueryStorageParams mocks base method.
func (*MockConsensus) QueryStorageParamsByTimestamp ¶ added in v0.2.4
func (m *MockConsensus) QueryStorageParamsByTimestamp(ctx context.Context, timestamp int64) (*types1.Params, error)
QueryStorageParamsByTimestamp mocks base method.
func (*MockConsensus) QuerySwapInInfo ¶ added in v1.3.0
func (m *MockConsensus) QuerySwapInInfo(ctx context.Context, familyID, gvgID uint32) (*types2.SwapInInfo, error)
QuerySwapInInfo mocks base method.
func (*MockConsensus) QueryVirtualGroupFamily ¶ added in v0.2.4
func (m *MockConsensus) QueryVirtualGroupFamily(ctx context.Context, vgfID uint32) (*types2.GlobalVirtualGroupFamily, error)
QueryVirtualGroupFamily mocks base method.
func (*MockConsensus) QueryVirtualGroupParams ¶ added in v0.2.4
QueryVirtualGroupParams mocks base method.
func (*MockConsensus) VerifyGetObjectPermission ¶ added in v0.2.4
func (m *MockConsensus) VerifyGetObjectPermission(ctx context.Context, account, bucket, object string) (bool, error)
VerifyGetObjectPermission mocks base method.
func (*MockConsensus) VerifyPutObjectPermission ¶ added in v0.2.4
func (m *MockConsensus) VerifyPutObjectPermission(ctx context.Context, account, bucket, object string) (bool, error)
VerifyPutObjectPermission mocks base method.
func (*MockConsensus) VerifyUpdateObjectPermission ¶ added in v1.5.0
func (m *MockConsensus) VerifyUpdateObjectPermission(ctx context.Context, account, bucket, object string) (bool, error)
VerifyUpdateObjectPermission mocks base method.
func (*MockConsensus) WaitForNextBlock ¶ added in v0.2.4
func (m *MockConsensus) WaitForNextBlock(ctx context.Context) error
WaitForNextBlock mocks base method.
type MockConsensusMockRecorder ¶ added in v0.2.4
type MockConsensusMockRecorder struct {
// contains filtered or unexported fields
}
MockConsensusMockRecorder is the mock recorder for MockConsensus.
func (*MockConsensusMockRecorder) AvailableGlobalVirtualGroupFamilies ¶ added in v0.2.4
func (mr *MockConsensusMockRecorder) AvailableGlobalVirtualGroupFamilies(ctx, globalVirtualGroupFamiliesIDs any) *gomock.Call
AvailableGlobalVirtualGroupFamilies indicates an expected call of AvailableGlobalVirtualGroupFamilies.
func (*MockConsensusMockRecorder) Close ¶ added in v0.2.4
func (mr *MockConsensusMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockConsensusMockRecorder) ConfirmTransaction ¶ added in v0.2.4
func (mr *MockConsensusMockRecorder) ConfirmTransaction(ctx, txHash any) *gomock.Call
ConfirmTransaction indicates an expected call of ConfirmTransaction.
func (*MockConsensusMockRecorder) CurrentHeight ¶ added in v0.2.4
func (mr *MockConsensusMockRecorder) CurrentHeight(ctx any) *gomock.Call
CurrentHeight indicates an expected call of CurrentHeight.
func (*MockConsensusMockRecorder) HasAccount ¶ added in v0.2.4
func (mr *MockConsensusMockRecorder) HasAccount(ctx, account any) *gomock.Call
HasAccount indicates an expected call of HasAccount.
func (*MockConsensusMockRecorder) ListBondedValidators ¶ added in v0.2.4
func (mr *MockConsensusMockRecorder) ListBondedValidators(ctx any) *gomock.Call
ListBondedValidators indicates an expected call of ListBondedValidators.
func (*MockConsensusMockRecorder) ListGlobalVirtualGroupsByFamilyID ¶ added in v0.2.4
func (mr *MockConsensusMockRecorder) ListGlobalVirtualGroupsByFamilyID(ctx, vgfID any) *gomock.Call
ListGlobalVirtualGroupsByFamilyID indicates an expected call of ListGlobalVirtualGroupsByFamilyID.
func (*MockConsensusMockRecorder) ListSPs ¶ added in v0.2.4
func (mr *MockConsensusMockRecorder) ListSPs(ctx any) *gomock.Call
ListSPs indicates an expected call of ListSPs.
func (*MockConsensusMockRecorder) ListVirtualGroupFamilies ¶ added in v0.2.4
func (mr *MockConsensusMockRecorder) ListVirtualGroupFamilies(ctx, spID any) *gomock.Call
ListVirtualGroupFamilies indicates an expected call of ListVirtualGroupFamilies.
func (*MockConsensusMockRecorder) ListenObjectSeal ¶ added in v0.2.4
func (mr *MockConsensusMockRecorder) ListenObjectSeal(ctx, objectID, timeOutHeight any) *gomock.Call
ListenObjectSeal indicates an expected call of ListenObjectSeal.
func (*MockConsensusMockRecorder) ListenRejectUnSealObject ¶ added in v0.2.4
func (mr *MockConsensusMockRecorder) ListenRejectUnSealObject(ctx, objectID, timeoutHeight any) *gomock.Call
ListenRejectUnSealObject indicates an expected call of ListenRejectUnSealObject.
func (*MockConsensusMockRecorder) QueryBucketExtraInfo ¶ added in v1.6.0
func (mr *MockConsensusMockRecorder) QueryBucketExtraInfo(ctx, bucket any) *gomock.Call
QueryBucketExtraInfo indicates an expected call of QueryBucketExtraInfo.
func (*MockConsensusMockRecorder) QueryBucketInfo ¶ added in v0.2.4
func (mr *MockConsensusMockRecorder) QueryBucketInfo(ctx, bucket any) *gomock.Call
QueryBucketInfo indicates an expected call of QueryBucketInfo.
func (*MockConsensusMockRecorder) QueryBucketInfoAndObjectInfo ¶ added in v0.2.4
func (mr *MockConsensusMockRecorder) QueryBucketInfoAndObjectInfo(ctx, bucket, object any) *gomock.Call
QueryBucketInfoAndObjectInfo indicates an expected call of QueryBucketInfoAndObjectInfo.
func (*MockConsensusMockRecorder) QueryBucketInfoById ¶ added in v0.2.4
func (mr *MockConsensusMockRecorder) QueryBucketInfoById(ctx, bucketId any) *gomock.Call
QueryBucketInfoById indicates an expected call of QueryBucketInfoById.
func (*MockConsensusMockRecorder) QueryGlobalVirtualGroup ¶ added in v0.2.4
func (mr *MockConsensusMockRecorder) QueryGlobalVirtualGroup(ctx, gvgID any) *gomock.Call
QueryGlobalVirtualGroup indicates an expected call of QueryGlobalVirtualGroup.
func (*MockConsensusMockRecorder) QueryObjectInfo ¶ added in v0.2.4
func (mr *MockConsensusMockRecorder) QueryObjectInfo(ctx, bucket, object any) *gomock.Call
QueryObjectInfo indicates an expected call of QueryObjectInfo.
func (*MockConsensusMockRecorder) QueryObjectInfoByID ¶ added in v0.2.4
func (mr *MockConsensusMockRecorder) QueryObjectInfoByID(ctx, objectID any) *gomock.Call
QueryObjectInfoByID indicates an expected call of QueryObjectInfoByID.
func (*MockConsensusMockRecorder) QueryPaymentStreamRecord ¶ added in v0.2.4
func (mr *MockConsensusMockRecorder) QueryPaymentStreamRecord(ctx, account any) *gomock.Call
QueryPaymentStreamRecord indicates an expected call of QueryPaymentStreamRecord.
func (*MockConsensusMockRecorder) QuerySP ¶ added in v0.2.4
func (mr *MockConsensusMockRecorder) QuerySP(arg0, arg1 any) *gomock.Call
QuerySP indicates an expected call of QuerySP.
func (*MockConsensusMockRecorder) QuerySPByID ¶ added in v0.2.4
func (mr *MockConsensusMockRecorder) QuerySPByID(arg0, arg1 any) *gomock.Call
QuerySPByID indicates an expected call of QuerySPByID.
func (*MockConsensusMockRecorder) QuerySPFreeQuota ¶ added in v0.2.4
func (mr *MockConsensusMockRecorder) QuerySPFreeQuota(arg0, arg1 any) *gomock.Call
QuerySPFreeQuota indicates an expected call of QuerySPFreeQuota.
func (*MockConsensusMockRecorder) QuerySPPrice ¶ added in v0.2.4
func (mr *MockConsensusMockRecorder) QuerySPPrice(ctx, operatorAddress any) *gomock.Call
QuerySPPrice indicates an expected call of QuerySPPrice.
func (*MockConsensusMockRecorder) QueryShadowObjectInfo ¶ added in v1.5.0
func (mr *MockConsensusMockRecorder) QueryShadowObjectInfo(ctx, bucket, object any) *gomock.Call
QueryShadowObjectInfo indicates an expected call of QueryShadowObjectInfo.
func (*MockConsensusMockRecorder) QueryStorageParams ¶ added in v0.2.4
func (mr *MockConsensusMockRecorder) QueryStorageParams(ctx any) *gomock.Call
QueryStorageParams indicates an expected call of QueryStorageParams.
func (*MockConsensusMockRecorder) QueryStorageParamsByTimestamp ¶ added in v0.2.4
func (mr *MockConsensusMockRecorder) QueryStorageParamsByTimestamp(ctx, timestamp any) *gomock.Call
QueryStorageParamsByTimestamp indicates an expected call of QueryStorageParamsByTimestamp.
func (*MockConsensusMockRecorder) QuerySwapInInfo ¶ added in v1.3.0
func (mr *MockConsensusMockRecorder) QuerySwapInInfo(ctx, familyID, gvgID any) *gomock.Call
QuerySwapInInfo indicates an expected call of QuerySwapInInfo.
func (*MockConsensusMockRecorder) QueryVirtualGroupFamily ¶ added in v0.2.4
func (mr *MockConsensusMockRecorder) QueryVirtualGroupFamily(ctx, vgfID any) *gomock.Call
QueryVirtualGroupFamily indicates an expected call of QueryVirtualGroupFamily.
func (*MockConsensusMockRecorder) QueryVirtualGroupParams ¶ added in v0.2.4
func (mr *MockConsensusMockRecorder) QueryVirtualGroupParams(ctx any) *gomock.Call
QueryVirtualGroupParams indicates an expected call of QueryVirtualGroupParams.
func (*MockConsensusMockRecorder) VerifyGetObjectPermission ¶ added in v0.2.4
func (mr *MockConsensusMockRecorder) VerifyGetObjectPermission(ctx, account, bucket, object any) *gomock.Call
VerifyGetObjectPermission indicates an expected call of VerifyGetObjectPermission.
func (*MockConsensusMockRecorder) VerifyPutObjectPermission ¶ added in v0.2.4
func (mr *MockConsensusMockRecorder) VerifyPutObjectPermission(ctx, account, bucket, object any) *gomock.Call
VerifyPutObjectPermission indicates an expected call of VerifyPutObjectPermission.
func (*MockConsensusMockRecorder) VerifyUpdateObjectPermission ¶ added in v1.5.0
func (mr *MockConsensusMockRecorder) VerifyUpdateObjectPermission(ctx, account, bucket, object any) *gomock.Call
VerifyUpdateObjectPermission indicates an expected call of VerifyUpdateObjectPermission.
func (*MockConsensusMockRecorder) WaitForNextBlock ¶ added in v0.2.4
func (mr *MockConsensusMockRecorder) WaitForNextBlock(ctx any) *gomock.Call
WaitForNextBlock indicates an expected call of WaitForNextBlock.
type NullConsensus ¶
type NullConsensus struct{}
func (*NullConsensus) AvailableGlobalVirtualGroupFamilies ¶ added in v0.2.4
func (*NullConsensus) Close ¶
func (*NullConsensus) Close() error
func (*NullConsensus) ConfirmTransaction ¶ added in v0.2.4
func (*NullConsensus) ConfirmTransaction(context.Context, string) (*sdk.TxResponse, error)
func (*NullConsensus) CurrentHeight ¶
func (*NullConsensus) CurrentHeight(context.Context) (uint64, error)
func (*NullConsensus) HasAccount ¶
func (*NullConsensus) ListBondedValidators ¶
func (*NullConsensus) ListBondedValidators(context.Context) ([]stakingtypes.Validator, error)
func (*NullConsensus) ListGlobalVirtualGroupsByFamilyID ¶ added in v0.2.3
func (*NullConsensus) ListGlobalVirtualGroupsByFamilyID(context.Context, uint32) ([]*virtualgrouptypes.GlobalVirtualGroup, error)
func (*NullConsensus) ListSPs ¶
func (*NullConsensus) ListSPs(context.Context) ([]*sptypes.StorageProvider, error)
func (*NullConsensus) ListVirtualGroupFamilies ¶ added in v0.2.3
func (*NullConsensus) ListVirtualGroupFamilies(context.Context, uint32) ([]*virtualgrouptypes.GlobalVirtualGroupFamily, error)
func (*NullConsensus) ListenObjectSeal ¶
func (*NullConsensus) ListenRejectUnSealObject ¶
func (*NullConsensus) QueryBucketExtraInfo ¶ added in v1.6.0
func (*NullConsensus) QueryBucketExtraInfo(context.Context, string) (*storagetypes.BucketExtraInfo, error)
func (*NullConsensus) QueryBucketInfo ¶
func (*NullConsensus) QueryBucketInfo(context.Context, string) (*storagetypes.BucketInfo, error)
func (*NullConsensus) QueryBucketInfoAndObjectInfo ¶
func (*NullConsensus) QueryBucketInfoAndObjectInfo(context.Context, string, string) (*storagetypes.BucketInfo, *storagetypes.ObjectInfo, error)
func (*NullConsensus) QueryBucketInfoById ¶ added in v0.2.3
func (*NullConsensus) QueryBucketInfoById(context.Context, uint64) (*storagetypes.BucketInfo, error)
func (*NullConsensus) QueryGlobalVirtualGroup ¶ added in v0.2.3
func (*NullConsensus) QueryGlobalVirtualGroup(context.Context, uint32) (*virtualgrouptypes.GlobalVirtualGroup, error)
func (*NullConsensus) QueryObjectInfo ¶
func (*NullConsensus) QueryObjectInfo(context.Context, string, string) (*storagetypes.ObjectInfo, error)
func (*NullConsensus) QueryObjectInfoByID ¶
func (*NullConsensus) QueryObjectInfoByID(context.Context, string) (*storagetypes.ObjectInfo, error)
func (*NullConsensus) QueryPaymentStreamRecord ¶
func (*NullConsensus) QueryPaymentStreamRecord(context.Context, string) (*paymenttypes.StreamRecord, error)
func (*NullConsensus) QuerySP ¶ added in v0.2.3
func (*NullConsensus) QuerySP(context.Context, string) (*sptypes.StorageProvider, error)
func (*NullConsensus) QuerySPByID ¶ added in v0.2.3
func (*NullConsensus) QuerySPByID(context.Context, uint32) (*sptypes.StorageProvider, error)
func (*NullConsensus) QuerySPFreeQuota ¶ added in v0.2.3
func (*NullConsensus) QuerySPPrice ¶ added in v0.2.3
func (*NullConsensus) QuerySPPrice(context.Context, string) (sptypes.SpStoragePrice, error)
func (*NullConsensus) QueryShadowObjectInfo ¶ added in v1.5.0
func (c *NullConsensus) QueryShadowObjectInfo(ctx context.Context, bucket, object string) (*storagetypes.ShadowObjectInfo, error)
func (*NullConsensus) QueryStorageParams ¶
func (*NullConsensus) QueryStorageParams(context.Context) (*storagetypes.Params, error)
func (*NullConsensus) QueryStorageParamsByTimestamp ¶
func (*NullConsensus) QueryStorageParamsByTimestamp(context.Context, int64) (*storagetypes.Params, error)
func (*NullConsensus) QuerySwapInInfo ¶ added in v1.3.0
func (c *NullConsensus) QuerySwapInInfo(ctx context.Context, familyID, gvgID uint32) (*virtualgrouptypes.SwapInInfo, error)
func (*NullConsensus) QueryVirtualGroupFamily ¶ added in v0.2.3
func (*NullConsensus) QueryVirtualGroupFamily(context.Context, uint32) (*virtualgrouptypes.GlobalVirtualGroupFamily, error)
func (*NullConsensus) QueryVirtualGroupParams ¶ added in v0.2.3
func (*NullConsensus) QueryVirtualGroupParams(context.Context) (*virtualgrouptypes.Params, error)
func (*NullConsensus) VerifyGetObjectPermission ¶
func (*NullConsensus) VerifyPutObjectPermission ¶
func (*NullConsensus) VerifyUpdateObjectPermission ¶ added in v1.5.0
func (*NullConsensus) WaitForNextBlock ¶ added in v0.2.4
func (*NullConsensus) WaitForNextBlock(context.Context) error