v1

package
v0.9.15 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const EolStoreFileName = "xeol.db"
View Source
const SchemaVersion = 1

Variables

This section is empty.

Functions

This section is empty.

Types

type Cpe

type Cpe struct {
	Cpe string `json:"cpe"`
}

type Cycle

type Cycle struct {
	ProductName       string `json:"productName"`
	ProductPermalink  string `json:"productPermalink"`
	ReleaseDate       string `json:"releaseDate"`
	ReleaseCycle      string `json:"releaseCycle"`
	LatestReleaseDate string `json:"latestReleaseDate"`
	LatestRelease     string `json:"latestRelease"`
	LTS               string `json:"lts"`
	Eol               string `json:"eol"`
	EolBool           bool   `json:"eolBool"`
}

type DBCloser

type DBCloser interface {
	Close()
}

type EolStore

type EolStore interface {
	EolStoreReader
	EolStoreWriter
}

type EolStoreReader

type EolStoreReader interface {
	GetCyclesByPurl(purl string) ([]Cycle, error)
	GetCyclesByCpe(cpe string) ([]Cycle, error)
	GetAllProducts() (*[]Product, error)
}

type EolStoreWriter

type EolStoreWriter interface {
}

type ID

type ID struct {
	// BuildTimestamp is the timestamp used to define the age of the DB, ideally including the age of the data
	// contained in the DB, not just when the DB file was created.
	BuildTimestamp time.Time `json:"build_timestamp"`
	SchemaVersion  int       `json:"schema_version"`
}

ID represents identifying information for a DB and the data it contains.

func NewID

func NewID(age time.Time) ID

type IDReader

type IDReader interface {
	GetID() (*ID, error)
}

type IDWriter

type IDWriter interface {
	SetID(ID) error
}

type Product

type Product struct {
	ID        int    `json:"id"`
	Name      string `json:"name"`
	Permalink string `json:"permalink"`
}

type Purl

type Purl struct {
	Purl string `json:"purl"`
}

type Store

type Store interface {
	StoreReader
	StoreWriter
	DBCloser
}

type StoreReader

type StoreReader interface {
	IDReader
	EolStoreReader
}

type StoreWriter

type StoreWriter interface {
	IDWriter
	EolStoreWriter
}

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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