tasks

package
Version: v0.0.0-...-45692f4 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2015 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImportTask

type ImportTask struct {
	Name      string
	JobIndex  int
	FileName  string
	AgencyKey string
	Headers   []string
	Lines     []byte
	Done      chan error
}

func NewImportTask

func NewImportTask(taskName string, jobIndex int, fileName, agencyKey string, headers []string, lines []byte, done chan error) ImportTask

func (ImportTask) ImportCsv

func (it ImportTask) ImportCsv(converter ModelConverter, importer ModelImporter)

type ModelConverter

type ModelConverter interface {
	ConvertModels(headers []string, records *models.Records) []interface{}
}

type ModelImporter

type ModelImporter interface {
	ImportModels(headers []string, models []interface{}) error
}

type Task

type Task interface {
	DoWork(workId int)
}

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL