output

package
v0.0.0-...-be0592b Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomOutputer

type CustomOutputer interface {
	// AddOutputer add a new outputer instance
	AddOutputer(target Outputer) OutputerKey

	// RemoveOutputer delete the outputer instace by the outputer key
	RemoveOutputer(key OutputerKey)

	// FetchOutputer find and return the puter by the outputer key
	FetchOutputer(key OutputerKey) Puter

	// CreateCustomOutputer create a new custom outputer
	CreateCustomOutputer(name string, run func(data types.MapStr) error) (OutputerKey, Puter)
}

CustomOutputer the interface which used to maintence the custom outputer

type Manager

type Manager interface {
	// Model interface
	ModelOutputer

	// Custom outputer
	CustomOutputer

	// InstOperation operation
	InstOperation() inst.OperationInterface
}

Manager is the interface that must be implemented by every output manager.

func New

func New() Manager

New create a new Manager instance

type MapOutputer

type MapOutputer map[OutputerKey]Outputer

MapOutputer the outputer storage

type ModelOutputer

type ModelOutputer interface {

	// GetModel return the model
	GetModel(supplierAccount, classificationID, objID string) (model.Model, error)

	// CreateClassification create a new classification
	CreateClassification(name string) model.Classification

	// FindClassificationsLikeName find a array of the classification by the name
	FindClassificationsLikeName(supplierAccount, name string) (model.ClassificationIterator, error)

	// FindClassificationsByCondition find a array of the classification by the condition
	FindClassificationsByCondition(supplierAccount string, cond common.Condition) (model.ClassificationIterator, error)
}

ModelOutputer the interface which used to maintence the model

type Outputer

type Outputer interface {

	// Name the Inputer description.
	// This information will be printed when the Inputer is abnormal, which is convenient for debugging.
	Name() string

	// Run the output main loop. This should block until be signalled to stop by invocation of the Stop() method.
	Put(data types.MapStr) error

	// Stop is the invoked to signal that the Run() method should its execution.
	// It will be invoked at most once.
	Stop() error
}

Outputer is the interface that must be implemented by every Outputer.

type OutputerKey

type OutputerKey string

OutputerKey the output name

type Puter

type Puter interface {
	// save into the storage
	Put(data types.MapStr) error
}

Puter send the data input

Directories

Path Synopsis
module

Jump to

Keyboard shortcuts

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