Documentation ¶
Index ¶
- Variables
- func MockCreate(testId uint32)
- func MockGet(testData map[string]uint32, expectedCid uint32)
- func MockNew(testId uint32, testName string)
- func MockOpen(testId uint32, expectedCid string)
- type ContentMockData
- func (m *ContentMockData) Cid()
- func (m *ContentMockData) Close()
- func (m *ContentMockData) Create()
- func (_m ContentMockData) Mock() *ContentMockData
- func (m *ContentMockData) Open()
- func (m *ContentMockData) Push()
- func (m *ContentMockData) Read()
- func (m *ContentMockData) Seek()
- func (m *ContentMockData) Write()
- type FileMockData
- func (_m FileMockData) Mock() *FileMockData
- func (m FileMockData) MockAdd()
- func (m FileMockData) MockCurrentVersion()
- func (m FileMockData) MockDelete()
- func (m FileMockData) MockDeleteAllVersions()
- func (m FileMockData) MockGetFile()
- func (m FileMockData) MockNew()
- func (m FileMockData) MockVersions()
- type StorageFileMockData
- type StorageMockData
Constants ¶
This section is empty.
Variables ¶
View Source
var ContentCloseFile = func(contentId uint32) (error errno.Error) {
return 0
}
View Source
var ContentFileCid = func(contentId uint32, cidPtr *byte) (error errno.Error) {
return 0
}
View Source
var ContentPushFile = func(contentId uint32, cidPtr *byte) (error errno.Error) {
return 0
}
View Source
var ContentReadFile = func(contentId uint32, buf *byte, bufLen uint32, countPtr *uint32) (error errno.Error) {
return 0
}
View Source
var ContentSeekFile = func(contentId uint32, offset int64, whence int, offsetPtr *int) (error errno.Error) {
return 0
}
View Source
var ContentWriteFile = func(contentId uint32, buf *byte, bufLen uint32, writePtr *uint32) (error errno.Error) {
return 0
}
View Source
var StorageAddFile = func(storageId uint32, fileName string, versionPtr *uint32, bufPtr *byte, bufLen uint32, overWrite uint32) (error errno.Error) {
return 0
}
View Source
var StorageCapacity = func(storageId uint32, capacityPtr *byte) (error errno.Error) {
return 0
}
View Source
var StorageCapacitySize = func(storageId uint32, sizePtr *uint32) (error errno.Error) {
return 0
}
View Source
var StorageCid = func(cidPtr *byte, idPtr *uint32) (error errno.Error) {
return 0
}
View Source
var StorageCidSize = func(storageId uint32, fileName string, idPtr *uint32) (error errno.Error) {
return 0
}
View Source
var StorageCloseFile = func(storageId uint32, fd uint32) (error errno.Error) {
return 0
}
View Source
var StorageCurrentVersion = func(filename string, versionPtr *byte) (error errno.Error) {
return 0
}
View Source
var StorageCurrentVersionSize = func(storageId uint32, fileName string, sizePtr *uint32) (error errno.Error) {
return 0
}
View Source
var StorageDeleteFile = func(storageId uint32, fileName string, version uint32, all uint32) (error errno.Error) {
return 0
}
View Source
var StorageGet = func(storageName string, idPtr *uint32) (error errno.Error) {
return 0
}
View Source
var StorageGetFile = func(storageId uint32, fileName string, version uint32, fdPtr *uint32) (error errno.Error) {
return 0
}
View Source
var StorageListFiles = func(storageId uint32, bufPtr *byte) (error errno.Error) {
return 0
}
View Source
var StorageListFilesSize = func(storageId uint32, sizePtr *uint32) (error errno.Error) {
return 0
}
View Source
var StorageListVersions = func(storageId uint32, fileName string, versionPtr *byte) (error errno.Error) {
return 0
}
View Source
var StorageListVersionsSize = func(storageId uint32, fileName string, sizePtr *uint32) (error errno.Error) {
return 0
}
View Source
var StorageNew = func(storageName string, idPtr *uint32) (error errno.Error) {
return 0
}
View Source
var StorageNewContent = func(contentIdPtr *uint32) (error errno.Error) {
return 0
}
View Source
var StorageOpenCid = func(contentIdPtr *uint32, cid *byte, cidSize uint32) (error errno.Error) {
return 0
}
View Source
var StorageReadFile = func(storageId uint32, fd uint32, buf *byte, bufSize uint32, count *uint32) (error errno.Error) {
return 0
}
View Source
var StorageUsed = func(storageId uint32, usedPtr *byte) (error errno.Error) {
return 0
}
View Source
var StorageUsedSize = func(storageId uint32, sizePtr *uint32) (error errno.Error) {
return 0
}
Functions ¶
func MockCreate ¶
func MockCreate(testId uint32)
Types ¶
type ContentMockData ¶
type ContentMockData struct { Id uint32 ContentIdMap map[uint32]contentMock Files map[cid.Cid]*os.File }
func (*ContentMockData) Cid ¶
func (m *ContentMockData) Cid()
func (*ContentMockData) Close ¶
func (m *ContentMockData) Close()
func (*ContentMockData) Create ¶
func (m *ContentMockData) Create()
func (ContentMockData) Mock ¶
func (_m ContentMockData) Mock() *ContentMockData
func (*ContentMockData) Open ¶
func (m *ContentMockData) Open()
func (*ContentMockData) Push ¶
func (m *ContentMockData) Push()
func (*ContentMockData) Read ¶
func (m *ContentMockData) Read()
func (*ContentMockData) Seek ¶
func (m *ContentMockData) Seek()
func (*ContentMockData) Write ¶
func (m *ContentMockData) Write()
type FileMockData ¶
type FileMockData struct { StorageId uint32 StorageName string Id uint32 FileName string Version int FileId uint32 Versions map[string][]string Overwrite bool Read int Data []byte }
func (FileMockData) Mock ¶
func (_m FileMockData) Mock() *FileMockData
func (FileMockData) MockAdd ¶
func (m FileMockData) MockAdd()
func (FileMockData) MockCurrentVersion ¶
func (m FileMockData) MockCurrentVersion()
func (FileMockData) MockDelete ¶
func (m FileMockData) MockDelete()
func (FileMockData) MockDeleteAllVersions ¶
func (m FileMockData) MockDeleteAllVersions()
func (FileMockData) MockGetFile ¶
func (m FileMockData) MockGetFile()
func (FileMockData) MockNew ¶
func (m FileMockData) MockNew()
func (FileMockData) MockVersions ¶
func (m FileMockData) MockVersions()
type StorageFileMockData ¶
func (StorageFileMockData) Mock ¶
func (_m StorageFileMockData) Mock() *StorageFileMockData
func (StorageFileMockData) MockClose ¶
func (m StorageFileMockData) MockClose()
func (StorageFileMockData) MockNew ¶
func (m StorageFileMockData) MockNew()
func (StorageFileMockData) MockRead ¶
func (m StorageFileMockData) MockRead()
type StorageMockData ¶
type StorageMockData struct { StorageId uint32 StorageName string FileId uint32 FileName string Cid string Files string Used int Capacity int }
func (StorageMockData) Mock ¶
func (_m StorageMockData) Mock() *StorageMockData
func (StorageMockData) MockCid ¶
func (m StorageMockData) MockCid()
func (StorageMockData) MockListFiles ¶
func (m StorageMockData) MockListFiles()
func (StorageMockData) MockNew ¶
func (m StorageMockData) MockNew()
func (StorageMockData) MockRemainingCapacity ¶
func (m StorageMockData) MockRemainingCapacity()
Click to show internal directories.
Click to hide internal directories.