npm

package
v0.22.2 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OutDateRatingNewMajorVersionAvailable = 500
	OutDateRatingNewMinorVersionAvailable = 400
	OutDateRatingNewPatchVersionAvailable = 300
	OutDateRatingNoNewVersionAvailable    = 200
)
View Source
const (
	OutDateRatingMessageNewMajorVersionAvailable = "New major version available"
	OutDateRatingMessageNewMinorVersionAvailable = "New minor version available"
	OutDateRatingMessageNewPatchVersionAvailable = "New patch version available"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type OutDate

type OutDate struct {
	Name           string         `json:"name"`
	Current        string         `json:"current"`
	CurrentVersion *Version       `json:"currentVersion"`
	Wanted         string         `json:"wanted"`
	WantedVersion  *Version       `json:"wantedVersion"`
	Latest         string         `json:"latest"`
	LatestVersion  *Version       `json:"latestVersion"`
	Dependent      string         `json:"dependent"`
	Rating         *OutDateRating `json:"rating"`
}

func NewOutDate

func NewOutDate(name, current, wanted, latest, dependent string) (*OutDate, error)

func (*OutDate) NewMajorVersionAvailable

func (o *OutDate) NewMajorVersionAvailable() bool

func (*OutDate) NewMinorVersionAvailable

func (o *OutDate) NewMinorVersionAvailable() bool

func (*OutDate) NewPatchVersionAvailable

func (o *OutDate) NewPatchVersionAvailable() bool

func (*OutDate) Rate

func (o *OutDate) Rate()

type OutDateRating

type OutDateRating struct {
	StatusCode int
	Message    string
}

type Version

type Version struct {
	Major int `json:"major"`
	Minor int `json:"minor"`
	Patch int `json:"patch"`
}

func ConvertVersion

func ConvertVersion(version string) (*Version, error)

Jump to

Keyboard shortcuts

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