db

package
v0.0.0-...-0de623a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package db is a generated GoMock package.

Package db is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(path string)

func NewEngine

func NewEngine(path string) *xorm.Engine

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

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

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'"`
}

func (NasuFile) GetLabels

func (nasuFile NasuFile) GetLabels() []string

func (NasuFile) GetTags

func (nasuFile NasuFile) GetTags() []string

func (NasuFile) TableName

func (nasuFile NasuFile) TableName() string

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 NasuMeta struct {
	Id          int64
	GmtCreate   time.Time `xorm:"created 'gmt_create'"`
	GmtModified time.Time `xorm:"updated 'gmt_modified'"`
	MetaType    string    `xorm:"unique(uk_type_value) 'meta_type'"`
	MetaValue   string    `xorm:"unique(uk_type_value) 'meta_value'"`
}

func (NasuMeta) TableName

func (nasuMeta NasuMeta) TableName() string

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL