Documentation ¶
Overview ¶
Package db is a generated GoMock package.
Package db is a generated GoMock package.
Index ¶
- func Init(path string)
- func NewEngine(path string) *xorm.Engine
- type MockNasuFileStore
- func (m *MockNasuFileStore) DeleteNasuFileByFilename(filename string) bool
- func (m *MockNasuFileStore) EXPECT() *MockNasuFileStoreMockRecorder
- func (m *MockNasuFileStore) InsertNasuFile(nasuFile NasuFile) bool
- func (m *MockNasuFileStore) QueryNasuFileByHash(hash string) *NasuFile
- func (m *MockNasuFileStore) QueryNasuFileById(id int64) *NasuFile
- func (m *MockNasuFileStore) QueryNasuFiles() []NasuFile
- func (m *MockNasuFileStore) QueryNasuFilesByCondition(filename, extension string, labels, tags []string, startTime, endTime string, ...) []NasuFile
- func (m *MockNasuFileStore) UpdateNasuFile(nasuFile *NasuFile) bool
- type MockNasuFileStoreMockRecorder
- func (mr *MockNasuFileStoreMockRecorder) DeleteNasuFileByFilename(filename interface{}) *gomock.Call
- func (mr *MockNasuFileStoreMockRecorder) InsertNasuFile(nasuFile interface{}) *gomock.Call
- func (mr *MockNasuFileStoreMockRecorder) QueryNasuFileByHash(hash interface{}) *gomock.Call
- func (mr *MockNasuFileStoreMockRecorder) QueryNasuFileById(id interface{}) *gomock.Call
- func (mr *MockNasuFileStoreMockRecorder) QueryNasuFiles() *gomock.Call
- func (mr *MockNasuFileStoreMockRecorder) QueryNasuFilesByCondition(...) *gomock.Call
- func (mr *MockNasuFileStoreMockRecorder) UpdateNasuFile(nasuFile interface{}) *gomock.Call
- type MockNasuMetaStore
- func (m *MockNasuMetaStore) DeleteNasuMetaByMetaTypeAndMetaValue(metaType, metaValue string) bool
- func (m *MockNasuMetaStore) EXPECT() *MockNasuMetaStoreMockRecorder
- func (m *MockNasuMetaStore) InsertNasuMeta(nasuMeta *NasuMeta) bool
- func (m *MockNasuMetaStore) InsertNasuMetaIfNotExistedByMetaType(nasuMeta *NasuMeta) bool
- func (m *MockNasuMetaStore) QueryNasuMetaByType(metaType string) *NasuMeta
- func (m *MockNasuMetaStore) QueryNasuMetasByType(metaType string) []NasuMeta
- func (m *MockNasuMetaStore) UpdateNasuMetaByType(metaType, metaValue string) bool
- type MockNasuMetaStoreMockRecorder
- func (mr *MockNasuMetaStoreMockRecorder) DeleteNasuMetaByMetaTypeAndMetaValue(metaType, metaValue interface{}) *gomock.Call
- func (mr *MockNasuMetaStoreMockRecorder) InsertNasuMeta(nasuMeta interface{}) *gomock.Call
- func (mr *MockNasuMetaStoreMockRecorder) InsertNasuMetaIfNotExistedByMetaType(nasuMeta interface{}) *gomock.Call
- func (mr *MockNasuMetaStoreMockRecorder) QueryNasuMetaByType(metaType interface{}) *gomock.Call
- func (mr *MockNasuMetaStoreMockRecorder) QueryNasuMetasByType(metaType interface{}) *gomock.Call
- func (mr *MockNasuMetaStoreMockRecorder) UpdateNasuMetaByType(metaType, metaValue interface{}) *gomock.Call
- type NasuFile
- type NasuFileStore
- type NasuMeta
- type NasuMetaStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MockNasuFileStore ¶
type MockNasuFileStore struct {
// contains filtered or unexported fields
}
MockNasuFileStore is a mock of NasuFileStore interface.
func NewMockNasuFileStore ¶
func NewMockNasuFileStore(ctrl *gomock.Controller) *MockNasuFileStore
NewMockNasuFileStore creates a new mock instance.
func (*MockNasuFileStore) DeleteNasuFileByFilename ¶
func (m *MockNasuFileStore) DeleteNasuFileByFilename(filename string) bool
DeleteNasuFileByFilename mocks base method.
func (*MockNasuFileStore) EXPECT ¶
func (m *MockNasuFileStore) EXPECT() *MockNasuFileStoreMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockNasuFileStore) InsertNasuFile ¶
func (m *MockNasuFileStore) InsertNasuFile(nasuFile NasuFile) bool
InsertNasuFile mocks base method.
func (*MockNasuFileStore) QueryNasuFileByHash ¶
func (m *MockNasuFileStore) QueryNasuFileByHash(hash string) *NasuFile
QueryNasuFileByHash mocks base method.
func (*MockNasuFileStore) QueryNasuFileById ¶
func (m *MockNasuFileStore) QueryNasuFileById(id int64) *NasuFile
QueryNasuFileById mocks base method.
func (*MockNasuFileStore) QueryNasuFiles ¶
func (m *MockNasuFileStore) QueryNasuFiles() []NasuFile
QueryNasuFiles mocks base method.
func (*MockNasuFileStore) QueryNasuFilesByCondition ¶
func (m *MockNasuFileStore) QueryNasuFilesByCondition(filename, extension string, labels, tags []string, startTime, endTime string, pageSize, pageNum int) []NasuFile
QueryNasuFilesByCondition mocks base method.
func (*MockNasuFileStore) UpdateNasuFile ¶
func (m *MockNasuFileStore) UpdateNasuFile(nasuFile *NasuFile) bool
UpdateNasuFile mocks base method.
type MockNasuFileStoreMockRecorder ¶
type MockNasuFileStoreMockRecorder struct {
// contains filtered or unexported fields
}
MockNasuFileStoreMockRecorder is the mock recorder for MockNasuFileStore.
func (*MockNasuFileStoreMockRecorder) DeleteNasuFileByFilename ¶
func (mr *MockNasuFileStoreMockRecorder) DeleteNasuFileByFilename(filename interface{}) *gomock.Call
DeleteNasuFileByFilename indicates an expected call of DeleteNasuFileByFilename.
func (*MockNasuFileStoreMockRecorder) InsertNasuFile ¶
func (mr *MockNasuFileStoreMockRecorder) InsertNasuFile(nasuFile interface{}) *gomock.Call
InsertNasuFile indicates an expected call of InsertNasuFile.
func (*MockNasuFileStoreMockRecorder) QueryNasuFileByHash ¶
func (mr *MockNasuFileStoreMockRecorder) QueryNasuFileByHash(hash interface{}) *gomock.Call
QueryNasuFileByHash indicates an expected call of QueryNasuFileByHash.
func (*MockNasuFileStoreMockRecorder) QueryNasuFileById ¶
func (mr *MockNasuFileStoreMockRecorder) QueryNasuFileById(id interface{}) *gomock.Call
QueryNasuFileById indicates an expected call of QueryNasuFileById.
func (*MockNasuFileStoreMockRecorder) QueryNasuFiles ¶
func (mr *MockNasuFileStoreMockRecorder) QueryNasuFiles() *gomock.Call
QueryNasuFiles indicates an expected call of QueryNasuFiles.
func (*MockNasuFileStoreMockRecorder) QueryNasuFilesByCondition ¶
func (mr *MockNasuFileStoreMockRecorder) QueryNasuFilesByCondition(filename, extension, labels, tags, startTime, endTime, pageSize, pageNum interface{}) *gomock.Call
QueryNasuFilesByCondition indicates an expected call of QueryNasuFilesByCondition.
func (*MockNasuFileStoreMockRecorder) UpdateNasuFile ¶
func (mr *MockNasuFileStoreMockRecorder) UpdateNasuFile(nasuFile interface{}) *gomock.Call
UpdateNasuFile indicates an expected call of UpdateNasuFile.
type MockNasuMetaStore ¶
type MockNasuMetaStore struct {
// contains filtered or unexported fields
}
MockNasuMetaStore is a mock of NasuMetaStore interface.
func NewMockNasuMetaStore ¶
func NewMockNasuMetaStore(ctrl *gomock.Controller) *MockNasuMetaStore
NewMockNasuMetaStore creates a new mock instance.
func (*MockNasuMetaStore) DeleteNasuMetaByMetaTypeAndMetaValue ¶
func (m *MockNasuMetaStore) DeleteNasuMetaByMetaTypeAndMetaValue(metaType, metaValue string) bool
DeleteNasuMetaByMetaTypeAndMetaValue mocks base method.
func (*MockNasuMetaStore) EXPECT ¶
func (m *MockNasuMetaStore) EXPECT() *MockNasuMetaStoreMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockNasuMetaStore) InsertNasuMeta ¶
func (m *MockNasuMetaStore) InsertNasuMeta(nasuMeta *NasuMeta) bool
InsertNasuMeta mocks base method.
func (*MockNasuMetaStore) InsertNasuMetaIfNotExistedByMetaType ¶
func (m *MockNasuMetaStore) InsertNasuMetaIfNotExistedByMetaType(nasuMeta *NasuMeta) bool
InsertNasuMetaIfNotExistedByMetaType mocks base method.
func (*MockNasuMetaStore) QueryNasuMetaByType ¶
func (m *MockNasuMetaStore) QueryNasuMetaByType(metaType string) *NasuMeta
QueryNasuMetaByType mocks base method.
func (*MockNasuMetaStore) QueryNasuMetasByType ¶
func (m *MockNasuMetaStore) QueryNasuMetasByType(metaType string) []NasuMeta
QueryNasuMetasByType mocks base method.
func (*MockNasuMetaStore) UpdateNasuMetaByType ¶
func (m *MockNasuMetaStore) UpdateNasuMetaByType(metaType, metaValue string) bool
UpdateNasuMetaByType mocks base method.
type MockNasuMetaStoreMockRecorder ¶
type MockNasuMetaStoreMockRecorder struct {
// contains filtered or unexported fields
}
MockNasuMetaStoreMockRecorder is the mock recorder for MockNasuMetaStore.
func (*MockNasuMetaStoreMockRecorder) DeleteNasuMetaByMetaTypeAndMetaValue ¶
func (mr *MockNasuMetaStoreMockRecorder) DeleteNasuMetaByMetaTypeAndMetaValue(metaType, metaValue interface{}) *gomock.Call
DeleteNasuMetaByMetaTypeAndMetaValue indicates an expected call of DeleteNasuMetaByMetaTypeAndMetaValue.
func (*MockNasuMetaStoreMockRecorder) InsertNasuMeta ¶
func (mr *MockNasuMetaStoreMockRecorder) InsertNasuMeta(nasuMeta interface{}) *gomock.Call
InsertNasuMeta indicates an expected call of InsertNasuMeta.
func (*MockNasuMetaStoreMockRecorder) InsertNasuMetaIfNotExistedByMetaType ¶
func (mr *MockNasuMetaStoreMockRecorder) InsertNasuMetaIfNotExistedByMetaType(nasuMeta interface{}) *gomock.Call
InsertNasuMetaIfNotExistedByMetaType indicates an expected call of InsertNasuMetaIfNotExistedByMetaType.
func (*MockNasuMetaStoreMockRecorder) QueryNasuMetaByType ¶
func (mr *MockNasuMetaStoreMockRecorder) QueryNasuMetaByType(metaType interface{}) *gomock.Call
QueryNasuMetaByType indicates an expected call of QueryNasuMetaByType.
func (*MockNasuMetaStoreMockRecorder) QueryNasuMetasByType ¶
func (mr *MockNasuMetaStoreMockRecorder) QueryNasuMetasByType(metaType interface{}) *gomock.Call
QueryNasuMetasByType indicates an expected call of QueryNasuMetasByType.
func (*MockNasuMetaStoreMockRecorder) UpdateNasuMetaByType ¶
func (mr *MockNasuMetaStoreMockRecorder) UpdateNasuMetaByType(metaType, metaValue interface{}) *gomock.Call
UpdateNasuMetaByType indicates an expected call of UpdateNasuMetaByType.
type NasuFile ¶
type NasuFile struct { Id int64 GmtCreate time.Time `xorm:"created 'gmt_create'"` GmtModified time.Time `xorm:"updated 'gmt_modified'"` Filename string `xorm:"unique 'filename'"` Labels string `xorm:"labels"` Tags string `xorm:"tags"` Location string `xorm:"location"` Size string `xorm:"varchar(128) 'size'"` UploadTime time.Time `xorm:"upload_time"` Extension string `xorm:"varchar(128) 'extension'"` Hash string `xorm:"unique 'hash'"` }
type NasuFileStore ¶
type NasuFileStore interface { InsertNasuFile(nasuFile NasuFile) bool QueryNasuFileByHash(hash string) *NasuFile QueryNasuFiles() []NasuFile QueryNasuFilesByCondition(filename string, extension string, labels []string, tags []string, startTime string, endTime string, pageSize int, pageNum int) []NasuFile QueryNasuFileById(id int64) *NasuFile UpdateNasuFile(nasuFile *NasuFile) bool DeleteNasuFileByFilename(filename string) bool }
var NasuFileRepo NasuFileStore
func NewNasuFileRepo ¶
func NewNasuFileRepo(engine *xorm.Engine) NasuFileStore
type NasuMeta ¶
type NasuMetaStore ¶
type NasuMetaStore interface { InsertNasuMetaIfNotExistedByMetaType(nasuMeta *NasuMeta) bool QueryNasuMetaByType(metaType string) *NasuMeta QueryNasuMetasByType(metaType string) []NasuMeta UpdateNasuMetaByType(metaType string, metaValue string) bool InsertNasuMeta(nasuMeta *NasuMeta) bool DeleteNasuMetaByMetaTypeAndMetaValue(metaType string, metaValue string) bool }
var NasuMetaRepo NasuMetaStore
func NewNasuMetaRepo ¶
func NewNasuMetaRepo(engine *xorm.Engine) NasuMetaStore