Documentation ¶ Index ¶ func AddFile(projId int64, tag, addr, log string) (err error) func AddProject(name, ref, sha string) (id int64, err error) func InitDB(driver, dataSource string) (err error) type File func SearchFile(projID int64, tag string) (f *File, err error) type Project func SearchProject(name, sha string) (p *Project, err error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func AddFile ¶ func AddFile(projId int64, tag, addr, log string) (err error) func AddProject ¶ func AddProject(name, ref, sha string) (id int64, err error) func InitDB ¶ func InitDB(driver, dataSource string) (err error) should be call before pacakge called Types ¶ type File ¶ type File struct { Id int64 `xorm:"pk autoincr"` ProjId int64 Tag string Addr string Log string `xorm:"text"` Time time.Time `xorm:"created"` ViewCount int Version int `xorm:"version"` } func SearchFile ¶ func SearchFile(projID int64, tag string) (f *File, err error) type Project ¶ type Project struct { Id int64 `xorm:"pk autoincr"` Name string `xorm:"unique(nr)"` Sha string `xorm:"unique(nr)"` Ref string Time time.Time `xorm:"created"` ViewCount int } func SearchProject ¶ func SearchProject(name, sha string) (p *Project, err error) Source Files ¶ View all Source files database.go Click to show internal directories. Click to hide internal directories.