sync

package
v0.0.0-...-035b4ae Latest Latest
Warning

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

Go to latest
Published: May 9, 2020 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const SHOWAPI_FETCH_META_TOKEN = "meta."

Variables

This section is empty.

Functions

This section is empty.

Types

type ProfileRunInfo

type ProfileRunInfo struct {
	RunCount     int
	LastRunTime  int64
	LastEndTime  int64
	LastRunError error
}

type ProfileWork

type ProfileWork struct {
	Id          interface{}
	Dao         qdao.D
	ProfileName string
	Profile     map[string]interface{}
	StartTime   int64
	EndTime     int64
	Force       bool
	Factor      float64
	Context     *Syncer
	GCmd        *global.Cmd
	Args        map[string]interface{}
	Mapper      SyncerMapperFunc
}

func (*ProfileWork) GetDao

func (o *ProfileWork) GetDao() (dao qdao.D, err error)

type Syncer

type Syncer struct {
	Name string
	// contains filtered or unexported fields
}

func (*Syncer) DoProfile

func (o *Syncer) DoProfile(work *ProfileWork) (data []interface{}, err error)

func (*Syncer) DoProfileRecover

func (o *Syncer) DoProfileRecover(work *ProfileWork)

func (*Syncer) DoProfileWithRecord

func (o *Syncer) DoProfileWithRecord(work *ProfileWork) (ferr error)

func (*Syncer) GetMetaToken

func (o *Syncer) GetMetaToken(profilename string) string

func (*Syncer) GetProfile

func (o *Syncer) GetProfile(name string) map[string]interface{}

func (*Syncer) GetProfileRunInfo

func (o *Syncer) GetProfileRunInfo(profilename string) *ProfileRunInfo

func (*Syncer) HandleCmd

func (o *Syncer) HandleCmd(cmd *global.Cmd) (*global.Cmd, bool, error)

func (*Syncer) Lua_handler

func (o *Syncer) Lua_handler(phrase string, work *ProfileWork) (interface{}, error)

func (Syncer) Lua_request

func (o Syncer) Lua_request(
	work *ProfileWork,
	fields []string,
	requestargs map[string]interface{}) (ret []interface{}, err error)

func (*Syncer) Netease_khistory

func (o *Syncer) Netease_khistory(phrase string, work *ProfileWork) (interface{}, error)

func (Syncer) Netease_request

func (o Syncer) Netease_request(
	work *ProfileWork,
	fields []string,
	requestargs map[string]interface{}) (data []interface{}, ids []interface{}, err error)

func (*Syncer) Netease_snapshot

func (o *Syncer) Netease_snapshot(
	phrase string, work *ProfileWork) (err error)

func (*Syncer) PersistAndCache

func (o *Syncer) PersistAndCache(
	work *ProfileWork,
	data []interface{}) (rdata []interface{}, ids []interface{}, err error)

func (*Syncer) Run

func (o *Syncer) Run(name string)

func (Syncer) ShenJian_request

func (o Syncer) ShenJian_request(
	work *ProfileWork,
	fields []string,
	requestargs map[string]interface{}) (data []interface{}, ids []interface{}, err error)

func (*Syncer) ShenJian_snapshot

func (o *Syncer) ShenJian_snapshot(
	phrase string, work *ProfileWork) (err error)

func (*Syncer) ShowAPI_khistory

func (o *Syncer) ShowAPI_khistory(phrase string, work *ProfileWork) (err error)

func (*Syncer) ShowAPI_request

func (o *Syncer) ShowAPI_request(
	work *ProfileWork,
	requestargs map[string]interface{}) (interface{}, error)

func (*Syncer) ShowAPI_snapshot

func (o *Syncer) ShowAPI_snapshot(
	phrase string, work *ProfileWork) (err error)

func (*Syncer) Terminate

func (o *Syncer) Terminate() error

func (*Syncer) TuShare_khistory

func (o *Syncer) TuShare_khistory(phrase string, work *ProfileWork) (interface{}, error)

func (Syncer) TuShare_request

func (o Syncer) TuShare_request(
	work *ProfileWork,
	fields []string,
	requestargs map[string]interface{}) (ret []interface{}, err error)

func (*Syncer) TuShare_stock_group

func (o *Syncer) TuShare_stock_group(phrase string, work *ProfileWork) (interface{}, error)

func (*Syncer) TuShare_trade_calendar

func (o *Syncer) TuShare_trade_calendar(phrase string, work *ProfileWork) (interface{}, error)

type SyncerMapperFunc

type SyncerMapperFunc func(data interface{}) interface{}

Directories

Path Synopsis
showSdk
httplib
Package httplib is used as http.Client Usage:
Package httplib is used as http.Client Usage:

Jump to

Keyboard shortcuts

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