Documentation ¶
Overview ¶
Package spdb is a generated GoMock package.
Index ¶
- type BucketFreeQuota
- type BucketQuota
- type BucketTraffic
- type GCObjectMeta
- type GCObjectProgressDB
- type IntegrityMeta
- type MigrateDB
- type MigrateGVGUnitMeta
- type MockGCObjectProgressDB
- func (m *MockGCObjectProgressDB) DeleteGCObjectProgress(taskKey string) error
- func (m *MockGCObjectProgressDB) EXPECT() *MockGCObjectProgressDBMockRecorder
- func (m *MockGCObjectProgressDB) GetGCMetasToGC(limit int) ([]*GCObjectMeta, error)
- func (m *MockGCObjectProgressDB) InsertGCObjectProgress(gcMeta *GCObjectMeta) error
- func (m *MockGCObjectProgressDB) UpdateGCObjectProgress(gcMeta *GCObjectMeta) error
- type MockGCObjectProgressDBMockRecorder
- func (mr *MockGCObjectProgressDBMockRecorder) DeleteGCObjectProgress(taskKey interface{}) *gomock.Call
- func (mr *MockGCObjectProgressDBMockRecorder) GetGCMetasToGC(limit interface{}) *gomock.Call
- func (mr *MockGCObjectProgressDBMockRecorder) InsertGCObjectProgress(gcMeta interface{}) *gomock.Call
- func (mr *MockGCObjectProgressDBMockRecorder) UpdateGCObjectProgress(gcMeta interface{}) *gomock.Call
- type MockMigrateDB
- func (m *MockMigrateDB) DeleteMigrateGVGUnit(meta *MigrateGVGUnitMeta) error
- func (m *MockMigrateDB) DeleteMigrateGVGUnitsByBucketID(bucketID uint64) error
- func (m *MockMigrateDB) EXPECT() *MockMigrateDBMockRecorder
- func (m *MockMigrateDB) InsertMigrateGVGUnit(meta *MigrateGVGUnitMeta) error
- func (m *MockMigrateDB) InsertSwapOutUnit(meta *SwapOutMeta) error
- func (m *MockMigrateDB) ListDestSPSwapOutUnits() ([]*SwapOutMeta, error)
- func (m *MockMigrateDB) ListMigrateGVGUnitsByBucketID(bucketID uint64) ([]*MigrateGVGUnitMeta, error)
- func (m *MockMigrateDB) QueryBucketMigrateSubscribeProgress() (uint64, error)
- func (m *MockMigrateDB) QueryMigrateGVGUnit(migrateKey string) (*MigrateGVGUnitMeta, error)
- func (m *MockMigrateDB) QuerySPExitSubscribeProgress() (uint64, error)
- func (m *MockMigrateDB) QuerySwapOutSubscribeProgress() (uint64, error)
- func (m *MockMigrateDB) QuerySwapOutUnitInSrcSP(swapOutKey string) (*SwapOutMeta, error)
- func (m *MockMigrateDB) UpdateBucketMigrateSubscribeProgress(blockHeight uint64) error
- func (m *MockMigrateDB) UpdateMigrateGVGUnitLastMigrateObjectID(migrateKey string, lastMigrateObjectID uint64) error
- func (m *MockMigrateDB) UpdateMigrateGVGUnitStatus(migrateKey string, migrateStatus int) error
- func (m *MockMigrateDB) UpdateSPExitSubscribeProgress(blockHeight uint64) error
- func (m *MockMigrateDB) UpdateSwapOutSubscribeProgress(blockHeight uint64) error
- func (m *MockMigrateDB) UpdateSwapOutUnitCompletedGVGList(swapOutKey string, completedGVGList []uint32) error
- type MockMigrateDBMockRecorder
- func (mr *MockMigrateDBMockRecorder) DeleteMigrateGVGUnit(meta interface{}) *gomock.Call
- func (mr *MockMigrateDBMockRecorder) DeleteMigrateGVGUnitsByBucketID(bucketID interface{}) *gomock.Call
- func (mr *MockMigrateDBMockRecorder) InsertMigrateGVGUnit(meta interface{}) *gomock.Call
- func (mr *MockMigrateDBMockRecorder) InsertSwapOutUnit(meta interface{}) *gomock.Call
- func (mr *MockMigrateDBMockRecorder) ListDestSPSwapOutUnits() *gomock.Call
- func (mr *MockMigrateDBMockRecorder) ListMigrateGVGUnitsByBucketID(bucketID interface{}) *gomock.Call
- func (mr *MockMigrateDBMockRecorder) QueryBucketMigrateSubscribeProgress() *gomock.Call
- func (mr *MockMigrateDBMockRecorder) QueryMigrateGVGUnit(migrateKey interface{}) *gomock.Call
- func (mr *MockMigrateDBMockRecorder) QuerySPExitSubscribeProgress() *gomock.Call
- func (mr *MockMigrateDBMockRecorder) QuerySwapOutSubscribeProgress() *gomock.Call
- func (mr *MockMigrateDBMockRecorder) QuerySwapOutUnitInSrcSP(swapOutKey interface{}) *gomock.Call
- func (mr *MockMigrateDBMockRecorder) UpdateBucketMigrateSubscribeProgress(blockHeight interface{}) *gomock.Call
- func (mr *MockMigrateDBMockRecorder) UpdateMigrateGVGUnitLastMigrateObjectID(migrateKey, lastMigrateObjectID interface{}) *gomock.Call
- func (mr *MockMigrateDBMockRecorder) UpdateMigrateGVGUnitStatus(migrateKey, migrateStatus interface{}) *gomock.Call
- func (mr *MockMigrateDBMockRecorder) UpdateSPExitSubscribeProgress(blockHeight interface{}) *gomock.Call
- func (mr *MockMigrateDBMockRecorder) UpdateSwapOutSubscribeProgress(blockHeight interface{}) *gomock.Call
- func (mr *MockMigrateDBMockRecorder) UpdateSwapOutUnitCompletedGVGList(swapOutKey, completedGVGList interface{}) *gomock.Call
- type MockOffChainAuthKeyDB
- func (m *MockOffChainAuthKeyDB) EXPECT() *MockOffChainAuthKeyDBMockRecorder
- func (m *MockOffChainAuthKeyDB) GetAuthKey(userAddress, domain string) (*OffChainAuthKey, error)
- func (m *MockOffChainAuthKeyDB) InsertAuthKey(newRecord *OffChainAuthKey) error
- func (m *MockOffChainAuthKeyDB) UpdateAuthKey(userAddress, domain string, oldNonce, newNonce int32, newPublicKey string, ...) error
- type MockOffChainAuthKeyDBMockRecorder
- type MockSPDB
- func (m *MockSPDB) CheckQuotaAndAddReadRecord(record *ReadRecord, quota *BucketQuota) error
- func (m *MockSPDB) DeleteAllReplicatePieceChecksum(objectID uint64, redundancyIdx int32, pieceCount uint32) error
- func (m *MockSPDB) DeleteAllReplicatePieceChecksumOptimized(objectID uint64, redundancyIdx int32) error
- func (m *MockSPDB) DeleteGCObjectProgress(taskKey string) error
- func (m *MockSPDB) DeleteMigrateGVGUnit(meta *MigrateGVGUnitMeta) error
- func (m *MockSPDB) DeleteMigrateGVGUnitsByBucketID(bucketID uint64) error
- func (m *MockSPDB) DeleteObjectIntegrity(objectID uint64, redundancyIndex int32) error
- func (m *MockSPDB) DeleteUploadProgress(objectID uint64) error
- func (m *MockSPDB) EXPECT() *MockSPDBMockRecorder
- func (m *MockSPDB) FetchAllSp(status ...types0.Status) ([]*types0.StorageProvider, error)
- func (m *MockSPDB) FetchAllSpWithoutOwnSp(status ...types0.Status) ([]*types0.StorageProvider, error)
- func (m *MockSPDB) GetAllReplicatePieceChecksum(objectID uint64, redundancyIdx int32, pieceCount uint32) ([][]byte, error)
- func (m *MockSPDB) GetAllReplicatePieceChecksumOptimized(objectID uint64, redundancyIdx int32, pieceCount uint32) ([][]byte, error)
- func (m *MockSPDB) GetAuthKey(userAddress, domain string) (*OffChainAuthKey, error)
- func (m *MockSPDB) GetBucketReadRecord(bucketID uint64, timeRange *TrafficTimeRange) ([]*ReadRecord, error)
- func (m *MockSPDB) GetBucketTraffic(bucketID uint64, yearMonth string) (*BucketTraffic, error)
- func (m *MockSPDB) GetGCMetasToGC(limit int) ([]*GCObjectMeta, error)
- func (m *MockSPDB) GetObjectIntegrity(objectID uint64, redundancyIndex int32) (*IntegrityMeta, error)
- func (m *MockSPDB) GetObjectReadRecord(objectID uint64, timeRange *TrafficTimeRange) ([]*ReadRecord, error)
- func (m *MockSPDB) GetOwnSpInfo() (*types0.StorageProvider, error)
- func (m *MockSPDB) GetReadRecord(timeRange *TrafficTimeRange) ([]*ReadRecord, error)
- func (m *MockSPDB) GetSpByAddress(address string, addressType SpAddressType) (*types0.StorageProvider, error)
- func (m *MockSPDB) GetSpByEndpoint(endpoint string) (*types0.StorageProvider, error)
- func (m *MockSPDB) GetSpByID(id uint32) (*types0.StorageProvider, error)
- func (m *MockSPDB) GetUploadMetasToReplicate(limit int, timeout int64) ([]*UploadObjectMeta, error)
- func (m *MockSPDB) GetUploadMetasToSeal(limit int, timeout int64) ([]*UploadObjectMeta, error)
- func (m *MockSPDB) GetUploadState(objectID uint64) (types.TaskState, string, error)
- func (m *MockSPDB) GetUserReadRecord(userAddress string, timeRange *TrafficTimeRange) ([]*ReadRecord, error)
- func (m *MockSPDB) InitBucketTraffic(record *ReadRecord, quota *BucketQuota) error
- func (m *MockSPDB) InsertAuthKey(newRecord *OffChainAuthKey) error
- func (m *MockSPDB) InsertGCObjectProgress(gcMeta *GCObjectMeta) error
- func (m *MockSPDB) InsertMigrateGVGUnit(meta *MigrateGVGUnitMeta) error
- func (m *MockSPDB) InsertPutEvent(task task.Task) error
- func (m *MockSPDB) InsertSwapOutUnit(meta *SwapOutMeta) error
- func (m *MockSPDB) InsertUploadProgress(objectID uint64) error
- func (m *MockSPDB) ListDestSPSwapOutUnits() ([]*SwapOutMeta, error)
- func (m *MockSPDB) ListMigrateGVGUnitsByBucketID(bucketID uint64) ([]*MigrateGVGUnitMeta, error)
- func (m *MockSPDB) QueryBucketMigrateSubscribeProgress() (uint64, error)
- func (m *MockSPDB) QueryMigrateGVGUnit(migrateKey string) (*MigrateGVGUnitMeta, error)
- func (m *MockSPDB) QuerySPExitSubscribeProgress() (uint64, error)
- func (m *MockSPDB) QuerySwapOutSubscribeProgress() (uint64, error)
- func (m *MockSPDB) QuerySwapOutUnitInSrcSP(swapOutKey string) (*SwapOutMeta, error)
- func (m *MockSPDB) SetObjectIntegrity(integrity *IntegrityMeta) error
- func (m *MockSPDB) SetOwnSpInfo(sp *types0.StorageProvider) error
- func (m *MockSPDB) SetReplicatePieceChecksum(objectID uint64, segmentIdx uint32, redundancyIdx int32, checksum []byte) error
- func (m *MockSPDB) UpdateAllSp(spList []*types0.StorageProvider) error
- func (m *MockSPDB) UpdateAuthKey(userAddress, domain string, oldNonce, newNonce int32, newPublicKey string, ...) error
- func (m *MockSPDB) UpdateBucketMigrateSubscribeProgress(blockHeight uint64) error
- func (m *MockSPDB) UpdateExtraQuota(bucketID, extraQuota uint64, yearMonth string) error
- func (m *MockSPDB) UpdateGCObjectProgress(gcMeta *GCObjectMeta) error
- func (m *MockSPDB) UpdateIntegrityChecksum(integrity *IntegrityMeta) error
- func (m *MockSPDB) UpdateMigrateGVGUnitLastMigrateObjectID(migrateKey string, lastMigrateObjectID uint64) error
- func (m *MockSPDB) UpdateMigrateGVGUnitStatus(migrateKey string, migrateStatus int) error
- func (m *MockSPDB) UpdatePieceChecksum(objectID uint64, redundancyIndex int32, checksum []byte) error
- func (m *MockSPDB) UpdateSPExitSubscribeProgress(blockHeight uint64) error
- func (m *MockSPDB) UpdateSwapOutSubscribeProgress(blockHeight uint64) error
- func (m *MockSPDB) UpdateSwapOutUnitCompletedGVGList(swapOutKey string, completedGVGList []uint32) error
- func (m *MockSPDB) UpdateUploadProgress(uploadMeta *UploadObjectMeta) error
- type MockSPDBMockRecorder
- func (mr *MockSPDBMockRecorder) CheckQuotaAndAddReadRecord(record, quota interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) DeleteAllReplicatePieceChecksum(objectID, redundancyIdx, pieceCount interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) DeleteAllReplicatePieceChecksumOptimized(objectID, redundancyIdx interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) DeleteGCObjectProgress(taskKey interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) DeleteMigrateGVGUnit(meta interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) DeleteMigrateGVGUnitsByBucketID(bucketID interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) DeleteObjectIntegrity(objectID, redundancyIndex interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) DeleteUploadProgress(objectID interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) FetchAllSp(status ...interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) FetchAllSpWithoutOwnSp(status ...interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) GetAllReplicatePieceChecksum(objectID, redundancyIdx, pieceCount interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) GetAllReplicatePieceChecksumOptimized(objectID, redundancyIdx, pieceCount interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) GetAuthKey(userAddress, domain interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) GetBucketReadRecord(bucketID, timeRange interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) GetBucketTraffic(bucketID, yearMonth interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) GetGCMetasToGC(limit interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) GetObjectIntegrity(objectID, redundancyIndex interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) GetObjectReadRecord(objectID, timeRange interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) GetOwnSpInfo() *gomock.Call
- func (mr *MockSPDBMockRecorder) GetReadRecord(timeRange interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) GetSpByAddress(address, addressType interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) GetSpByEndpoint(endpoint interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) GetSpByID(id interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) GetUploadMetasToReplicate(limit, timeout interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) GetUploadMetasToSeal(limit, timeout interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) GetUploadState(objectID interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) GetUserReadRecord(userAddress, timeRange interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) InitBucketTraffic(record, quota interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) InsertAuthKey(newRecord interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) InsertGCObjectProgress(gcMeta interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) InsertMigrateGVGUnit(meta interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) InsertPutEvent(task interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) InsertSwapOutUnit(meta interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) InsertUploadProgress(objectID interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) ListDestSPSwapOutUnits() *gomock.Call
- func (mr *MockSPDBMockRecorder) ListMigrateGVGUnitsByBucketID(bucketID interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) QueryBucketMigrateSubscribeProgress() *gomock.Call
- func (mr *MockSPDBMockRecorder) QueryMigrateGVGUnit(migrateKey interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) QuerySPExitSubscribeProgress() *gomock.Call
- func (mr *MockSPDBMockRecorder) QuerySwapOutSubscribeProgress() *gomock.Call
- func (mr *MockSPDBMockRecorder) QuerySwapOutUnitInSrcSP(swapOutKey interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) SetObjectIntegrity(integrity interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) SetOwnSpInfo(sp interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) SetReplicatePieceChecksum(objectID, segmentIdx, redundancyIdx, checksum interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) UpdateAllSp(spList interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) UpdateAuthKey(...) *gomock.Call
- func (mr *MockSPDBMockRecorder) UpdateBucketMigrateSubscribeProgress(blockHeight interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) UpdateExtraQuota(bucketID, extraQuota, yearMonth interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) UpdateGCObjectProgress(gcMeta interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) UpdateIntegrityChecksum(integrity interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) UpdateMigrateGVGUnitLastMigrateObjectID(migrateKey, lastMigrateObjectID interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) UpdateMigrateGVGUnitStatus(migrateKey, migrateStatus interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) UpdatePieceChecksum(objectID, redundancyIndex, checksum interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) UpdateSPExitSubscribeProgress(blockHeight interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) UpdateSwapOutSubscribeProgress(blockHeight interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) UpdateSwapOutUnitCompletedGVGList(swapOutKey, completedGVGList interface{}) *gomock.Call
- func (mr *MockSPDBMockRecorder) UpdateUploadProgress(uploadMeta interface{}) *gomock.Call
- type MockSPInfoDB
- func (m *MockSPInfoDB) EXPECT() *MockSPInfoDBMockRecorder
- func (m *MockSPInfoDB) FetchAllSp(status ...types0.Status) ([]*types0.StorageProvider, error)
- func (m *MockSPInfoDB) FetchAllSpWithoutOwnSp(status ...types0.Status) ([]*types0.StorageProvider, error)
- func (m *MockSPInfoDB) GetOwnSpInfo() (*types0.StorageProvider, error)
- func (m *MockSPInfoDB) GetSpByAddress(address string, addressType SpAddressType) (*types0.StorageProvider, error)
- func (m *MockSPInfoDB) GetSpByEndpoint(endpoint string) (*types0.StorageProvider, error)
- func (m *MockSPInfoDB) GetSpByID(id uint32) (*types0.StorageProvider, error)
- func (m *MockSPInfoDB) SetOwnSpInfo(sp *types0.StorageProvider) error
- func (m *MockSPInfoDB) UpdateAllSp(spList []*types0.StorageProvider) error
- type MockSPInfoDBMockRecorder
- func (mr *MockSPInfoDBMockRecorder) FetchAllSp(status ...interface{}) *gomock.Call
- func (mr *MockSPInfoDBMockRecorder) FetchAllSpWithoutOwnSp(status ...interface{}) *gomock.Call
- func (mr *MockSPInfoDBMockRecorder) GetOwnSpInfo() *gomock.Call
- func (mr *MockSPInfoDBMockRecorder) GetSpByAddress(address, addressType interface{}) *gomock.Call
- func (mr *MockSPInfoDBMockRecorder) GetSpByEndpoint(endpoint interface{}) *gomock.Call
- func (mr *MockSPInfoDBMockRecorder) GetSpByID(id interface{}) *gomock.Call
- func (mr *MockSPInfoDBMockRecorder) SetOwnSpInfo(sp interface{}) *gomock.Call
- func (mr *MockSPInfoDBMockRecorder) UpdateAllSp(spList interface{}) *gomock.Call
- type MockSignatureDB
- func (m *MockSignatureDB) DeleteAllReplicatePieceChecksum(objectID uint64, redundancyIdx int32, pieceCount uint32) error
- func (m *MockSignatureDB) DeleteAllReplicatePieceChecksumOptimized(objectID uint64, redundancyIdx int32) error
- func (m *MockSignatureDB) DeleteObjectIntegrity(objectID uint64, redundancyIndex int32) error
- func (m *MockSignatureDB) EXPECT() *MockSignatureDBMockRecorder
- func (m *MockSignatureDB) GetAllReplicatePieceChecksum(objectID uint64, redundancyIdx int32, pieceCount uint32) ([][]byte, error)
- func (m *MockSignatureDB) GetAllReplicatePieceChecksumOptimized(objectID uint64, redundancyIdx int32, pieceCount uint32) ([][]byte, error)
- func (m *MockSignatureDB) GetObjectIntegrity(objectID uint64, redundancyIndex int32) (*IntegrityMeta, error)
- func (m *MockSignatureDB) SetObjectIntegrity(integrity *IntegrityMeta) error
- func (m *MockSignatureDB) SetReplicatePieceChecksum(objectID uint64, segmentIdx uint32, redundancyIdx int32, checksum []byte) error
- func (m *MockSignatureDB) UpdateIntegrityChecksum(integrity *IntegrityMeta) error
- func (m *MockSignatureDB) UpdatePieceChecksum(objectID uint64, redundancyIndex int32, checksum []byte) error
- type MockSignatureDBMockRecorder
- func (mr *MockSignatureDBMockRecorder) DeleteAllReplicatePieceChecksum(objectID, redundancyIdx, pieceCount interface{}) *gomock.Call
- func (mr *MockSignatureDBMockRecorder) DeleteAllReplicatePieceChecksumOptimized(objectID, redundancyIdx interface{}) *gomock.Call
- func (mr *MockSignatureDBMockRecorder) DeleteObjectIntegrity(objectID, redundancyIndex interface{}) *gomock.Call
- func (mr *MockSignatureDBMockRecorder) GetAllReplicatePieceChecksum(objectID, redundancyIdx, pieceCount interface{}) *gomock.Call
- func (mr *MockSignatureDBMockRecorder) GetAllReplicatePieceChecksumOptimized(objectID, redundancyIdx, pieceCount interface{}) *gomock.Call
- func (mr *MockSignatureDBMockRecorder) GetObjectIntegrity(objectID, redundancyIndex interface{}) *gomock.Call
- func (mr *MockSignatureDBMockRecorder) SetObjectIntegrity(integrity interface{}) *gomock.Call
- func (mr *MockSignatureDBMockRecorder) SetReplicatePieceChecksum(objectID, segmentIdx, redundancyIdx, checksum interface{}) *gomock.Call
- func (mr *MockSignatureDBMockRecorder) UpdateIntegrityChecksum(integrity interface{}) *gomock.Call
- func (mr *MockSignatureDBMockRecorder) UpdatePieceChecksum(objectID, redundancyIndex, checksum interface{}) *gomock.Call
- type MockTrafficDB
- func (m *MockTrafficDB) CheckQuotaAndAddReadRecord(record *ReadRecord, quota *BucketQuota) error
- func (m *MockTrafficDB) EXPECT() *MockTrafficDBMockRecorder
- func (m *MockTrafficDB) GetBucketReadRecord(bucketID uint64, timeRange *TrafficTimeRange) ([]*ReadRecord, error)
- func (m *MockTrafficDB) GetBucketTraffic(bucketID uint64, yearMonth string) (*BucketTraffic, error)
- func (m *MockTrafficDB) GetObjectReadRecord(objectID uint64, timeRange *TrafficTimeRange) ([]*ReadRecord, error)
- func (m *MockTrafficDB) GetReadRecord(timeRange *TrafficTimeRange) ([]*ReadRecord, error)
- func (m *MockTrafficDB) GetUserReadRecord(userAddress string, timeRange *TrafficTimeRange) ([]*ReadRecord, error)
- func (m *MockTrafficDB) InitBucketTraffic(record *ReadRecord, quota *BucketQuota) error
- func (m *MockTrafficDB) UpdateExtraQuota(bucketID, extraQuota uint64, yearMonth string) error
- type MockTrafficDBMockRecorder
- func (mr *MockTrafficDBMockRecorder) CheckQuotaAndAddReadRecord(record, quota interface{}) *gomock.Call
- func (mr *MockTrafficDBMockRecorder) FixExtraQuota(bucketID, extraQuota, yearMonth interface{}) *gomock.Call
- func (mr *MockTrafficDBMockRecorder) GetBucketReadRecord(bucketID, timeRange interface{}) *gomock.Call
- func (mr *MockTrafficDBMockRecorder) GetBucketTraffic(bucketID, yearMonth interface{}) *gomock.Call
- func (mr *MockTrafficDBMockRecorder) GetObjectReadRecord(objectID, timeRange interface{}) *gomock.Call
- func (mr *MockTrafficDBMockRecorder) GetReadRecord(timeRange interface{}) *gomock.Call
- func (mr *MockTrafficDBMockRecorder) GetUserReadRecord(userAddress, timeRange interface{}) *gomock.Call
- func (mr *MockTrafficDBMockRecorder) InitBucketTraffic(record, quota interface{}) *gomock.Call
- type MockUploadObjectProgressDB
- func (m *MockUploadObjectProgressDB) DeleteUploadProgress(objectID uint64) error
- func (m *MockUploadObjectProgressDB) EXPECT() *MockUploadObjectProgressDBMockRecorder
- func (m *MockUploadObjectProgressDB) GetUploadMetasToReplicate(limit int, timeout int64) ([]*UploadObjectMeta, error)
- func (m *MockUploadObjectProgressDB) GetUploadMetasToSeal(limit int, timeout int64) ([]*UploadObjectMeta, error)
- func (m *MockUploadObjectProgressDB) GetUploadState(objectID uint64) (types.TaskState, string, error)
- func (m *MockUploadObjectProgressDB) InsertPutEvent(task task.Task) error
- func (m *MockUploadObjectProgressDB) InsertUploadProgress(objectID uint64) error
- func (m *MockUploadObjectProgressDB) UpdateUploadProgress(uploadMeta *UploadObjectMeta) error
- type MockUploadObjectProgressDBMockRecorder
- func (mr *MockUploadObjectProgressDBMockRecorder) DeleteUploadProgress(objectID interface{}) *gomock.Call
- func (mr *MockUploadObjectProgressDBMockRecorder) GetUploadMetasToReplicate(limit, timeout interface{}) *gomock.Call
- func (mr *MockUploadObjectProgressDBMockRecorder) GetUploadMetasToSeal(limit, timeout interface{}) *gomock.Call
- func (mr *MockUploadObjectProgressDBMockRecorder) GetUploadState(objectID interface{}) *gomock.Call
- func (mr *MockUploadObjectProgressDBMockRecorder) InsertPutEvent(task interface{}) *gomock.Call
- func (mr *MockUploadObjectProgressDBMockRecorder) InsertUploadProgress(objectID interface{}) *gomock.Call
- func (mr *MockUploadObjectProgressDBMockRecorder) UpdateUploadProgress(uploadMeta interface{}) *gomock.Call
- type OffChainAuthKey
- type OffChainAuthKeyDB
- type ReadRecord
- type SPDB
- type SPInfoDB
- type SignatureDB
- type SpAddressType
- type SwapOutMeta
- type TrafficDB
- type TrafficTimeRange
- type UploadObjectMeta
- type UploadObjectProgressDB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BucketFreeQuota ¶ added in v0.2.3
type BucketFreeQuota struct {
QuotaSize uint64
}
BucketFreeQuota defines free quota of a bucket.
type BucketQuota ¶
type BucketQuota struct { ChargedQuotaSize uint64 // the charged quota of bucket on greenfield chain meta FreeQuotaSize uint64 // the free quota of SP on greenfield chain }
BucketQuota defines read quota of a bucket.
type BucketTraffic ¶
type BucketTraffic struct { BucketID uint64 YearMonth string BucketName string ReadConsumedSize uint64 FreeQuotaSize uint64 // the total free quota size of SP price meta FreeQuotaConsumedSize uint64 // the consumed free quota size ChargedQuotaSize uint64 // the total charged quota of bucket ModifyTime int64 }
BucketTraffic is record traffic by year and month.
type GCObjectMeta ¶
type GCObjectMeta struct { TaskKey string StartBlockHeight uint64 EndBlockHeight uint64 CurrentBlockHeight uint64 LastDeletedObjectID uint64 }
GCObjectMeta defines the gc object range progress info.
type GCObjectProgressDB ¶
type GCObjectProgressDB interface { // InsertGCObjectProgress inserts a new gc object progress. InsertGCObjectProgress(gcMeta *GCObjectMeta) error // DeleteGCObjectProgress deletes the gc object progress. DeleteGCObjectProgress(taskKey string) error // UpdateGCObjectProgress updates the gc object progress. UpdateGCObjectProgress(gcMeta *GCObjectMeta) error // GetGCMetasToGC queries the latest gc meta to continue gc. // It is only used in startup. GetGCMetasToGC(limit int) ([]*GCObjectMeta, error) }
GCObjectProgressDB interface which records gc object related progress.
type IntegrityMeta ¶
type IntegrityMeta struct { ObjectID uint64 RedundancyIndex int32 IntegrityChecksum []byte PieceChecksumList [][]byte }
IntegrityMeta defines the payload integrity hash and piece checksum with objectID.
type MigrateDB ¶ added in v0.2.3
type MigrateDB interface { // UpdateSPExitSubscribeProgress includes insert and update. UpdateSPExitSubscribeProgress(blockHeight uint64) error // QuerySPExitSubscribeProgress returns blockHeight which is called at startup. QuerySPExitSubscribeProgress() (uint64, error) // UpdateSwapOutSubscribeProgress includes insert and update. UpdateSwapOutSubscribeProgress(blockHeight uint64) error // QuerySwapOutSubscribeProgress returns blockHeight which is called at startup. QuerySwapOutSubscribeProgress() (uint64, error) // UpdateBucketMigrateSubscribeProgress includes insert and update. UpdateBucketMigrateSubscribeProgress(blockHeight uint64) error // QueryBucketMigrateSubscribeProgress returns blockHeight which is called at startup. QueryBucketMigrateSubscribeProgress() (uint64, error) // InsertSwapOutUnit is used to insert a swap out unit. InsertSwapOutUnit(meta *SwapOutMeta) error // UpdateSwapOutUnitCompletedGVGList is used to record dest swap out progress, manager restart can load it. UpdateSwapOutUnitCompletedGVGList(swapOutKey string, completedGVGList []uint32) error // QuerySwapOutUnitInSrcSP is used to rebuild swap out plan at startup. QuerySwapOutUnitInSrcSP(swapOutKey string) (*SwapOutMeta, error) // ListDestSPSwapOutUnits is used to rebuild swap out plan at startup. ListDestSPSwapOutUnits() ([]*SwapOutMeta, error) // InsertMigrateGVGUnit inserts a new gvg migrate unit. InsertMigrateGVGUnit(meta *MigrateGVGUnitMeta) error // DeleteMigrateGVGUnit deletes the gvg migrate unit. DeleteMigrateGVGUnit(meta *MigrateGVGUnitMeta) error // UpdateMigrateGVGUnitStatus updates gvg unit status. UpdateMigrateGVGUnitStatus(migrateKey string, migrateStatus int) error // UpdateMigrateGVGUnitLastMigrateObjectID updates gvg unit LastMigrateObjectID. UpdateMigrateGVGUnitLastMigrateObjectID(migrateKey string, lastMigrateObjectID uint64) error // QueryMigrateGVGUnit returns the gvg migrate unit info. QueryMigrateGVGUnit(migrateKey string) (*MigrateGVGUnitMeta, error) // ListMigrateGVGUnitsByBucketID is used to load at dest sp startup(bucket migrate). ListMigrateGVGUnitsByBucketID(bucketID uint64) ([]*MigrateGVGUnitMeta, error) // DeleteMigrateGVGUnitsByBucketID is used to delete migrate gvg units at bucket migrate DeleteMigrateGVGUnitsByBucketID(bucketID uint64) error }
MigrateDB is used to support sp exit and bucket migrate.
type MigrateGVGUnitMeta ¶ added in v0.2.3
type MigrateGVGUnitMeta struct { MigrateGVGKey string // as primary key SwapOutKey string GlobalVirtualGroupID uint32 // is used by sp exit/bucket migrate DestGlobalVirtualGroupID uint32 // is used by bucket migrate VirtualGroupFamilyID uint32 // is used by sp exit RedundancyIndex int32 // is used by sp exit BucketID uint64 // is used by bucket migrate SrcSPID uint32 DestSPID uint32 LastMigratedObjectID uint64 MigrateStatus int // scheduler assign unit status. }
MigrateGVGUnitMeta is used to record migrate type/meta/status/progress.
type MockGCObjectProgressDB ¶
type MockGCObjectProgressDB struct {
// contains filtered or unexported fields
}
MockGCObjectProgressDB is a mock of GCObjectProgressDB interface.
func NewMockGCObjectProgressDB ¶
func NewMockGCObjectProgressDB(ctrl *gomock.Controller) *MockGCObjectProgressDB
NewMockGCObjectProgressDB creates a new mock instance.
func (*MockGCObjectProgressDB) DeleteGCObjectProgress ¶
func (m *MockGCObjectProgressDB) DeleteGCObjectProgress(taskKey string) error
DeleteGCObjectProgress mocks base method.
func (*MockGCObjectProgressDB) EXPECT ¶
func (m *MockGCObjectProgressDB) EXPECT() *MockGCObjectProgressDBMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockGCObjectProgressDB) GetGCMetasToGC ¶ added in v0.2.3
func (m *MockGCObjectProgressDB) GetGCMetasToGC(limit int) ([]*GCObjectMeta, error)
GetGCMetasToGC mocks base method.
func (*MockGCObjectProgressDB) InsertGCObjectProgress ¶ added in v0.2.3
func (m *MockGCObjectProgressDB) InsertGCObjectProgress(gcMeta *GCObjectMeta) error
InsertGCObjectProgress mocks base method.
func (*MockGCObjectProgressDB) UpdateGCObjectProgress ¶ added in v0.2.3
func (m *MockGCObjectProgressDB) UpdateGCObjectProgress(gcMeta *GCObjectMeta) error
UpdateGCObjectProgress mocks base method.
type MockGCObjectProgressDBMockRecorder ¶
type MockGCObjectProgressDBMockRecorder struct {
// contains filtered or unexported fields
}
MockGCObjectProgressDBMockRecorder is the mock recorder for MockGCObjectProgressDB.
func (*MockGCObjectProgressDBMockRecorder) DeleteGCObjectProgress ¶
func (mr *MockGCObjectProgressDBMockRecorder) DeleteGCObjectProgress(taskKey interface{}) *gomock.Call
DeleteGCObjectProgress indicates an expected call of DeleteGCObjectProgress.
func (*MockGCObjectProgressDBMockRecorder) GetGCMetasToGC ¶ added in v0.2.3
func (mr *MockGCObjectProgressDBMockRecorder) GetGCMetasToGC(limit interface{}) *gomock.Call
GetGCMetasToGC indicates an expected call of GetGCMetasToGC.
func (*MockGCObjectProgressDBMockRecorder) InsertGCObjectProgress ¶ added in v0.2.3
func (mr *MockGCObjectProgressDBMockRecorder) InsertGCObjectProgress(gcMeta interface{}) *gomock.Call
InsertGCObjectProgress indicates an expected call of InsertGCObjectProgress.
func (*MockGCObjectProgressDBMockRecorder) UpdateGCObjectProgress ¶ added in v0.2.3
func (mr *MockGCObjectProgressDBMockRecorder) UpdateGCObjectProgress(gcMeta interface{}) *gomock.Call
UpdateGCObjectProgress indicates an expected call of UpdateGCObjectProgress.
type MockMigrateDB ¶ added in v0.2.3
type MockMigrateDB struct {
// contains filtered or unexported fields
}
MockMigrateDB is a mock of MigrateDB interface.
func NewMockMigrateDB ¶ added in v0.2.3
func NewMockMigrateDB(ctrl *gomock.Controller) *MockMigrateDB
NewMockMigrateDB creates a new mock instance.
func (*MockMigrateDB) DeleteMigrateGVGUnit ¶ added in v0.2.3
func (m *MockMigrateDB) DeleteMigrateGVGUnit(meta *MigrateGVGUnitMeta) error
DeleteMigrateGVGUnit mocks base method.
func (*MockMigrateDB) DeleteMigrateGVGUnitsByBucketID ¶ added in v0.2.4
func (m *MockMigrateDB) DeleteMigrateGVGUnitsByBucketID(bucketID uint64) error
DeleteMigrateGVGUnitsByBucketID mocks base method.
func (*MockMigrateDB) EXPECT ¶ added in v0.2.3
func (m *MockMigrateDB) EXPECT() *MockMigrateDBMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockMigrateDB) InsertMigrateGVGUnit ¶ added in v0.2.3
func (m *MockMigrateDB) InsertMigrateGVGUnit(meta *MigrateGVGUnitMeta) error
InsertMigrateGVGUnit mocks base method.
func (*MockMigrateDB) InsertSwapOutUnit ¶ added in v0.2.3
func (m *MockMigrateDB) InsertSwapOutUnit(meta *SwapOutMeta) error
InsertSwapOutUnit mocks base method.
func (*MockMigrateDB) ListDestSPSwapOutUnits ¶ added in v0.2.3
func (m *MockMigrateDB) ListDestSPSwapOutUnits() ([]*SwapOutMeta, error)
ListDestSPSwapOutUnits mocks base method.
func (*MockMigrateDB) ListMigrateGVGUnitsByBucketID ¶ added in v0.2.3
func (m *MockMigrateDB) ListMigrateGVGUnitsByBucketID(bucketID uint64) ([]*MigrateGVGUnitMeta, error)
ListMigrateGVGUnitsByBucketID mocks base method.
func (*MockMigrateDB) QueryBucketMigrateSubscribeProgress ¶ added in v0.2.3
func (m *MockMigrateDB) QueryBucketMigrateSubscribeProgress() (uint64, error)
QueryBucketMigrateSubscribeProgress mocks base method.
func (*MockMigrateDB) QueryMigrateGVGUnit ¶ added in v0.2.3
func (m *MockMigrateDB) QueryMigrateGVGUnit(migrateKey string) (*MigrateGVGUnitMeta, error)
QueryMigrateGVGUnit mocks base method.
func (*MockMigrateDB) QuerySPExitSubscribeProgress ¶ added in v0.2.3
func (m *MockMigrateDB) QuerySPExitSubscribeProgress() (uint64, error)
QuerySPExitSubscribeProgress mocks base method.
func (*MockMigrateDB) QuerySwapOutSubscribeProgress ¶ added in v0.2.3
func (m *MockMigrateDB) QuerySwapOutSubscribeProgress() (uint64, error)
QuerySwapOutSubscribeProgress mocks base method.
func (*MockMigrateDB) QuerySwapOutUnitInSrcSP ¶ added in v0.2.3
func (m *MockMigrateDB) QuerySwapOutUnitInSrcSP(swapOutKey string) (*SwapOutMeta, error)
QuerySwapOutUnitInSrcSP mocks base method.
func (*MockMigrateDB) UpdateBucketMigrateSubscribeProgress ¶ added in v0.2.3
func (m *MockMigrateDB) UpdateBucketMigrateSubscribeProgress(blockHeight uint64) error
UpdateBucketMigrateSubscribeProgress mocks base method.
func (*MockMigrateDB) UpdateMigrateGVGUnitLastMigrateObjectID ¶ added in v0.2.3
func (m *MockMigrateDB) UpdateMigrateGVGUnitLastMigrateObjectID(migrateKey string, lastMigrateObjectID uint64) error
UpdateMigrateGVGUnitLastMigrateObjectID mocks base method.
func (*MockMigrateDB) UpdateMigrateGVGUnitStatus ¶ added in v0.2.3
func (m *MockMigrateDB) UpdateMigrateGVGUnitStatus(migrateKey string, migrateStatus int) error
UpdateMigrateGVGUnitStatus mocks base method.
func (*MockMigrateDB) UpdateSPExitSubscribeProgress ¶ added in v0.2.3
func (m *MockMigrateDB) UpdateSPExitSubscribeProgress(blockHeight uint64) error
UpdateSPExitSubscribeProgress mocks base method.
func (*MockMigrateDB) UpdateSwapOutSubscribeProgress ¶ added in v0.2.3
func (m *MockMigrateDB) UpdateSwapOutSubscribeProgress(blockHeight uint64) error
UpdateSwapOutSubscribeProgress mocks base method.
func (*MockMigrateDB) UpdateSwapOutUnitCompletedGVGList ¶ added in v0.2.3
func (m *MockMigrateDB) UpdateSwapOutUnitCompletedGVGList(swapOutKey string, completedGVGList []uint32) error
UpdateSwapOutUnitCompletedGVGList mocks base method.
type MockMigrateDBMockRecorder ¶ added in v0.2.3
type MockMigrateDBMockRecorder struct {
// contains filtered or unexported fields
}
MockMigrateDBMockRecorder is the mock recorder for MockMigrateDB.
func (*MockMigrateDBMockRecorder) DeleteMigrateGVGUnit ¶ added in v0.2.3
func (mr *MockMigrateDBMockRecorder) DeleteMigrateGVGUnit(meta interface{}) *gomock.Call
DeleteMigrateGVGUnit indicates an expected call of DeleteMigrateGVGUnit.
func (*MockMigrateDBMockRecorder) DeleteMigrateGVGUnitsByBucketID ¶ added in v0.2.4
func (mr *MockMigrateDBMockRecorder) DeleteMigrateGVGUnitsByBucketID(bucketID interface{}) *gomock.Call
DeleteMigrateGVGUnitsByBucketID indicates an expected call of DeleteMigrateGVGUnitsByBucketID.
func (*MockMigrateDBMockRecorder) InsertMigrateGVGUnit ¶ added in v0.2.3
func (mr *MockMigrateDBMockRecorder) InsertMigrateGVGUnit(meta interface{}) *gomock.Call
InsertMigrateGVGUnit indicates an expected call of InsertMigrateGVGUnit.
func (*MockMigrateDBMockRecorder) InsertSwapOutUnit ¶ added in v0.2.3
func (mr *MockMigrateDBMockRecorder) InsertSwapOutUnit(meta interface{}) *gomock.Call
InsertSwapOutUnit indicates an expected call of InsertSwapOutUnit.
func (*MockMigrateDBMockRecorder) ListDestSPSwapOutUnits ¶ added in v0.2.3
func (mr *MockMigrateDBMockRecorder) ListDestSPSwapOutUnits() *gomock.Call
ListDestSPSwapOutUnits indicates an expected call of ListDestSPSwapOutUnits.
func (*MockMigrateDBMockRecorder) ListMigrateGVGUnitsByBucketID ¶ added in v0.2.3
func (mr *MockMigrateDBMockRecorder) ListMigrateGVGUnitsByBucketID(bucketID interface{}) *gomock.Call
ListMigrateGVGUnitsByBucketID indicates an expected call of ListMigrateGVGUnitsByBucketID.
func (*MockMigrateDBMockRecorder) QueryBucketMigrateSubscribeProgress ¶ added in v0.2.3
func (mr *MockMigrateDBMockRecorder) QueryBucketMigrateSubscribeProgress() *gomock.Call
QueryBucketMigrateSubscribeProgress indicates an expected call of QueryBucketMigrateSubscribeProgress.
func (*MockMigrateDBMockRecorder) QueryMigrateGVGUnit ¶ added in v0.2.3
func (mr *MockMigrateDBMockRecorder) QueryMigrateGVGUnit(migrateKey interface{}) *gomock.Call
QueryMigrateGVGUnit indicates an expected call of QueryMigrateGVGUnit.
func (*MockMigrateDBMockRecorder) QuerySPExitSubscribeProgress ¶ added in v0.2.3
func (mr *MockMigrateDBMockRecorder) QuerySPExitSubscribeProgress() *gomock.Call
QuerySPExitSubscribeProgress indicates an expected call of QuerySPExitSubscribeProgress.
func (*MockMigrateDBMockRecorder) QuerySwapOutSubscribeProgress ¶ added in v0.2.3
func (mr *MockMigrateDBMockRecorder) QuerySwapOutSubscribeProgress() *gomock.Call
QuerySwapOutSubscribeProgress indicates an expected call of QuerySwapOutSubscribeProgress.
func (*MockMigrateDBMockRecorder) QuerySwapOutUnitInSrcSP ¶ added in v0.2.3
func (mr *MockMigrateDBMockRecorder) QuerySwapOutUnitInSrcSP(swapOutKey interface{}) *gomock.Call
QuerySwapOutUnitInSrcSP indicates an expected call of QuerySwapOutUnitInSrcSP.
func (*MockMigrateDBMockRecorder) UpdateBucketMigrateSubscribeProgress ¶ added in v0.2.3
func (mr *MockMigrateDBMockRecorder) UpdateBucketMigrateSubscribeProgress(blockHeight interface{}) *gomock.Call
UpdateBucketMigrateSubscribeProgress indicates an expected call of UpdateBucketMigrateSubscribeProgress.
func (*MockMigrateDBMockRecorder) UpdateMigrateGVGUnitLastMigrateObjectID ¶ added in v0.2.3
func (mr *MockMigrateDBMockRecorder) UpdateMigrateGVGUnitLastMigrateObjectID(migrateKey, lastMigrateObjectID interface{}) *gomock.Call
UpdateMigrateGVGUnitLastMigrateObjectID indicates an expected call of UpdateMigrateGVGUnitLastMigrateObjectID.
func (*MockMigrateDBMockRecorder) UpdateMigrateGVGUnitStatus ¶ added in v0.2.3
func (mr *MockMigrateDBMockRecorder) UpdateMigrateGVGUnitStatus(migrateKey, migrateStatus interface{}) *gomock.Call
UpdateMigrateGVGUnitStatus indicates an expected call of UpdateMigrateGVGUnitStatus.
func (*MockMigrateDBMockRecorder) UpdateSPExitSubscribeProgress ¶ added in v0.2.3
func (mr *MockMigrateDBMockRecorder) UpdateSPExitSubscribeProgress(blockHeight interface{}) *gomock.Call
UpdateSPExitSubscribeProgress indicates an expected call of UpdateSPExitSubscribeProgress.
func (*MockMigrateDBMockRecorder) UpdateSwapOutSubscribeProgress ¶ added in v0.2.3
func (mr *MockMigrateDBMockRecorder) UpdateSwapOutSubscribeProgress(blockHeight interface{}) *gomock.Call
UpdateSwapOutSubscribeProgress indicates an expected call of UpdateSwapOutSubscribeProgress.
func (*MockMigrateDBMockRecorder) UpdateSwapOutUnitCompletedGVGList ¶ added in v0.2.3
func (mr *MockMigrateDBMockRecorder) UpdateSwapOutUnitCompletedGVGList(swapOutKey, completedGVGList interface{}) *gomock.Call
UpdateSwapOutUnitCompletedGVGList indicates an expected call of UpdateSwapOutUnitCompletedGVGList.
type MockOffChainAuthKeyDB ¶
type MockOffChainAuthKeyDB struct {
// contains filtered or unexported fields
}
MockOffChainAuthKeyDB is a mock of OffChainAuthKeyDB interface.
func NewMockOffChainAuthKeyDB ¶
func NewMockOffChainAuthKeyDB(ctrl *gomock.Controller) *MockOffChainAuthKeyDB
NewMockOffChainAuthKeyDB creates a new mock instance.
func (*MockOffChainAuthKeyDB) EXPECT ¶
func (m *MockOffChainAuthKeyDB) EXPECT() *MockOffChainAuthKeyDBMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockOffChainAuthKeyDB) GetAuthKey ¶
func (m *MockOffChainAuthKeyDB) GetAuthKey(userAddress, domain string) (*OffChainAuthKey, error)
GetAuthKey mocks base method.
func (*MockOffChainAuthKeyDB) InsertAuthKey ¶
func (m *MockOffChainAuthKeyDB) InsertAuthKey(newRecord *OffChainAuthKey) error
InsertAuthKey mocks base method.
func (*MockOffChainAuthKeyDB) UpdateAuthKey ¶
func (m *MockOffChainAuthKeyDB) UpdateAuthKey(userAddress, domain string, oldNonce, newNonce int32, newPublicKey string, newExpiryDate time.Time) error
UpdateAuthKey mocks base method.
type MockOffChainAuthKeyDBMockRecorder ¶
type MockOffChainAuthKeyDBMockRecorder struct {
// contains filtered or unexported fields
}
MockOffChainAuthKeyDBMockRecorder is the mock recorder for MockOffChainAuthKeyDB.
func (*MockOffChainAuthKeyDBMockRecorder) GetAuthKey ¶
func (mr *MockOffChainAuthKeyDBMockRecorder) GetAuthKey(userAddress, domain interface{}) *gomock.Call
GetAuthKey indicates an expected call of GetAuthKey.
func (*MockOffChainAuthKeyDBMockRecorder) InsertAuthKey ¶
func (mr *MockOffChainAuthKeyDBMockRecorder) InsertAuthKey(newRecord interface{}) *gomock.Call
InsertAuthKey indicates an expected call of InsertAuthKey.
func (*MockOffChainAuthKeyDBMockRecorder) UpdateAuthKey ¶
func (mr *MockOffChainAuthKeyDBMockRecorder) UpdateAuthKey(userAddress, domain, oldNonce, newNonce, newPublicKey, newExpiryDate interface{}) *gomock.Call
UpdateAuthKey indicates an expected call of UpdateAuthKey.
type MockSPDB ¶
type MockSPDB struct {
// contains filtered or unexported fields
}
MockSPDB is a mock of SPDB interface.
func NewMockSPDB ¶
func NewMockSPDB(ctrl *gomock.Controller) *MockSPDB
NewMockSPDB creates a new mock instance.
func (*MockSPDB) CheckQuotaAndAddReadRecord ¶
func (m *MockSPDB) CheckQuotaAndAddReadRecord(record *ReadRecord, quota *BucketQuota) error
CheckQuotaAndAddReadRecord mocks base method.
func (*MockSPDB) DeleteAllReplicatePieceChecksum ¶
func (m *MockSPDB) DeleteAllReplicatePieceChecksum(objectID uint64, redundancyIdx int32, pieceCount uint32) error
DeleteAllReplicatePieceChecksum mocks base method.
func (*MockSPDB) DeleteAllReplicatePieceChecksumOptimized ¶ added in v0.2.5
func (m *MockSPDB) DeleteAllReplicatePieceChecksumOptimized(objectID uint64, redundancyIdx int32) error
DeleteAllReplicatePieceChecksumOptimized mocks base method.
func (*MockSPDB) DeleteGCObjectProgress ¶
DeleteGCObjectProgress mocks base method.
func (*MockSPDB) DeleteMigrateGVGUnit ¶ added in v0.2.3
func (m *MockSPDB) DeleteMigrateGVGUnit(meta *MigrateGVGUnitMeta) error
DeleteMigrateGVGUnit mocks base method.
func (*MockSPDB) DeleteMigrateGVGUnitsByBucketID ¶ added in v0.2.4
DeleteMigrateGVGUnitsByBucketID mocks base method.
func (*MockSPDB) DeleteObjectIntegrity ¶
DeleteObjectIntegrity mocks base method.
func (*MockSPDB) DeleteUploadProgress ¶ added in v0.2.3
DeleteUploadProgress mocks base method.
func (*MockSPDB) EXPECT ¶
func (m *MockSPDB) EXPECT() *MockSPDBMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockSPDB) FetchAllSp ¶
FetchAllSp mocks base method.
func (*MockSPDB) FetchAllSpWithoutOwnSp ¶
func (m *MockSPDB) FetchAllSpWithoutOwnSp(status ...types0.Status) ([]*types0.StorageProvider, error)
FetchAllSpWithoutOwnSp mocks base method.
func (*MockSPDB) GetAllReplicatePieceChecksum ¶
func (m *MockSPDB) GetAllReplicatePieceChecksum(objectID uint64, redundancyIdx int32, pieceCount uint32) ([][]byte, error)
GetAllReplicatePieceChecksum mocks base method.
func (*MockSPDB) GetAllReplicatePieceChecksumOptimized ¶ added in v0.2.5
func (m *MockSPDB) GetAllReplicatePieceChecksumOptimized(objectID uint64, redundancyIdx int32, pieceCount uint32) ([][]byte, error)
GetAllReplicatePieceChecksumOptimized mocks base method.
func (*MockSPDB) GetAuthKey ¶
func (m *MockSPDB) GetAuthKey(userAddress, domain string) (*OffChainAuthKey, error)
GetAuthKey mocks base method.
func (*MockSPDB) GetBucketReadRecord ¶
func (m *MockSPDB) GetBucketReadRecord(bucketID uint64, timeRange *TrafficTimeRange) ([]*ReadRecord, error)
GetBucketReadRecord mocks base method.
func (*MockSPDB) GetBucketTraffic ¶
func (m *MockSPDB) GetBucketTraffic(bucketID uint64, yearMonth string) (*BucketTraffic, error)
GetBucketTraffic mocks base method.
func (*MockSPDB) GetGCMetasToGC ¶ added in v0.2.3
func (m *MockSPDB) GetGCMetasToGC(limit int) ([]*GCObjectMeta, error)
GetGCMetasToGC mocks base method.
func (*MockSPDB) GetObjectIntegrity ¶
func (m *MockSPDB) GetObjectIntegrity(objectID uint64, redundancyIndex int32) (*IntegrityMeta, error)
GetObjectIntegrity mocks base method.
func (*MockSPDB) GetObjectReadRecord ¶
func (m *MockSPDB) GetObjectReadRecord(objectID uint64, timeRange *TrafficTimeRange) ([]*ReadRecord, error)
GetObjectReadRecord mocks base method.
func (*MockSPDB) GetOwnSpInfo ¶
func (m *MockSPDB) GetOwnSpInfo() (*types0.StorageProvider, error)
GetOwnSpInfo mocks base method.
func (*MockSPDB) GetReadRecord ¶
func (m *MockSPDB) GetReadRecord(timeRange *TrafficTimeRange) ([]*ReadRecord, error)
GetReadRecord mocks base method.
func (*MockSPDB) GetSpByAddress ¶
func (m *MockSPDB) GetSpByAddress(address string, addressType SpAddressType) (*types0.StorageProvider, error)
GetSpByAddress mocks base method.
func (*MockSPDB) GetSpByEndpoint ¶
func (m *MockSPDB) GetSpByEndpoint(endpoint string) (*types0.StorageProvider, error)
GetSpByEndpoint mocks base method.
func (*MockSPDB) GetSpByID ¶ added in v0.2.4
func (m *MockSPDB) GetSpByID(id uint32) (*types0.StorageProvider, error)
GetSpByID mocks base method.
func (*MockSPDB) GetUploadMetasToReplicate ¶ added in v0.2.3
func (m *MockSPDB) GetUploadMetasToReplicate(limit int, timeout int64) ([]*UploadObjectMeta, error)
GetUploadMetasToReplicate mocks base method.
func (*MockSPDB) GetUploadMetasToSeal ¶ added in v0.2.3
func (m *MockSPDB) GetUploadMetasToSeal(limit int, timeout int64) ([]*UploadObjectMeta, error)
GetUploadMetasToSeal mocks base method.
func (*MockSPDB) GetUploadState ¶ added in v0.2.3
GetUploadState mocks base method.
func (*MockSPDB) GetUserReadRecord ¶
func (m *MockSPDB) GetUserReadRecord(userAddress string, timeRange *TrafficTimeRange) ([]*ReadRecord, error)
GetUserReadRecord mocks base method.
func (*MockSPDB) InitBucketTraffic ¶ added in v0.2.3
func (m *MockSPDB) InitBucketTraffic(record *ReadRecord, quota *BucketQuota) error
InitBucketTraffic mocks base method.
func (*MockSPDB) InsertAuthKey ¶
func (m *MockSPDB) InsertAuthKey(newRecord *OffChainAuthKey) error
InsertAuthKey mocks base method.
func (*MockSPDB) InsertGCObjectProgress ¶ added in v0.2.3
func (m *MockSPDB) InsertGCObjectProgress(gcMeta *GCObjectMeta) error
InsertGCObjectProgress mocks base method.
func (*MockSPDB) InsertMigrateGVGUnit ¶ added in v0.2.3
func (m *MockSPDB) InsertMigrateGVGUnit(meta *MigrateGVGUnitMeta) error
InsertMigrateGVGUnit mocks base method.
func (*MockSPDB) InsertPutEvent ¶ added in v0.2.3
InsertPutEvent mocks base method.
func (*MockSPDB) InsertSwapOutUnit ¶ added in v0.2.3
func (m *MockSPDB) InsertSwapOutUnit(meta *SwapOutMeta) error
InsertSwapOutUnit mocks base method.
func (*MockSPDB) InsertUploadProgress ¶ added in v0.2.3
InsertUploadProgress mocks base method.
func (*MockSPDB) ListDestSPSwapOutUnits ¶ added in v0.2.3
func (m *MockSPDB) ListDestSPSwapOutUnits() ([]*SwapOutMeta, error)
ListDestSPSwapOutUnits mocks base method.
func (*MockSPDB) ListMigrateGVGUnitsByBucketID ¶ added in v0.2.3
func (m *MockSPDB) ListMigrateGVGUnitsByBucketID(bucketID uint64) ([]*MigrateGVGUnitMeta, error)
ListMigrateGVGUnitsByBucketID mocks base method.
func (*MockSPDB) QueryBucketMigrateSubscribeProgress ¶ added in v0.2.3
QueryBucketMigrateSubscribeProgress mocks base method.
func (*MockSPDB) QueryMigrateGVGUnit ¶ added in v0.2.3
func (m *MockSPDB) QueryMigrateGVGUnit(migrateKey string) (*MigrateGVGUnitMeta, error)
QueryMigrateGVGUnit mocks base method.
func (*MockSPDB) QuerySPExitSubscribeProgress ¶ added in v0.2.3
QuerySPExitSubscribeProgress mocks base method.
func (*MockSPDB) QuerySwapOutSubscribeProgress ¶ added in v0.2.3
QuerySwapOutSubscribeProgress mocks base method.
func (*MockSPDB) QuerySwapOutUnitInSrcSP ¶ added in v0.2.3
func (m *MockSPDB) QuerySwapOutUnitInSrcSP(swapOutKey string) (*SwapOutMeta, error)
QuerySwapOutUnitInSrcSP mocks base method.
func (*MockSPDB) SetObjectIntegrity ¶
func (m *MockSPDB) SetObjectIntegrity(integrity *IntegrityMeta) error
SetObjectIntegrity mocks base method.
func (*MockSPDB) SetOwnSpInfo ¶
func (m *MockSPDB) SetOwnSpInfo(sp *types0.StorageProvider) error
SetOwnSpInfo mocks base method.
func (*MockSPDB) SetReplicatePieceChecksum ¶
func (m *MockSPDB) SetReplicatePieceChecksum(objectID uint64, segmentIdx uint32, redundancyIdx int32, checksum []byte) error
SetReplicatePieceChecksum mocks base method.
func (*MockSPDB) UpdateAllSp ¶
func (m *MockSPDB) UpdateAllSp(spList []*types0.StorageProvider) error
UpdateAllSp mocks base method.
func (*MockSPDB) UpdateAuthKey ¶
func (m *MockSPDB) UpdateAuthKey(userAddress, domain string, oldNonce, newNonce int32, newPublicKey string, newExpiryDate time.Time) error
UpdateAuthKey mocks base method.
func (*MockSPDB) UpdateBucketMigrateSubscribeProgress ¶ added in v0.2.3
UpdateBucketMigrateSubscribeProgress mocks base method.
func (*MockSPDB) UpdateExtraQuota ¶ added in v0.2.5
FixExtraQuota mocks base method.
func (*MockSPDB) UpdateGCObjectProgress ¶ added in v0.2.3
func (m *MockSPDB) UpdateGCObjectProgress(gcMeta *GCObjectMeta) error
UpdateGCObjectProgress mocks base method.
func (*MockSPDB) UpdateIntegrityChecksum ¶ added in v0.2.3
func (m *MockSPDB) UpdateIntegrityChecksum(integrity *IntegrityMeta) error
UpdateIntegrityChecksum mocks base method.
func (*MockSPDB) UpdateMigrateGVGUnitLastMigrateObjectID ¶ added in v0.2.3
func (m *MockSPDB) UpdateMigrateGVGUnitLastMigrateObjectID(migrateKey string, lastMigrateObjectID uint64) error
UpdateMigrateGVGUnitLastMigrateObjectID mocks base method.
func (*MockSPDB) UpdateMigrateGVGUnitStatus ¶ added in v0.2.3
UpdateMigrateGVGUnitStatus mocks base method.
func (*MockSPDB) UpdatePieceChecksum ¶ added in v0.2.3
func (m *MockSPDB) UpdatePieceChecksum(objectID uint64, redundancyIndex int32, checksum []byte) error
UpdatePieceChecksum mocks base method.
func (*MockSPDB) UpdateSPExitSubscribeProgress ¶ added in v0.2.3
UpdateSPExitSubscribeProgress mocks base method.
func (*MockSPDB) UpdateSwapOutSubscribeProgress ¶ added in v0.2.3
UpdateSwapOutSubscribeProgress mocks base method.
func (*MockSPDB) UpdateSwapOutUnitCompletedGVGList ¶ added in v0.2.3
func (m *MockSPDB) UpdateSwapOutUnitCompletedGVGList(swapOutKey string, completedGVGList []uint32) error
UpdateSwapOutUnitCompletedGVGList mocks base method.
func (*MockSPDB) UpdateUploadProgress ¶
func (m *MockSPDB) UpdateUploadProgress(uploadMeta *UploadObjectMeta) error
UpdateUploadProgress mocks base method.
type MockSPDBMockRecorder ¶
type MockSPDBMockRecorder struct {
// contains filtered or unexported fields
}
MockSPDBMockRecorder is the mock recorder for MockSPDB.
func (*MockSPDBMockRecorder) CheckQuotaAndAddReadRecord ¶
func (mr *MockSPDBMockRecorder) CheckQuotaAndAddReadRecord(record, quota interface{}) *gomock.Call
CheckQuotaAndAddReadRecord indicates an expected call of CheckQuotaAndAddReadRecord.
func (*MockSPDBMockRecorder) DeleteAllReplicatePieceChecksum ¶
func (mr *MockSPDBMockRecorder) DeleteAllReplicatePieceChecksum(objectID, redundancyIdx, pieceCount interface{}) *gomock.Call
DeleteAllReplicatePieceChecksum indicates an expected call of DeleteAllReplicatePieceChecksum.
func (*MockSPDBMockRecorder) DeleteAllReplicatePieceChecksumOptimized ¶ added in v0.2.5
func (mr *MockSPDBMockRecorder) DeleteAllReplicatePieceChecksumOptimized(objectID, redundancyIdx interface{}) *gomock.Call
DeleteAllReplicatePieceChecksumOptimized indicates an expected call of DeleteAllReplicatePieceChecksumOptimized.
func (*MockSPDBMockRecorder) DeleteGCObjectProgress ¶
func (mr *MockSPDBMockRecorder) DeleteGCObjectProgress(taskKey interface{}) *gomock.Call
DeleteGCObjectProgress indicates an expected call of DeleteGCObjectProgress.
func (*MockSPDBMockRecorder) DeleteMigrateGVGUnit ¶ added in v0.2.3
func (mr *MockSPDBMockRecorder) DeleteMigrateGVGUnit(meta interface{}) *gomock.Call
DeleteMigrateGVGUnit indicates an expected call of DeleteMigrateGVGUnit.
func (*MockSPDBMockRecorder) DeleteMigrateGVGUnitsByBucketID ¶ added in v0.2.4
func (mr *MockSPDBMockRecorder) DeleteMigrateGVGUnitsByBucketID(bucketID interface{}) *gomock.Call
DeleteMigrateGVGUnitsByBucketID indicates an expected call of DeleteMigrateGVGUnitsByBucketID.
func (*MockSPDBMockRecorder) DeleteObjectIntegrity ¶
func (mr *MockSPDBMockRecorder) DeleteObjectIntegrity(objectID, redundancyIndex interface{}) *gomock.Call
DeleteObjectIntegrity indicates an expected call of DeleteObjectIntegrity.
func (*MockSPDBMockRecorder) DeleteUploadProgress ¶ added in v0.2.3
func (mr *MockSPDBMockRecorder) DeleteUploadProgress(objectID interface{}) *gomock.Call
DeleteUploadProgress indicates an expected call of DeleteUploadProgress.
func (*MockSPDBMockRecorder) FetchAllSp ¶
func (mr *MockSPDBMockRecorder) FetchAllSp(status ...interface{}) *gomock.Call
FetchAllSp indicates an expected call of FetchAllSp.
func (*MockSPDBMockRecorder) FetchAllSpWithoutOwnSp ¶
func (mr *MockSPDBMockRecorder) FetchAllSpWithoutOwnSp(status ...interface{}) *gomock.Call
FetchAllSpWithoutOwnSp indicates an expected call of FetchAllSpWithoutOwnSp.
func (*MockSPDBMockRecorder) GetAllReplicatePieceChecksum ¶
func (mr *MockSPDBMockRecorder) GetAllReplicatePieceChecksum(objectID, redundancyIdx, pieceCount interface{}) *gomock.Call
GetAllReplicatePieceChecksum indicates an expected call of GetAllReplicatePieceChecksum.
func (*MockSPDBMockRecorder) GetAllReplicatePieceChecksumOptimized ¶ added in v0.2.5
func (mr *MockSPDBMockRecorder) GetAllReplicatePieceChecksumOptimized(objectID, redundancyIdx, pieceCount interface{}) *gomock.Call
GetAllReplicatePieceChecksumOptimized indicates an expected call of GetAllReplicatePieceChecksumOptimized.
func (*MockSPDBMockRecorder) GetAuthKey ¶
func (mr *MockSPDBMockRecorder) GetAuthKey(userAddress, domain interface{}) *gomock.Call
GetAuthKey indicates an expected call of GetAuthKey.
func (*MockSPDBMockRecorder) GetBucketReadRecord ¶
func (mr *MockSPDBMockRecorder) GetBucketReadRecord(bucketID, timeRange interface{}) *gomock.Call
GetBucketReadRecord indicates an expected call of GetBucketReadRecord.
func (*MockSPDBMockRecorder) GetBucketTraffic ¶
func (mr *MockSPDBMockRecorder) GetBucketTraffic(bucketID, yearMonth interface{}) *gomock.Call
GetBucketTraffic indicates an expected call of GetBucketTraffic.
func (*MockSPDBMockRecorder) GetGCMetasToGC ¶ added in v0.2.3
func (mr *MockSPDBMockRecorder) GetGCMetasToGC(limit interface{}) *gomock.Call
GetGCMetasToGC indicates an expected call of GetGCMetasToGC.
func (*MockSPDBMockRecorder) GetObjectIntegrity ¶
func (mr *MockSPDBMockRecorder) GetObjectIntegrity(objectID, redundancyIndex interface{}) *gomock.Call
GetObjectIntegrity indicates an expected call of GetObjectIntegrity.
func (*MockSPDBMockRecorder) GetObjectReadRecord ¶
func (mr *MockSPDBMockRecorder) GetObjectReadRecord(objectID, timeRange interface{}) *gomock.Call
GetObjectReadRecord indicates an expected call of GetObjectReadRecord.
func (*MockSPDBMockRecorder) GetOwnSpInfo ¶
func (mr *MockSPDBMockRecorder) GetOwnSpInfo() *gomock.Call
GetOwnSpInfo indicates an expected call of GetOwnSpInfo.
func (*MockSPDBMockRecorder) GetReadRecord ¶
func (mr *MockSPDBMockRecorder) GetReadRecord(timeRange interface{}) *gomock.Call
GetReadRecord indicates an expected call of GetReadRecord.
func (*MockSPDBMockRecorder) GetSpByAddress ¶
func (mr *MockSPDBMockRecorder) GetSpByAddress(address, addressType interface{}) *gomock.Call
GetSpByAddress indicates an expected call of GetSpByAddress.
func (*MockSPDBMockRecorder) GetSpByEndpoint ¶
func (mr *MockSPDBMockRecorder) GetSpByEndpoint(endpoint interface{}) *gomock.Call
GetSpByEndpoint indicates an expected call of GetSpByEndpoint.
func (*MockSPDBMockRecorder) GetSpByID ¶ added in v0.2.4
func (mr *MockSPDBMockRecorder) GetSpByID(id interface{}) *gomock.Call
GetSpByID indicates an expected call of GetSpByID.
func (*MockSPDBMockRecorder) GetUploadMetasToReplicate ¶ added in v0.2.3
func (mr *MockSPDBMockRecorder) GetUploadMetasToReplicate(limit, timeout interface{}) *gomock.Call
GetUploadMetasToReplicate indicates an expected call of GetUploadMetasToReplicate.
func (*MockSPDBMockRecorder) GetUploadMetasToSeal ¶ added in v0.2.3
func (mr *MockSPDBMockRecorder) GetUploadMetasToSeal(limit, timeout interface{}) *gomock.Call
GetUploadMetasToSeal indicates an expected call of GetUploadMetasToSeal.
func (*MockSPDBMockRecorder) GetUploadState ¶ added in v0.2.3
func (mr *MockSPDBMockRecorder) GetUploadState(objectID interface{}) *gomock.Call
GetUploadState indicates an expected call of GetUploadState.
func (*MockSPDBMockRecorder) GetUserReadRecord ¶
func (mr *MockSPDBMockRecorder) GetUserReadRecord(userAddress, timeRange interface{}) *gomock.Call
GetUserReadRecord indicates an expected call of GetUserReadRecord.
func (*MockSPDBMockRecorder) InitBucketTraffic ¶ added in v0.2.3
func (mr *MockSPDBMockRecorder) InitBucketTraffic(record, quota interface{}) *gomock.Call
InitBucketTraffic indicates an expected call of InitBucketTraffic.
func (*MockSPDBMockRecorder) InsertAuthKey ¶
func (mr *MockSPDBMockRecorder) InsertAuthKey(newRecord interface{}) *gomock.Call
InsertAuthKey indicates an expected call of InsertAuthKey.
func (*MockSPDBMockRecorder) InsertGCObjectProgress ¶ added in v0.2.3
func (mr *MockSPDBMockRecorder) InsertGCObjectProgress(gcMeta interface{}) *gomock.Call
InsertGCObjectProgress indicates an expected call of InsertGCObjectProgress.
func (*MockSPDBMockRecorder) InsertMigrateGVGUnit ¶ added in v0.2.3
func (mr *MockSPDBMockRecorder) InsertMigrateGVGUnit(meta interface{}) *gomock.Call
InsertMigrateGVGUnit indicates an expected call of InsertMigrateGVGUnit.
func (*MockSPDBMockRecorder) InsertPutEvent ¶ added in v0.2.3
func (mr *MockSPDBMockRecorder) InsertPutEvent(task interface{}) *gomock.Call
InsertPutEvent indicates an expected call of InsertPutEvent.
func (*MockSPDBMockRecorder) InsertSwapOutUnit ¶ added in v0.2.3
func (mr *MockSPDBMockRecorder) InsertSwapOutUnit(meta interface{}) *gomock.Call
InsertSwapOutUnit indicates an expected call of InsertSwapOutUnit.
func (*MockSPDBMockRecorder) InsertUploadProgress ¶ added in v0.2.3
func (mr *MockSPDBMockRecorder) InsertUploadProgress(objectID interface{}) *gomock.Call
InsertUploadProgress indicates an expected call of InsertUploadProgress.
func (*MockSPDBMockRecorder) ListDestSPSwapOutUnits ¶ added in v0.2.3
func (mr *MockSPDBMockRecorder) ListDestSPSwapOutUnits() *gomock.Call
ListDestSPSwapOutUnits indicates an expected call of ListDestSPSwapOutUnits.
func (*MockSPDBMockRecorder) ListMigrateGVGUnitsByBucketID ¶ added in v0.2.3
func (mr *MockSPDBMockRecorder) ListMigrateGVGUnitsByBucketID(bucketID interface{}) *gomock.Call
ListMigrateGVGUnitsByBucketID indicates an expected call of ListMigrateGVGUnitsByBucketID.
func (*MockSPDBMockRecorder) QueryBucketMigrateSubscribeProgress ¶ added in v0.2.3
func (mr *MockSPDBMockRecorder) QueryBucketMigrateSubscribeProgress() *gomock.Call
QueryBucketMigrateSubscribeProgress indicates an expected call of QueryBucketMigrateSubscribeProgress.
func (*MockSPDBMockRecorder) QueryMigrateGVGUnit ¶ added in v0.2.3
func (mr *MockSPDBMockRecorder) QueryMigrateGVGUnit(migrateKey interface{}) *gomock.Call
QueryMigrateGVGUnit indicates an expected call of QueryMigrateGVGUnit.
func (*MockSPDBMockRecorder) QuerySPExitSubscribeProgress ¶ added in v0.2.3
func (mr *MockSPDBMockRecorder) QuerySPExitSubscribeProgress() *gomock.Call
QuerySPExitSubscribeProgress indicates an expected call of QuerySPExitSubscribeProgress.
func (*MockSPDBMockRecorder) QuerySwapOutSubscribeProgress ¶ added in v0.2.3
func (mr *MockSPDBMockRecorder) QuerySwapOutSubscribeProgress() *gomock.Call
QuerySwapOutSubscribeProgress indicates an expected call of QuerySwapOutSubscribeProgress.
func (*MockSPDBMockRecorder) QuerySwapOutUnitInSrcSP ¶ added in v0.2.3
func (mr *MockSPDBMockRecorder) QuerySwapOutUnitInSrcSP(swapOutKey interface{}) *gomock.Call
QuerySwapOutUnitInSrcSP indicates an expected call of QuerySwapOutUnitInSrcSP.
func (*MockSPDBMockRecorder) SetObjectIntegrity ¶
func (mr *MockSPDBMockRecorder) SetObjectIntegrity(integrity interface{}) *gomock.Call
SetObjectIntegrity indicates an expected call of SetObjectIntegrity.
func (*MockSPDBMockRecorder) SetOwnSpInfo ¶
func (mr *MockSPDBMockRecorder) SetOwnSpInfo(sp interface{}) *gomock.Call
SetOwnSpInfo indicates an expected call of SetOwnSpInfo.
func (*MockSPDBMockRecorder) SetReplicatePieceChecksum ¶
func (mr *MockSPDBMockRecorder) SetReplicatePieceChecksum(objectID, segmentIdx, redundancyIdx, checksum interface{}) *gomock.Call
SetReplicatePieceChecksum indicates an expected call of SetReplicatePieceChecksum.
func (*MockSPDBMockRecorder) UpdateAllSp ¶
func (mr *MockSPDBMockRecorder) UpdateAllSp(spList interface{}) *gomock.Call
UpdateAllSp indicates an expected call of UpdateAllSp.
func (*MockSPDBMockRecorder) UpdateAuthKey ¶
func (mr *MockSPDBMockRecorder) UpdateAuthKey(userAddress, domain, oldNonce, newNonce, newPublicKey, newExpiryDate interface{}) *gomock.Call
UpdateAuthKey indicates an expected call of UpdateAuthKey.
func (*MockSPDBMockRecorder) UpdateBucketMigrateSubscribeProgress ¶ added in v0.2.3
func (mr *MockSPDBMockRecorder) UpdateBucketMigrateSubscribeProgress(blockHeight interface{}) *gomock.Call
UpdateBucketMigrateSubscribeProgress indicates an expected call of UpdateBucketMigrateSubscribeProgress.
func (*MockSPDBMockRecorder) UpdateExtraQuota ¶ added in v0.2.5
func (mr *MockSPDBMockRecorder) UpdateExtraQuota(bucketID, extraQuota, yearMonth interface{}) *gomock.Call
FixExtraQuota indicates an expected call of FixExtraQuota.
func (*MockSPDBMockRecorder) UpdateGCObjectProgress ¶ added in v0.2.3
func (mr *MockSPDBMockRecorder) UpdateGCObjectProgress(gcMeta interface{}) *gomock.Call
UpdateGCObjectProgress indicates an expected call of UpdateGCObjectProgress.
func (*MockSPDBMockRecorder) UpdateIntegrityChecksum ¶ added in v0.2.3
func (mr *MockSPDBMockRecorder) UpdateIntegrityChecksum(integrity interface{}) *gomock.Call
UpdateIntegrityChecksum indicates an expected call of UpdateIntegrityChecksum.
func (*MockSPDBMockRecorder) UpdateMigrateGVGUnitLastMigrateObjectID ¶ added in v0.2.3
func (mr *MockSPDBMockRecorder) UpdateMigrateGVGUnitLastMigrateObjectID(migrateKey, lastMigrateObjectID interface{}) *gomock.Call
UpdateMigrateGVGUnitLastMigrateObjectID indicates an expected call of UpdateMigrateGVGUnitLastMigrateObjectID.
func (*MockSPDBMockRecorder) UpdateMigrateGVGUnitStatus ¶ added in v0.2.3
func (mr *MockSPDBMockRecorder) UpdateMigrateGVGUnitStatus(migrateKey, migrateStatus interface{}) *gomock.Call
UpdateMigrateGVGUnitStatus indicates an expected call of UpdateMigrateGVGUnitStatus.
func (*MockSPDBMockRecorder) UpdatePieceChecksum ¶ added in v0.2.3
func (mr *MockSPDBMockRecorder) UpdatePieceChecksum(objectID, redundancyIndex, checksum interface{}) *gomock.Call
UpdatePieceChecksum indicates an expected call of UpdatePieceChecksum.
func (*MockSPDBMockRecorder) UpdateSPExitSubscribeProgress ¶ added in v0.2.3
func (mr *MockSPDBMockRecorder) UpdateSPExitSubscribeProgress(blockHeight interface{}) *gomock.Call
UpdateSPExitSubscribeProgress indicates an expected call of UpdateSPExitSubscribeProgress.
func (*MockSPDBMockRecorder) UpdateSwapOutSubscribeProgress ¶ added in v0.2.3
func (mr *MockSPDBMockRecorder) UpdateSwapOutSubscribeProgress(blockHeight interface{}) *gomock.Call
UpdateSwapOutSubscribeProgress indicates an expected call of UpdateSwapOutSubscribeProgress.
func (*MockSPDBMockRecorder) UpdateSwapOutUnitCompletedGVGList ¶ added in v0.2.3
func (mr *MockSPDBMockRecorder) UpdateSwapOutUnitCompletedGVGList(swapOutKey, completedGVGList interface{}) *gomock.Call
UpdateSwapOutUnitCompletedGVGList indicates an expected call of UpdateSwapOutUnitCompletedGVGList.
func (*MockSPDBMockRecorder) UpdateUploadProgress ¶
func (mr *MockSPDBMockRecorder) UpdateUploadProgress(uploadMeta interface{}) *gomock.Call
UpdateUploadProgress indicates an expected call of UpdateUploadProgress.
type MockSPInfoDB ¶
type MockSPInfoDB struct {
// contains filtered or unexported fields
}
MockSPInfoDB is a mock of SPInfoDB interface.
func NewMockSPInfoDB ¶
func NewMockSPInfoDB(ctrl *gomock.Controller) *MockSPInfoDB
NewMockSPInfoDB creates a new mock instance.
func (*MockSPInfoDB) EXPECT ¶
func (m *MockSPInfoDB) EXPECT() *MockSPInfoDBMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockSPInfoDB) FetchAllSp ¶
func (m *MockSPInfoDB) FetchAllSp(status ...types0.Status) ([]*types0.StorageProvider, error)
FetchAllSp mocks base method.
func (*MockSPInfoDB) FetchAllSpWithoutOwnSp ¶
func (m *MockSPInfoDB) FetchAllSpWithoutOwnSp(status ...types0.Status) ([]*types0.StorageProvider, error)
FetchAllSpWithoutOwnSp mocks base method.
func (*MockSPInfoDB) GetOwnSpInfo ¶
func (m *MockSPInfoDB) GetOwnSpInfo() (*types0.StorageProvider, error)
GetOwnSpInfo mocks base method.
func (*MockSPInfoDB) GetSpByAddress ¶
func (m *MockSPInfoDB) GetSpByAddress(address string, addressType SpAddressType) (*types0.StorageProvider, error)
GetSpByAddress mocks base method.
func (*MockSPInfoDB) GetSpByEndpoint ¶
func (m *MockSPInfoDB) GetSpByEndpoint(endpoint string) (*types0.StorageProvider, error)
GetSpByEndpoint mocks base method.
func (*MockSPInfoDB) GetSpByID ¶ added in v0.2.4
func (m *MockSPInfoDB) GetSpByID(id uint32) (*types0.StorageProvider, error)
GetSpByID mocks base method.
func (*MockSPInfoDB) SetOwnSpInfo ¶
func (m *MockSPInfoDB) SetOwnSpInfo(sp *types0.StorageProvider) error
SetOwnSpInfo mocks base method.
func (*MockSPInfoDB) UpdateAllSp ¶
func (m *MockSPInfoDB) UpdateAllSp(spList []*types0.StorageProvider) error
UpdateAllSp mocks base method.
type MockSPInfoDBMockRecorder ¶
type MockSPInfoDBMockRecorder struct {
// contains filtered or unexported fields
}
MockSPInfoDBMockRecorder is the mock recorder for MockSPInfoDB.
func (*MockSPInfoDBMockRecorder) FetchAllSp ¶
func (mr *MockSPInfoDBMockRecorder) FetchAllSp(status ...interface{}) *gomock.Call
FetchAllSp indicates an expected call of FetchAllSp.
func (*MockSPInfoDBMockRecorder) FetchAllSpWithoutOwnSp ¶
func (mr *MockSPInfoDBMockRecorder) FetchAllSpWithoutOwnSp(status ...interface{}) *gomock.Call
FetchAllSpWithoutOwnSp indicates an expected call of FetchAllSpWithoutOwnSp.
func (*MockSPInfoDBMockRecorder) GetOwnSpInfo ¶
func (mr *MockSPInfoDBMockRecorder) GetOwnSpInfo() *gomock.Call
GetOwnSpInfo indicates an expected call of GetOwnSpInfo.
func (*MockSPInfoDBMockRecorder) GetSpByAddress ¶
func (mr *MockSPInfoDBMockRecorder) GetSpByAddress(address, addressType interface{}) *gomock.Call
GetSpByAddress indicates an expected call of GetSpByAddress.
func (*MockSPInfoDBMockRecorder) GetSpByEndpoint ¶
func (mr *MockSPInfoDBMockRecorder) GetSpByEndpoint(endpoint interface{}) *gomock.Call
GetSpByEndpoint indicates an expected call of GetSpByEndpoint.
func (*MockSPInfoDBMockRecorder) GetSpByID ¶ added in v0.2.4
func (mr *MockSPInfoDBMockRecorder) GetSpByID(id interface{}) *gomock.Call
GetSpByID indicates an expected call of GetSpByID.
func (*MockSPInfoDBMockRecorder) SetOwnSpInfo ¶
func (mr *MockSPInfoDBMockRecorder) SetOwnSpInfo(sp interface{}) *gomock.Call
SetOwnSpInfo indicates an expected call of SetOwnSpInfo.
func (*MockSPInfoDBMockRecorder) UpdateAllSp ¶
func (mr *MockSPInfoDBMockRecorder) UpdateAllSp(spList interface{}) *gomock.Call
UpdateAllSp indicates an expected call of UpdateAllSp.
type MockSignatureDB ¶ added in v0.2.3
type MockSignatureDB struct {
// contains filtered or unexported fields
}
MockSignatureDB is a mock of SignatureDB interface.
func NewMockSignatureDB ¶ added in v0.2.3
func NewMockSignatureDB(ctrl *gomock.Controller) *MockSignatureDB
NewMockSignatureDB creates a new mock instance.
func (*MockSignatureDB) DeleteAllReplicatePieceChecksum ¶ added in v0.2.3
func (m *MockSignatureDB) DeleteAllReplicatePieceChecksum(objectID uint64, redundancyIdx int32, pieceCount uint32) error
DeleteAllReplicatePieceChecksum mocks base method.
func (*MockSignatureDB) DeleteAllReplicatePieceChecksumOptimized ¶ added in v0.2.5
func (m *MockSignatureDB) DeleteAllReplicatePieceChecksumOptimized(objectID uint64, redundancyIdx int32) error
DeleteAllReplicatePieceChecksumOptimized mocks base method.
func (*MockSignatureDB) DeleteObjectIntegrity ¶ added in v0.2.3
func (m *MockSignatureDB) DeleteObjectIntegrity(objectID uint64, redundancyIndex int32) error
DeleteObjectIntegrity mocks base method.
func (*MockSignatureDB) EXPECT ¶ added in v0.2.3
func (m *MockSignatureDB) EXPECT() *MockSignatureDBMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockSignatureDB) GetAllReplicatePieceChecksum ¶ added in v0.2.3
func (m *MockSignatureDB) GetAllReplicatePieceChecksum(objectID uint64, redundancyIdx int32, pieceCount uint32) ([][]byte, error)
GetAllReplicatePieceChecksum mocks base method.
func (*MockSignatureDB) GetAllReplicatePieceChecksumOptimized ¶ added in v0.2.5
func (m *MockSignatureDB) GetAllReplicatePieceChecksumOptimized(objectID uint64, redundancyIdx int32, pieceCount uint32) ([][]byte, error)
GetAllReplicatePieceChecksumOptimized mocks base method.
func (*MockSignatureDB) GetObjectIntegrity ¶ added in v0.2.3
func (m *MockSignatureDB) GetObjectIntegrity(objectID uint64, redundancyIndex int32) (*IntegrityMeta, error)
GetObjectIntegrity mocks base method.
func (*MockSignatureDB) SetObjectIntegrity ¶ added in v0.2.3
func (m *MockSignatureDB) SetObjectIntegrity(integrity *IntegrityMeta) error
SetObjectIntegrity mocks base method.
func (*MockSignatureDB) SetReplicatePieceChecksum ¶ added in v0.2.3
func (m *MockSignatureDB) SetReplicatePieceChecksum(objectID uint64, segmentIdx uint32, redundancyIdx int32, checksum []byte) error
SetReplicatePieceChecksum mocks base method.
func (*MockSignatureDB) UpdateIntegrityChecksum ¶ added in v0.2.3
func (m *MockSignatureDB) UpdateIntegrityChecksum(integrity *IntegrityMeta) error
UpdateIntegrityChecksum mocks base method.
func (*MockSignatureDB) UpdatePieceChecksum ¶ added in v0.2.3
func (m *MockSignatureDB) UpdatePieceChecksum(objectID uint64, redundancyIndex int32, checksum []byte) error
UpdatePieceChecksum mocks base method.
type MockSignatureDBMockRecorder ¶ added in v0.2.3
type MockSignatureDBMockRecorder struct {
// contains filtered or unexported fields
}
MockSignatureDBMockRecorder is the mock recorder for MockSignatureDB.
func (*MockSignatureDBMockRecorder) DeleteAllReplicatePieceChecksum ¶ added in v0.2.3
func (mr *MockSignatureDBMockRecorder) DeleteAllReplicatePieceChecksum(objectID, redundancyIdx, pieceCount interface{}) *gomock.Call
DeleteAllReplicatePieceChecksum indicates an expected call of DeleteAllReplicatePieceChecksum.
func (*MockSignatureDBMockRecorder) DeleteAllReplicatePieceChecksumOptimized ¶ added in v0.2.5
func (mr *MockSignatureDBMockRecorder) DeleteAllReplicatePieceChecksumOptimized(objectID, redundancyIdx interface{}) *gomock.Call
DeleteAllReplicatePieceChecksumOptimized indicates an expected call of DeleteAllReplicatePieceChecksumOptimized.
func (*MockSignatureDBMockRecorder) DeleteObjectIntegrity ¶ added in v0.2.3
func (mr *MockSignatureDBMockRecorder) DeleteObjectIntegrity(objectID, redundancyIndex interface{}) *gomock.Call
DeleteObjectIntegrity indicates an expected call of DeleteObjectIntegrity.
func (*MockSignatureDBMockRecorder) GetAllReplicatePieceChecksum ¶ added in v0.2.3
func (mr *MockSignatureDBMockRecorder) GetAllReplicatePieceChecksum(objectID, redundancyIdx, pieceCount interface{}) *gomock.Call
GetAllReplicatePieceChecksum indicates an expected call of GetAllReplicatePieceChecksum.
func (*MockSignatureDBMockRecorder) GetAllReplicatePieceChecksumOptimized ¶ added in v0.2.5
func (mr *MockSignatureDBMockRecorder) GetAllReplicatePieceChecksumOptimized(objectID, redundancyIdx, pieceCount interface{}) *gomock.Call
GetAllReplicatePieceChecksumOptimized indicates an expected call of GetAllReplicatePieceChecksumOptimized.
func (*MockSignatureDBMockRecorder) GetObjectIntegrity ¶ added in v0.2.3
func (mr *MockSignatureDBMockRecorder) GetObjectIntegrity(objectID, redundancyIndex interface{}) *gomock.Call
GetObjectIntegrity indicates an expected call of GetObjectIntegrity.
func (*MockSignatureDBMockRecorder) SetObjectIntegrity ¶ added in v0.2.3
func (mr *MockSignatureDBMockRecorder) SetObjectIntegrity(integrity interface{}) *gomock.Call
SetObjectIntegrity indicates an expected call of SetObjectIntegrity.
func (*MockSignatureDBMockRecorder) SetReplicatePieceChecksum ¶ added in v0.2.3
func (mr *MockSignatureDBMockRecorder) SetReplicatePieceChecksum(objectID, segmentIdx, redundancyIdx, checksum interface{}) *gomock.Call
SetReplicatePieceChecksum indicates an expected call of SetReplicatePieceChecksum.
func (*MockSignatureDBMockRecorder) UpdateIntegrityChecksum ¶ added in v0.2.3
func (mr *MockSignatureDBMockRecorder) UpdateIntegrityChecksum(integrity interface{}) *gomock.Call
UpdateIntegrityChecksum indicates an expected call of UpdateIntegrityChecksum.
func (*MockSignatureDBMockRecorder) UpdatePieceChecksum ¶ added in v0.2.3
func (mr *MockSignatureDBMockRecorder) UpdatePieceChecksum(objectID, redundancyIndex, checksum interface{}) *gomock.Call
UpdatePieceChecksum indicates an expected call of UpdatePieceChecksum.
type MockTrafficDB ¶
type MockTrafficDB struct {
// contains filtered or unexported fields
}
MockTrafficDB is a mock of TrafficDB interface.
func NewMockTrafficDB ¶
func NewMockTrafficDB(ctrl *gomock.Controller) *MockTrafficDB
NewMockTrafficDB creates a new mock instance.
func (*MockTrafficDB) CheckQuotaAndAddReadRecord ¶
func (m *MockTrafficDB) CheckQuotaAndAddReadRecord(record *ReadRecord, quota *BucketQuota) error
CheckQuotaAndAddReadRecord mocks base method.
func (*MockTrafficDB) EXPECT ¶
func (m *MockTrafficDB) EXPECT() *MockTrafficDBMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockTrafficDB) GetBucketReadRecord ¶
func (m *MockTrafficDB) GetBucketReadRecord(bucketID uint64, timeRange *TrafficTimeRange) ([]*ReadRecord, error)
GetBucketReadRecord mocks base method.
func (*MockTrafficDB) GetBucketTraffic ¶
func (m *MockTrafficDB) GetBucketTraffic(bucketID uint64, yearMonth string) (*BucketTraffic, error)
GetBucketTraffic mocks base method.
func (*MockTrafficDB) GetObjectReadRecord ¶
func (m *MockTrafficDB) GetObjectReadRecord(objectID uint64, timeRange *TrafficTimeRange) ([]*ReadRecord, error)
GetObjectReadRecord mocks base method.
func (*MockTrafficDB) GetReadRecord ¶
func (m *MockTrafficDB) GetReadRecord(timeRange *TrafficTimeRange) ([]*ReadRecord, error)
GetReadRecord mocks base method.
func (*MockTrafficDB) GetUserReadRecord ¶
func (m *MockTrafficDB) GetUserReadRecord(userAddress string, timeRange *TrafficTimeRange) ([]*ReadRecord, error)
GetUserReadRecord mocks base method.
func (*MockTrafficDB) InitBucketTraffic ¶ added in v0.2.3
func (m *MockTrafficDB) InitBucketTraffic(record *ReadRecord, quota *BucketQuota) error
InitBucketTraffic mocks base method.
func (*MockTrafficDB) UpdateExtraQuota ¶ added in v0.2.5
func (m *MockTrafficDB) UpdateExtraQuota(bucketID, extraQuota uint64, yearMonth string) error
type MockTrafficDBMockRecorder ¶
type MockTrafficDBMockRecorder struct {
// contains filtered or unexported fields
}
MockTrafficDBMockRecorder is the mock recorder for MockTrafficDB.
func (*MockTrafficDBMockRecorder) CheckQuotaAndAddReadRecord ¶
func (mr *MockTrafficDBMockRecorder) CheckQuotaAndAddReadRecord(record, quota interface{}) *gomock.Call
CheckQuotaAndAddReadRecord indicates an expected call of CheckQuotaAndAddReadRecord.
func (*MockTrafficDBMockRecorder) FixExtraQuota ¶ added in v0.2.5
func (mr *MockTrafficDBMockRecorder) FixExtraQuota(bucketID, extraQuota, yearMonth interface{}) *gomock.Call
func (*MockTrafficDBMockRecorder) GetBucketReadRecord ¶
func (mr *MockTrafficDBMockRecorder) GetBucketReadRecord(bucketID, timeRange interface{}) *gomock.Call
GetBucketReadRecord indicates an expected call of GetBucketReadRecord.
func (*MockTrafficDBMockRecorder) GetBucketTraffic ¶
func (mr *MockTrafficDBMockRecorder) GetBucketTraffic(bucketID, yearMonth interface{}) *gomock.Call
GetBucketTraffic indicates an expected call of GetBucketTraffic.
func (*MockTrafficDBMockRecorder) GetObjectReadRecord ¶
func (mr *MockTrafficDBMockRecorder) GetObjectReadRecord(objectID, timeRange interface{}) *gomock.Call
GetObjectReadRecord indicates an expected call of GetObjectReadRecord.
func (*MockTrafficDBMockRecorder) GetReadRecord ¶
func (mr *MockTrafficDBMockRecorder) GetReadRecord(timeRange interface{}) *gomock.Call
GetReadRecord indicates an expected call of GetReadRecord.
func (*MockTrafficDBMockRecorder) GetUserReadRecord ¶
func (mr *MockTrafficDBMockRecorder) GetUserReadRecord(userAddress, timeRange interface{}) *gomock.Call
GetUserReadRecord indicates an expected call of GetUserReadRecord.
func (*MockTrafficDBMockRecorder) InitBucketTraffic ¶ added in v0.2.3
func (mr *MockTrafficDBMockRecorder) InitBucketTraffic(record, quota interface{}) *gomock.Call
InitBucketTraffic indicates an expected call of InitBucketTraffic.
type MockUploadObjectProgressDB ¶
type MockUploadObjectProgressDB struct {
// contains filtered or unexported fields
}
MockUploadObjectProgressDB is a mock of UploadObjectProgressDB interface.
func NewMockUploadObjectProgressDB ¶
func NewMockUploadObjectProgressDB(ctrl *gomock.Controller) *MockUploadObjectProgressDB
NewMockUploadObjectProgressDB creates a new mock instance.
func (*MockUploadObjectProgressDB) DeleteUploadProgress ¶ added in v0.2.3
func (m *MockUploadObjectProgressDB) DeleteUploadProgress(objectID uint64) error
DeleteUploadProgress mocks base method.
func (*MockUploadObjectProgressDB) EXPECT ¶
func (m *MockUploadObjectProgressDB) EXPECT() *MockUploadObjectProgressDBMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockUploadObjectProgressDB) GetUploadMetasToReplicate ¶ added in v0.2.3
func (m *MockUploadObjectProgressDB) GetUploadMetasToReplicate(limit int, timeout int64) ([]*UploadObjectMeta, error)
GetUploadMetasToReplicate mocks base method.
func (*MockUploadObjectProgressDB) GetUploadMetasToSeal ¶ added in v0.2.3
func (m *MockUploadObjectProgressDB) GetUploadMetasToSeal(limit int, timeout int64) ([]*UploadObjectMeta, error)
GetUploadMetasToSeal mocks base method.
func (*MockUploadObjectProgressDB) GetUploadState ¶ added in v0.2.3
func (m *MockUploadObjectProgressDB) GetUploadState(objectID uint64) (types.TaskState, string, error)
GetUploadState mocks base method.
func (*MockUploadObjectProgressDB) InsertPutEvent ¶ added in v0.2.3
func (m *MockUploadObjectProgressDB) InsertPutEvent(task task.Task) error
InsertPutEvent mocks base method.
func (*MockUploadObjectProgressDB) InsertUploadProgress ¶ added in v0.2.3
func (m *MockUploadObjectProgressDB) InsertUploadProgress(objectID uint64) error
InsertUploadProgress mocks base method.
func (*MockUploadObjectProgressDB) UpdateUploadProgress ¶
func (m *MockUploadObjectProgressDB) UpdateUploadProgress(uploadMeta *UploadObjectMeta) error
UpdateUploadProgress mocks base method.
type MockUploadObjectProgressDBMockRecorder ¶
type MockUploadObjectProgressDBMockRecorder struct {
// contains filtered or unexported fields
}
MockUploadObjectProgressDBMockRecorder is the mock recorder for MockUploadObjectProgressDB.
func (*MockUploadObjectProgressDBMockRecorder) DeleteUploadProgress ¶ added in v0.2.3
func (mr *MockUploadObjectProgressDBMockRecorder) DeleteUploadProgress(objectID interface{}) *gomock.Call
DeleteUploadProgress indicates an expected call of DeleteUploadProgress.
func (*MockUploadObjectProgressDBMockRecorder) GetUploadMetasToReplicate ¶ added in v0.2.3
func (mr *MockUploadObjectProgressDBMockRecorder) GetUploadMetasToReplicate(limit, timeout interface{}) *gomock.Call
GetUploadMetasToReplicate indicates an expected call of GetUploadMetasToReplicate.
func (*MockUploadObjectProgressDBMockRecorder) GetUploadMetasToSeal ¶ added in v0.2.3
func (mr *MockUploadObjectProgressDBMockRecorder) GetUploadMetasToSeal(limit, timeout interface{}) *gomock.Call
GetUploadMetasToSeal indicates an expected call of GetUploadMetasToSeal.
func (*MockUploadObjectProgressDBMockRecorder) GetUploadState ¶ added in v0.2.3
func (mr *MockUploadObjectProgressDBMockRecorder) GetUploadState(objectID interface{}) *gomock.Call
GetUploadState indicates an expected call of GetUploadState.
func (*MockUploadObjectProgressDBMockRecorder) InsertPutEvent ¶ added in v0.2.3
func (mr *MockUploadObjectProgressDBMockRecorder) InsertPutEvent(task interface{}) *gomock.Call
InsertPutEvent indicates an expected call of InsertPutEvent.
func (*MockUploadObjectProgressDBMockRecorder) InsertUploadProgress ¶ added in v0.2.3
func (mr *MockUploadObjectProgressDBMockRecorder) InsertUploadProgress(objectID interface{}) *gomock.Call
InsertUploadProgress indicates an expected call of InsertUploadProgress.
func (*MockUploadObjectProgressDBMockRecorder) UpdateUploadProgress ¶
func (mr *MockUploadObjectProgressDBMockRecorder) UpdateUploadProgress(uploadMeta interface{}) *gomock.Call
UpdateUploadProgress indicates an expected call of UpdateUploadProgress.
type OffChainAuthKey ¶
type OffChainAuthKeyDB ¶
type OffChainAuthKeyDB interface { GetAuthKey(userAddress string, domain string) (*OffChainAuthKey, error) UpdateAuthKey(userAddress string, domain string, oldNonce int32, newNonce int32, newPublicKey string, newExpiryDate time.Time) error InsertAuthKey(newRecord *OffChainAuthKey) error }
OffChainAuthKeyDB interface.
type ReadRecord ¶
type ReadRecord struct { BucketID uint64 ObjectID uint64 UserAddress string BucketName string ObjectName string ReadSize uint64 ReadTimestampUs int64 }
ReadRecord defines a read request record, will decrease the bucket read quota.
type SPDB ¶
type SPDB interface { UploadObjectProgressDB GCObjectProgressDB SignatureDB TrafficDB SPInfoDB OffChainAuthKeyDB MigrateDB }
SPDB contains all sp db operations
type SPInfoDB ¶
type SPInfoDB interface { // UpdateAllSp update all sp info, delete old sp info. UpdateAllSp(spList []*sptypes.StorageProvider) error // FetchAllSp if status is nil return all sp info; otherwise return sp info by status. FetchAllSp(status ...sptypes.Status) ([]*sptypes.StorageProvider, error) // FetchAllSpWithoutOwnSp if status is nil return all sp info without own sp; // otherwise return sp info by status without own sp. FetchAllSpWithoutOwnSp(status ...sptypes.Status) ([]*sptypes.StorageProvider, error) // GetSpByAddress return sp info by address and addressType. GetSpByAddress(address string, addressType SpAddressType) (*sptypes.StorageProvider, error) // GetSpByEndpoint return sp info by endpoint. GetSpByEndpoint(endpoint string) (*sptypes.StorageProvider, error) // GetSpByID return sp info by id. GetSpByID(id uint32) (*sptypes.StorageProvider, error) // GetOwnSpInfo return own sp info. GetOwnSpInfo() (*sptypes.StorageProvider, error) // SetOwnSpInfo set(maybe overwrite) own sp info. SetOwnSpInfo(sp *sptypes.StorageProvider) error }
SPInfoDB defines a series of sp interfaces.
type SignatureDB ¶
type SignatureDB interface { /* Object Signature is used to get challenge info. */ // GetObjectIntegrity gets integrity meta info by object id and redundancy index. GetObjectIntegrity(objectID uint64, redundancyIndex int32) (*IntegrityMeta, error) // SetObjectIntegrity sets(maybe overwrite) integrity hash info to db. SetObjectIntegrity(integrity *IntegrityMeta) error // DeleteObjectIntegrity deletes the integrity hash. DeleteObjectIntegrity(objectID uint64, redundancyIndex int32) error // UpdateIntegrityChecksum update IntegrityMetaTable's integrity checksum UpdateIntegrityChecksum(integrity *IntegrityMeta) error // UpdatePieceChecksum if the IntegrityMetaTable already exists, it will be appended to the existing PieceChecksumList. UpdatePieceChecksum(objectID uint64, redundancyIndex int32, checksum []byte) error /* Piece Signature is used to help replicate object's piece data to secondary sps, which is temporary. */ // SetReplicatePieceChecksum sets(maybe overwrite) the piece hash. SetReplicatePieceChecksum(objectID uint64, segmentIdx uint32, redundancyIdx int32, checksum []byte) error // GetAllReplicatePieceChecksum gets all piece hashes. GetAllReplicatePieceChecksum(objectID uint64, redundancyIdx int32, pieceCount uint32) ([][]byte, error) // GetAllReplicatePieceChecksumOptimized gets all piece hashes. GetAllReplicatePieceChecksumOptimized(objectID uint64, redundancyIdx int32, pieceCount uint32) ([][]byte, error) // DeleteAllReplicatePieceChecksum deletes all piece hashes. DeleteAllReplicatePieceChecksum(objectID uint64, redundancyIdx int32, pieceCount uint32) error // DeleteAllReplicatePieceChecksumOptimized deletes all piece hashes. DeleteAllReplicatePieceChecksumOptimized(objectID uint64, redundancyIdx int32) error }
SignatureDB abstract object integrity interface.
type SpAddressType ¶
type SpAddressType int32
SpAddressType identify address type of SP.
const ( OperatorAddressType SpAddressType = iota + 1 FundingAddressType SealAddressType ApprovalAddressType )
type SwapOutMeta ¶ added in v0.2.3
type SwapOutMeta struct { SwapOutKey string // as primary key IsDestSP bool SwapOutMsg *virtualgrouptypes.MsgSwapOut CompletedGVGs []uint32 }
SwapOutMeta is used to record swap out meta.
type TrafficDB ¶
type TrafficDB interface { // CheckQuotaAndAddReadRecord get the traffic info from db, update the quota meta and check // whether the added traffic record exceeds the quota, if it exceeds the quota, // it will return error, Otherwise, add a record and return nil. CheckQuotaAndAddReadRecord(record *ReadRecord, quota *BucketQuota) error // InitBucketTraffic init the traffic info InitBucketTraffic(record *ReadRecord, quota *BucketQuota) error // GetBucketTraffic return bucket traffic info, // notice maybe return (nil, nil) while there is no bucket traffic. GetBucketTraffic(bucketID uint64, yearMonth string) (*BucketTraffic, error) // UpdateExtraQuota update the read consumed quota and free consumed quota in traffic db with the extra quota UpdateExtraQuota(bucketID, extraQuota uint64, yearMonth string) error // GetReadRecord return record list by time range. GetReadRecord(timeRange *TrafficTimeRange) ([]*ReadRecord, error) // GetBucketReadRecord return bucket record list by time range. GetBucketReadRecord(bucketID uint64, timeRange *TrafficTimeRange) ([]*ReadRecord, error) // GetObjectReadRecord return object record list by time range. GetObjectReadRecord(objectID uint64, timeRange *TrafficTimeRange) ([]*ReadRecord, error) // GetUserReadRecord return user record list by time range. GetUserReadRecord(userAddress string, timeRange *TrafficTimeRange) ([]*ReadRecord, error) }
TrafficDB defines a series of traffic interfaces.
type TrafficTimeRange ¶
type TrafficTimeRange struct { StartTimestampUs int64 EndTimestampUs int64 LimitNum int // is unlimited if LimitNum <= 0. }
TrafficTimeRange is used by query, return records in [StartTimestampUs, EndTimestampUs).
type UploadObjectMeta ¶
type UploadObjectMeta struct { ObjectID uint64 TaskState storetypes.TaskState GlobalVirtualGroupID uint32 SecondaryEndpoints []string SecondarySignatures [][]byte ErrorDescription string }
UploadObjectMeta defines the upload object state and related seal info, etc.
type UploadObjectProgressDB ¶
type UploadObjectProgressDB interface { // InsertUploadProgress inserts a new upload object progress. InsertUploadProgress(objectID uint64) error // DeleteUploadProgress deletes the upload object progress. DeleteUploadProgress(objectID uint64) error // UpdateUploadProgress updates the upload object progress state. UpdateUploadProgress(uploadMeta *UploadObjectMeta) error // GetUploadState queries the task state by object id. GetUploadState(objectID uint64) (storetypes.TaskState, string, error) // GetUploadMetasToReplicate queries the latest upload_done/replicate_doing object to continue replicate. // It is only used in startup. GetUploadMetasToReplicate(limit int, timeout int64) ([]*UploadObjectMeta, error) // GetUploadMetasToSeal queries the latest replicate_done/seal_doing object to continue seal. // It is only used in startup. GetUploadMetasToSeal(limit int, timeout int64) ([]*UploadObjectMeta, error) // InsertPutEvent inserts a new upload event progress. InsertPutEvent(task coretask.Task) error }
UploadObjectProgressDB interface which records upload object related progress(includes foreground and background) and state.