versionfile

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2021 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatTime

func FormatTime(localTime time.Time) string

FormatTime :: format time as RFC3339 in UTC

Types

type DatabaseVersionFile added in v0.7.0

type DatabaseVersionFile struct {
	FdwExtension InstalledVersion `json:"fdwExtension"`
	EmbeddedDB   InstalledVersion `json:"embeddedDB"`
}

func LoadDatabaseVersionFile added in v0.7.0

func LoadDatabaseVersionFile() (*DatabaseVersionFile, error)

LoadDatabaseVersionFile migrates from the old version file format if necessary and loads the database version data

func MigrateDatabaseVersionFile added in v0.7.0

func MigrateDatabaseVersionFile() (*DatabaseVersionFile, error)

func NewDBVersionFile added in v0.7.0

func NewDBVersionFile() *DatabaseVersionFile

func (*DatabaseVersionFile) Save added in v0.7.0

func (f *DatabaseVersionFile) Save() error

Save writes the config

type InstalledVersion

type InstalledVersion struct {
	Name            string `json:"name"`
	Version         string `json:"version"`
	ImageDigest     string `json:"imageDigest"`
	InstalledFrom   string `json:"installedFrom"`
	LastCheckedDate string `json:"lastCheckedDate"`
	InstallDate     string `json:"installDate"`
}

type LegacyVersionFile added in v0.7.0

type LegacyVersionFile struct {
	Plugins      map[string]*InstalledVersion `json:"plugins"`
	FdwExtension InstalledVersion             `json:"fdwExtension"`
	EmbeddedDB   InstalledVersion             `json:"embeddedDB"`
}

func LoadLegacyVersionFile added in v0.7.0

func LoadLegacyVersionFile() (*LegacyVersionFile, error)

LoadLegacyVersionFile loads the legacy version file, or returns nil if it does not exist

type PluginVersionFile added in v0.7.0

type PluginVersionFile struct {
	Plugins map[string]*InstalledVersion `json:"plugins"`
}

func LoadPluginVersionFile added in v0.7.0

func LoadPluginVersionFile() (*PluginVersionFile, error)

LoadPluginVersionFile migrates from the old version file format if necessary and loads the plugin version data

func MigratePluginVersionFile added in v0.7.0

func MigratePluginVersionFile() (*PluginVersionFile, error)

func NewPluginVersionFile added in v0.7.0

func NewPluginVersionFile() *PluginVersionFile

func (*PluginVersionFile) Save added in v0.7.0

func (f *PluginVersionFile) Save() error

Save writes the config file to disk

Jump to

Keyboard shortcuts

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