db

package
v0.0.29 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB
View Source
var Inited bool

Functions

func CreatePkg

func CreatePkg(pkg model.Package) (err error)

func CreateSelfBuild

func CreateSelfBuild(selfBuild model.SelfBuild) (err error)

func FindPkgByImportPath added in v0.0.28

func FindPkgByImportPath(importPath string) (pkg model.Package, err error)

func FindPkgByPkgPath

func FindPkgByPkgPath(pkgPath string) (pkg model.Package, err error)

func FindPkgByPkgPathOrImportPath added in v0.0.28

func FindPkgByPkgPathOrImportPath(pkgPath string, importPath string) (pkg model.Package, err error)

func FindSelfBuildByPkgPath

func FindSelfBuildByPkgPath(pkgPath string) (selfBuild model.SelfBuild, err error)

func Init

func Init(filepath string)

func InitGormDB

func InitGormDB(dsn string) (err error)

func IsPrebuilt

func IsPrebuilt() (prebuilt bool, err error)

func ListPackages

func ListPackages() (packages []model.Package, err error)

func ListSelfBuild

func ListSelfBuild() (selfBuildList []model.SelfBuild, err error)

func Migrate

func Migrate() (err error)

func MigrateTables

func MigrateTables(models ...interface{}) (err error)

func MustPkgNotExists

func MustPkgNotExists(pkgPath string)

func PkgExists

func PkgExists(pkgPath string) (exists bool, pkg model.Package, err error)

func Prebuilt

func Prebuilt() (err error)

func SelfBuildExists

func SelfBuildExists(pkgPath string) (exists bool, selfBuild model.SelfBuild, err error)

func UpdatePkg

func UpdatePkg(pkg model.Package) (err error)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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