Documentation ¶
Index ¶
- Constants
- func NewDB(ctx *Context) *gorm.DB
- func NewTestDB() *gorm.DB
- type App
- type Config
- type Context
- type File
- type Service
- func (p *Service) Add(path string)
- func (p *Service) Count(args []string) int64
- func (p *Service) Dirs() []string
- func (p *Service) Ignore(path string)
- func (p *Service) Ignores() []string
- func (p *Service) Index()
- func (p *Service) RemoveDir(path string)
- func (p *Service) RemoveFiles(path string)
- func (p *Service) RemoveIgnore(path string)
- func (p *Service) Search(args []string) []*File
Constants ¶
View Source
const ( // ByteDir 目录. ByteDir = iota // ByteFile 文件. ByteFile // ByteConfig 配置. ByteConfig // ByteSeq 序列. ByteSeq // ByteStack 堆栈. ByteStack // ByteIgnore 忽略. ByteIgnore )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
type Context struct { // DataBasePath 数据库目录. DataBasePath string Limit int Offset int Ext string // Simple 简单输出格式. Simple bool Debug bool Remove bool Order string Desc bool Regexp bool HasRegexp bool }
Context 上下文.
type File ¶
type File struct { Path string `gorm:"primarykey"` ModTime time.Time Base string Ext string Size int64 Dir bool Ver int }
File 文件.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.