Documentation ¶
Index ¶
- Constants
- Variables
- func DeletePackageByPath(importPath string) error
- func NumTotalPackages() int64
- func SavePkgInfo(pinfo *PkgInfo, updateRefs bool) (err error)
- type PkgInfo
- func GetGAERepos() ([]*PkgInfo, error)
- func GetGoRepos() ([]*PkgInfo, error)
- func GetGoSubepos() ([]*PkgInfo, error)
- func GetPkgInfo(importPath string) (*PkgInfo, error)
- func GetPkgInfoById(id int64) (*PkgInfo, error)
- func GetPkgInfosByIDs(ids []int64) ([]*PkgInfo, error)
- func GetPkgInfosByPaths(paths []string) []*PkgInfo
- func GetSubPkgs(importPath string, dirs []string) []*PkgInfo
- func SearchPkgInfo(limit int, keyword string) ([]*PkgInfo, error)
- type PkgRef
Constants ¶
View Source
const PACKAGE_VER = 1
PACKAGE_VER is modified when previously stored packages are invalid.
Variables ¶
Functions ¶
func DeletePackageByPath ¶
func NumTotalPackages ¶
func NumTotalPackages() int64
func SavePkgInfo ¶
SavePkgInfo saves package information.
Types ¶
type PkgInfo ¶
type PkgInfo struct { ID int64 `xorm:"pk autoincr"` Name string `xorm:"-"` ImportPath string `xorm:"UNIQUE"` Etag string ProjectPath string ViewDirPath string Synopsis string IsCmd bool IsCgo bool IsGoRepo bool IsGoSubrepo bool IsGaeRepo bool PkgVer int Priority int `xorm:" NOT NULL"` Views int64 Stars int64 // Indicate how many JS should be downloaded(JsNum=total num - 1) JsNum int ImportNum int64 ImportIDs string `xorm:"import_ids LONGTEXT"` // Import num usually is small so save it to reduce a database query. ImportPaths string `xorm:"LONGTEXT"` RefNum int64 RefIDs string `xorm:"ref_ids LONGTEXT"` Subdirs string `xorm:"TEXT"` LastViewed int64 `xorm:"-"` Created int64 }
PkgInfo represents the package information.
func GetGAERepos ¶
func GetGoRepos ¶
func GetGoSubepos ¶
func GetPkgInfo ¶
GetPkgInfo returns package information by given import path.
func GetPkgInfoById ¶
GetPkgInfoById returns package information by given ID.
func GetPkgInfosByIDs ¶
GetPkgInfosByIDs returns a list of package info by given IDs.
func GetPkgInfosByPaths ¶
GetPkgInfosByPaths returns a list of packages by given import paths.
func GetSubPkgs ¶
GetSubPkgs returns sub-projects by given sub-directories.
func SearchPkgInfo ¶
SearchPkgInfo searches package information by given keyword.
func (*PkgInfo) CanRefresh ¶
CanRefresh returns true if package is available to refresh.
Click to show internal directories.
Click to hide internal directories.