db

package
v0.0.0-...-30412bc Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusMissingYML = -4
	StatusUnmatched  = -3
	StatusOutOfDate  = -2
	StatusHeldBack   = -1
	StatusUpToDate   = 0
	StatusAhead      = 1
)

Variables

This section is empty.

Functions

func CleanPackages

func CleanPackages(db *sqlx.DB, curr []string) error

func CreateTables

func CreateTables(db *sqlx.DB) error

func Open

func Open() (db *sqlx.DB, err error)

func UpdatePackage

func UpdatePackage(db *sqlx.DB, releases []Release) error

Types

type Release

type Release struct {
	Package string
	Source  string
	Current string
	Latest  string
	Updated time.Time
	Status  int
	Index   int `db:"idx"`
}

func GetAllReleases

func GetAllReleases(db *sqlx.DB) ([]Release, error)

func GetReleases

func GetReleases(db *sqlx.DB, name string) ([]Release, error)

func (Release) Check

func (r Release) Check(db *sqlx.DB) Release

type Version

type Version []string

Version is a record of a new version for a single source

func NewVersion

func NewVersion(raw string) Version

func (Version) Compare

func (v Version) Compare(old Version) int

Compare allows to version nubmers to be compared to see which is newer (higher)

Jump to

Keyboard shortcuts

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