actors

package
v1.4.5-alpha1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2019 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConstErrorModule = "vantagepoint"
	ConstErrorLevel  = env.ConstErrorLevelActor
)

Variables

This section is empty.

Functions

func NewInventoryCSV

func NewInventoryCSV(env EnvInterface) (*inventoryCSV, error)

func NewUploadsProcessor

func NewUploadsProcessor(env EnvInterface, storage StorageInterface, fileName FileNameInterface, dataProcessor DataProcessorInterface) (uploadsProcessor, error)

Types

type DataProcessorInterface

type DataProcessorInterface interface {
	Process(reader io.Reader) error
}

type Disk

type Disk struct {
	// contains filtered or unexported fields
}

func NewDiskStorage

func NewDiskStorage(path string, env EnvInterface) (*Disk, error)

func (*Disk) Archive

func (it *Disk) Archive(fileName string) error

func (*Disk) GetReadCloser

func (it *Disk) GetReadCloser(fileName string) (io.ReadCloser, error)

func (*Disk) ListFiles

func (it *Disk) ListFiles() ([]string, error)

type EnvInterface

type EnvInterface interface {
	ErrorDispatch(err error) error
	ErrorNew(module string, level int, code string, message string) error

	LogError(message string)
	LogWarn(message string)
	LogInfo(message string)
	LogDebug(message string)
}

type FileNameInterface

type FileNameInterface interface {
	Valid(fileName string) (bool, error)
	GetSortValue(fileName string) (string, error)
}

type FileNamesSorter

type FileNamesSorter struct {
	Items    []string
	FileName FileNameInterface

	Err error
}

func (*FileNamesSorter) Len

func (fn *FileNamesSorter) Len() int

func (*FileNamesSorter) Less

func (fn *FileNamesSorter) Less(i, j int) bool

func (*FileNamesSorter) Swap

func (fn *FileNamesSorter) Swap(i, j int)

type StorageInterface

type StorageInterface interface {
	ListFiles() ([]string, error)
	Archive(fileName string) error
	GetReadCloser(fileName string) (io.ReadCloser, error)
}

Jump to

Keyboard shortcuts

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