database

package
v0.0.0-...-b42fd65 Latest Latest
Warning

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

Go to latest
Published: May 6, 2014 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

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)

Jump to

Keyboard shortcuts

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