data_engine

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataStatistics

type DataStatistics struct {
	DataCount        int    `json:"dataCount"`
	DataSuccessCount int    `json:"dataSuccessCount"`
	DataErrorCount   int    `json:"dataErrorCount"`
	UseTime          int64  `json:"useTime"`
	DataAverage      string `json:"dataAverage"`

	StartTime time.Time `json:"startTime,omitempty"`
	EndTime   time.Time `json:"endTime,omitempty"`
	// contains filtered or unexported fields
}

func (*DataStatistics) IncrDataErrorCount

func (this_ *DataStatistics) IncrDataErrorCount(num int, useTime int64)

func (*DataStatistics) IncrDataSuccessCount

func (this_ *DataStatistics) IncrDataSuccessCount(num int, useTime int64)

type ExcelSheet

type ExcelSheet struct {
	Name     int      `json:"name,omitempty"`
	SkipRow  int      `json:"skipRow,omitempty"`
	NameList []string `json:"nameList,omitempty"`
}

type ExcelTask

type ExcelTask struct {
	Path           string        `json:"path,omitempty"`
	SheetList      []*ExcelSheet `json:"sheetList,omitempty"`
	DataCount      int           `json:"dataCount"`
	ReadyDataCount int           `json:"readyDataCount"`
	IsEnd          bool          `json:"isEnd,omitempty"`
	StartTime      time.Time     `json:"startTime,omitempty"`
	EndTime        time.Time     `json:"endTime,omitempty"`
	Error          string        `json:"error,omitempty"`
	UseTime        int64         `json:"useTime"`
	IsStop         bool          `json:"isStop"`
	IsError        bool          `json:"isError"`
	OnData         func(data map[string]interface{}) (err error)
	OnError        func(err error)
	OnEnd          func()
}

func (*ExcelTask) Start

func (this_ *ExcelTask) Start()

func (*ExcelTask) Stop

func (this_ *ExcelTask) Stop()

type StrategyData

type StrategyData struct {
	DataNumber  int                  `json:"dataNumber,omitempty"`
	StartIndex  int                  `json:"startIndex,omitempty"`
	BatchNumber int                  `json:"batchNumber,omitempty"`
	IndexName   string               `json:"indexName,omitempty"`
	DataName    string               `json:"dataName,omitempty"`
	FieldList   []*StrategyDataField `json:"fieldList,omitempty"`
	*DataStatistics
}

func (*StrategyData) AddField

func (this_ *StrategyData) AddField(field *StrategyDataField)

type StrategyDataField

type StrategyDataField struct {
	Name        string               `json:"name,omitempty"`
	IndexName   string               `json:"indexName,omitempty"`
	DataName    string               `json:"dataName,omitempty"`
	Value       string               `json:"value,omitempty"`
	ReuseNumber int                  `json:"reuseNumber,omitempty"`
	ValueIsList bool                 `json:"valueIsList,omitempty"`
	ValueCount  int                  `json:"valueCount,omitempty"`
	FieldList   []*StrategyDataField `json:"fieldList,omitempty"`
	// contains filtered or unexported fields
}

type StrategyTask

type StrategyTask struct {
	*StrategyData
	ErrorContinue bool   `json:"errorContinue"`
	IsEnd         bool   `json:"isEnd,omitempty"`
	Error         string `json:"error,omitempty"`
	IsStop        bool   `json:"isStop"`
	IsError       bool   `json:"isError"`
	OnDataList    func(dataList []map[string]interface{}) (err error)
	OnError       func(err error)
	OnEnd         func()
}

func (*StrategyTask) Start

func (this_ *StrategyTask) Start()

func (*StrategyTask) Stop

func (this_ *StrategyTask) Stop()

type TextTask

type TextTask struct {
	Path           string    `json:"path,omitempty"`
	CellSeparator  string    `json:"cellSeparator,omitempty"`
	SkipRow        int       `json:"skipRow,omitempty"`
	NameList       []string  `json:"nameList,omitempty"`
	DataCount      int       `json:"dataCount"`
	ReadyDataCount int       `json:"readyDataCount"`
	IsEnd          bool      `json:"isEnd,omitempty"`
	StartTime      time.Time `json:"startTime,omitempty"`
	EndTime        time.Time `json:"endTime,omitempty"`
	Error          string    `json:"error,omitempty"`
	UseTime        int64     `json:"useTime"`
	IsStop         bool      `json:"isStop"`
	IsError        bool      `json:"isError"`
	OnData         func(data map[string]interface{}) (err error)
	OnError        func(err error)
	OnEnd          func()
}

func (*TextTask) Start

func (this_ *TextTask) Start()

func (*TextTask) Stop

func (this_ *TextTask) Stop()

Jump to

Keyboard shortcuts

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