eol

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2026 License: Apache-2.0 Imports: 19 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	EOLCollector = "endoflife.date"
)

Variables

View Source
var (
	ErrEOLComponenetTypeMismatch = errors.New("rootComponent type is not []*root_package.PackageNode")
)

Functions

func EvaluateEOLResponse

func EvaluateEOLResponse(ctx context.Context, client *http.Client, purls []string, docChannel chan<- *processor.Document) ([]*processor.Document, error)

func NewEOLCertifier

func NewEOLCertifier() certifier.Certifier

Types

type CycleData

type CycleData struct {
	Cycle        string          `json:"cycle"`
	ReleaseDate  string          `json:"releaseDate"`
	EOL          EOLStringOrBool `json:"eol"` // Can be string or boolean
	Latest       string          `json:"latest"`
	Link         *string         `json:"link"`         // Can be null
	LTS          EOLStringOrBool `json:"lts"`          // Can be string or boolean
	Support      EOLStringOrBool `json:"support"`      // Can be string or boolean
	Discontinued EOLStringOrBool `json:"discontinued"` // Can be string or boolean
}

CycleData represents the endoflife.date API data type for a cycle

type EOLData

type EOLData = []CycleData

EOLData is a list of CycleData, the response from the endoflife.date API

type EOLStringOrBool

type EOLStringOrBool struct {
	// contains filtered or unexported fields
}

EOLStringOrBool represents a value that can be either a string, boolean, or null

func NewBoolValue

func NewBoolValue(b bool) EOLStringOrBool

NewBoolValue creates a EOLStringOrBool from a bool

func NewStringValue

func NewStringValue(s string) EOLStringOrBool

NewStringValue creates a EOLStringOrBool from a string

func (*EOLStringOrBool) Bool

func (f *EOLStringOrBool) Bool() bool

Bool returns a boolean value: - If value is bool: returns that value - If value is string: tries to parse as date and compares with current time - Otherwise: returns false

func (*EOLStringOrBool) IsBool

func (f *EOLStringOrBool) IsBool() bool

IsBool returns true if the value is a boolean

func (*EOLStringOrBool) IsString

func (f *EOLStringOrBool) IsString() bool

IsString returns true if the value is a string

func (*EOLStringOrBool) String

func (f *EOLStringOrBool) String() string

String returns the string value or empty string if not a string

func (*EOLStringOrBool) ToBool

func (f *EOLStringOrBool) ToBool() bool

ToBool converts the value to a boolean based on type: - bool: returns the value - string: returns true if non-empty - nil: returns false

func (*EOLStringOrBool) UnmarshalJSON

func (f *EOLStringOrBool) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler

Jump to

Keyboard shortcuts

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