export

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConceptWriter

type ConceptWriter struct {
	Buffer *bytes.Buffer
	Writer *csv.Writer
}

type CsvExporter

type CsvExporter struct {
	Writer map[string]*ConceptWriter
}

func NewCsvExporter

func NewCsvExporter() *CsvExporter

func (*CsvExporter) GetBytes

func (e *CsvExporter) GetBytes(conceptType string) []byte

func (*CsvExporter) GetFileName

func (e *CsvExporter) GetFileName(conceptType string) string

func (*CsvExporter) Prepare

func (e *CsvExporter) Prepare(conceptTypes []string) error

func (*CsvExporter) Write

func (e *CsvExporter) Write(c db.Concept, conceptType, tid string) error

type FullExporter added in v1.2.5

type FullExporter struct {
	sync.RWMutex

	NrOfConcurrentWorkers int
	Updater               concept.Updater
	Inquirer              concept.Inquirer
	Exporter              *CsvExporter
	Log                   *logger.UPPLogger
	// contains filtered or unexported fields
}

func NewFullExporter

func NewFullExporter(nrOfWorkers int, exporter concept.Updater, inquirer concept.Inquirer, csvExporter *CsvExporter, log *logger.UPPLogger) *FullExporter

func (*FullExporter) CreateJob added in v1.2.5

func (fe *FullExporter) CreateJob(candidates []string, errMsg string) Job

func (*FullExporter) GetCurrentJob added in v1.2.5

func (fe *FullExporter) GetCurrentJob() Job

func (*FullExporter) IsRunningJob added in v1.2.5

func (fe *FullExporter) IsRunningJob() bool

func (*FullExporter) RunFullExport added in v1.2.5

func (fe *FullExporter) RunFullExport(tid string)

type Job

type Job struct {
	sync.RWMutex
	NrWorker     int               `json:"-"`
	Workers      []*concept.Worker `json:"ConceptWorkers,omitempty"`
	ID           string            `json:"ID"`
	Concepts     []string          `json:"Concepts,omitempty"`
	Progress     []string          `json:"Progress,omitempty"`
	Failed       []string          `json:"Failed,omitempty"`
	Status       concept.State     `json:"Status"`
	ErrorMessage string            `json:"ErrorMessage,omitempty"`
}

Jump to

Keyboard shortcuts

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