v6

package
v0.82.1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VulnerabilityDBFileName = "vulnerability.db"

	// ModelVersion indicates how many breaking schema changes there have been (which will prevent interaction with any historical data)
	// note: this must ALWAYS be "6" in the context of this package.
	ModelVersion = 6

	// Revision indicates how many changes have been introduced which **may** prevent interaction with some historical data
	Revision = 0

	// Addition indicates how many changes have been introduced that are compatible with all historical data
	Addition = 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DBDirPath string
}

func (*Config) DBFilePath

func (c *Config) DBFilePath() string

type DBMetadata

type DBMetadata struct {
	BuildTimestamp *time.Time `gorm:"column:build_timestamp;not null"`
	Model          int        `gorm:"column:model;not null"`
	Revision       int        `gorm:"column:revision;not null"`
	Addition       int        `gorm:"column:addition;not null"`
}

type DBMetadataStoreReader

type DBMetadataStoreReader interface {
	GetDBMetadata() (*DBMetadata, error)
}

type DBMetadataStoreWriter

type DBMetadataStoreWriter interface {
	SetDBMetadata() error
}

type ReadWriter

type ReadWriter interface {
	Reader
	Writer
}

func NewWriter

func NewWriter(cfg Config) (ReadWriter, error)

type Reader

type Reader interface {
	DBMetadataStoreReader
}

func NewReader

func NewReader(cfg Config) (Reader, error)

type Writer

type Writer interface {
	DBMetadataStoreWriter
	io.Closer
}

Jump to

Keyboard shortcuts

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