Documentation
¶
Overview ¶
Package model is a model abstraction of export import configuration and status.
Index ¶
Constants ¶
const ( ImportFileOpen = "OPEN" ImportFilePending = "PENDING" ImportFileComplete = "COMPLETE" ImportFileFailed = "FAILED" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExportImport ¶
type ExportImport struct {
ID int64
IndexFile string
ExportRoot string
Region string
Traveler bool
From time.Time
Thru *time.Time
}
ExportImport represents the configuration of a set of export files to be imported into this server, by pointing at the index file and remote root directory.
func (*ExportImport) Active ¶
func (ei *ExportImport) Active() bool
Active returns true if the ExportImport configuration is currently active based on From and Thru times.
func (*ExportImport) Validate ¶
func (ei *ExportImport) Validate() error
Validate checks the contents of an ExportImport file. This is a utility function for the admin console.
type ImportFile ¶
type ImportFile struct {
ID int64
ExportImportID int64
ZipFilename string
DiscoveredAt time.Time
ProcessedAt *time.Time
Status string
Retries uint
}
ImportFile represents an individual export file that is scheduled for, or has been attempted or imported into the system.
type ImportFilePublicKey ¶
type ImportFilePublicKey struct {
ExportImportID int64
KeyID string
KeyVersion string
PublicKeyPEM string
From time.Time
Thru *time.Time
}
ImportFilePublicKey represents a possible signing key for export files being imported into this system. A given ExportImportID can have more than one associated key, and more than one that is currently valid.
func (*ImportFilePublicKey) Active ¶ added in v0.24.0
func (pk *ImportFilePublicKey) Active() bool
func (*ImportFilePublicKey) Future ¶ added in v0.24.0
func (pk *ImportFilePublicKey) Future() bool
func (*ImportFilePublicKey) PublicKey ¶
func (pk *ImportFilePublicKey) PublicKey() (*ecdsa.PublicKey, error)
func (*ImportFilePublicKey) Revoke ¶ added in v0.24.0
func (pk *ImportFilePublicKey) Revoke()