model

package
v0.18.2 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package model is a model abstraction of export import configuration and status.

Index

Constants

View Source
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
	From       time.Time
	Thru       *time.Time
}

func (*ExportImport) Active

func (ei *ExportImport) Active() bool

func (*ExportImport) Validate

func (ei *ExportImport) Validate() error

type ImportFile

type ImportFile struct {
	ID             int64
	ExportImportID int64
	ZipFilename    string
	DiscoveredAt   time.Time
	ProcessedAt    *time.Time
	Status         string
	Retries        uint
}

func (*ImportFile) ShouldTry added in v0.17.0

func (f *ImportFile) ShouldTry(retryRate time.Duration) bool

ShouldTry performs some introspection on an import file from the DB, and returns true if that file should be tried for download.

type ImportFilePublicKey

type ImportFilePublicKey struct {
	ExportImportID int64
	KeyID          string
	KeyVersion     string
	PublicKeyPEM   string
	From           time.Time
	Thru           *time.Time
}

func (*ImportFilePublicKey) PublicKey

func (pk *ImportFilePublicKey) PublicKey() (*ecdsa.PublicKey, error)

Jump to

Keyboard shortcuts

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