model

package
v0.18.3 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package model is a model abstraction of exports.

Index

Constants

This section is empty.

Variables

View Source
var (
	ExportBatchOpen          = "OPEN"
	ExportBatchPending       = "PENDING"
	ExportBatchComplete      = "COMPLETE"
	ExportBatchDeletePending = "DEL_PEND"
	ExportBatchDeleted       = "DELETED"
)

Functions

This section is empty.

Types

type ExportBatch

type ExportBatch struct {
	BatchID            int64
	ConfigID           int64
	BucketName         string
	FilenameRoot       string
	StartTimestamp     time.Time
	EndTimestamp       time.Time
	OutputRegion       string
	InputRegions       []string
	IncludeTravelers   bool
	OnlyNonTravelers   bool
	ExcludeRegions     []string
	Status             string
	LeaseExpires       time.Time
	SignatureInfoIDs   []int64
	MaxRecordsOverride *int
}

ExportBatch holds what was used to generate an export.

func (*ExportBatch) EffectiveInputRegions

func (eb *ExportBatch) EffectiveInputRegions() []string

EffectiveInputRegions either returns `InputRegions` or if that array is empty, the output region (`Region`) is returned (in an array).

func (*ExportBatch) EffectiveMaxRecords added in v0.18.0

func (eb *ExportBatch) EffectiveMaxRecords(systemDefault int) int

EffectiveMaxRecords returns either the provided value or the override present in this config.

type ExportConfig

type ExportConfig struct {
	ConfigID           int64
	BucketName         string
	FilenameRoot       string
	Period             time.Duration
	OutputRegion       string
	InputRegions       []string
	ExcludeRegions     []string
	IncludeTravelers   bool
	OnlyNonTravelers   bool
	From               time.Time
	Thru               time.Time
	SignatureInfoIDs   []int64
	MaxRecordsOverride *int
}

ExportConfig describes what goes into an export, and how frequently. These are used to periodically generate an ExportBatch.

func (*ExportConfig) EffectiveInputRegions

func (ec *ExportConfig) EffectiveInputRegions() []string

EffectiveInputRegions either returns `InputRegions` or if that array is empty, the output region (`Region`) is returned (in an array).

func (*ExportConfig) ExcludeRegionsOnePerLine added in v0.12.0

func (ec *ExportConfig) ExcludeRegionsOnePerLine() string

func (*ExportConfig) InputRegionsOnePerLine

func (ec *ExportConfig) InputRegionsOnePerLine() string

func (*ExportConfig) Validate

func (ec *ExportConfig) Validate() error

type ExportFile

type ExportFile struct {
	BucketName       string
	Filename         string
	BatchID          int64
	OutputRegion     string
	InputRegions     []string
	IncludeTravelers bool
	OnlyNonTravelers bool
	ExcludeRegions   []string
	BatchNum         int
	BatchSize        int
	Status           string
}

func (*ExportFile) EffectiveInputRegions

func (ef *ExportFile) EffectiveInputRegions() []string

EffectiveInputRegions either returns `InputRegions` or if that array is empty, the output region (`Region`) is returned (in an array).

type SignatureInfo

type SignatureInfo struct {
	ID                int64
	SigningKey        string
	SigningKeyVersion string
	SigningKeyID      string
	EndTimestamp      time.Time
}

func (*SignatureInfo) FormattedEndTimestamp

func (s *SignatureInfo) FormattedEndTimestamp() string

FormattedEndTimestamp returns the end date for display in the admin console.

func (*SignatureInfo) HTMLEndDate

func (s *SignatureInfo) HTMLEndDate() string

HTMLEndDate returns EndDate in a format for the HTML date input default value.

func (*SignatureInfo) HTMLEndTime

func (s *SignatureInfo) HTMLEndTime() string

HTMLEndTime returns EndDate in a format for the HTML time input default value.

Jump to

Keyboard shortcuts

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