Documentation
¶
Index ¶
Constants ¶
const DatabaseStructVersion = 20220411
const PluginStructVersion = 20220411
Variables ¶
This section is empty.
Functions ¶
func FormatTime ¶
FormatTime :: format time as RFC3339 in UTC
Types ¶
type DatabaseVersionFile ¶ added in v0.7.0
type DatabaseVersionFile struct { FdwExtension InstalledVersion `json:"fdw_extension"` EmbeddedDB InstalledVersion `json:"embedded_db"` StructVersion int64 `json:"struct_version"` }
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) IsValid ¶ added in v0.14.0
func (s DatabaseVersionFile) IsValid() bool
IsValid checks whether the struct was correctly deserialized, by checking if the StructVersion is populated
func (*DatabaseVersionFile) MigrateFrom ¶ added in v0.14.0
func (s *DatabaseVersionFile) MigrateFrom(prev interface{}) migrate.Migrateable
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:"image_digest"` BinaryDigest string `json:"binary_digest"` BinaryArchitecture string `json:"binary_arch"` InstalledFrom string `json:"installed_from"` LastCheckedDate string `json:"last_checked_date"` InstallDate string `json:"install_date"` }
type LegacyCompositeVersionFile ¶ added in v0.14.0
type LegacyCompositeVersionFile struct { Plugins map[string]*InstalledVersion `json:"plugins"` FdwExtension InstalledVersion `json:"fdwExtension"` EmbeddedDB InstalledVersion `json:"embeddedDB"` }
LegacyCompositeVersionFile is the composite version file used before v0.7.0, which contained both db and plugin properties, now split into two different files
func LoadLegacyVersionFile ¶ added in v0.7.0
func LoadLegacyVersionFile() (*LegacyCompositeVersionFile, error)
LoadLegacyVersionFile loads the legacy version file, or returns nil if it does not exist
type LegacyDatabaseVersionFile ¶
type LegacyDatabaseVersionFile struct { FdwExtension LegacyInstalledVersion `json:"fdwExtension"` EmbeddedDB LegacyInstalledVersion `json:"embeddedDB"` }
LegacyDatabaseVersionFile is a struct used to migrate the DatabaseVersionFile to serialize with snake case property names(migrated in v0.14.0)
type LegacyInstalledVersion ¶
type LegacyInstalledVersion 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"` }
LegacyInstalledVersion is the legacy db installed version info struct
type LegacyPluginVersionFile ¶
type LegacyPluginVersionFile struct {
Plugins map[string]*LegacyInstalledVersion `json:"plugins"`
}
LegacyPluginVersionFile is a struct used to migrate the PluginVersionFile to serialize with snake case property names(migrated in v0.14.0)
type PluginVersionFile ¶ added in v0.7.0
type PluginVersionFile struct { Plugins map[string]*InstalledVersion `json:"plugins"` StructVersion int64 `json:"struct_version"` }
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) IsValid ¶ added in v0.14.0
func (s PluginVersionFile) IsValid() bool
IsValid checks whether the struct was correctly deserialized, by checking if the StructVersion is populated
func (*PluginVersionFile) MigrateFrom ¶ added in v0.14.0
func (s *PluginVersionFile) MigrateFrom(prev interface{}) migrate.Migrateable
func (*PluginVersionFile) Save ¶ added in v0.7.0
func (f *PluginVersionFile) Save() error
Save writes the config file to disk