Back to

Package corn

Latest Go to latest

The latest major version is .

Published: Nov 27, 2019 | Licenses: Apache-2.0 , Apache-2.0 | Module:





const (
	USERNAME = "sa"
	PASSWORD = "sqlserver_7F"
	NETWORK  = "tcp"
	SERVER   = ""
	PORT     = 1433
	DATABASE = "plemis2.0_test"
	DRIVER   = "sqlserver"


var CornFUncMap cornFuncMap = cornFuncMap{}
var Cron *cron.Cron = cron.New()

func AddFunc

func AddFunc(c CornJob)

func AddFuncMap

func AddFuncMap(k string, i CornFunc)

func GetNoB2BOrderID

func GetNoB2BOrderID(db *sql.DB) (*[]Result, error)

func Register

func Register()

type CornFunc

type CornFunc interface {
	// Spec() string
	Before() error
	Run() error
	After() error

type CornJob

type CornJob struct {
	JobName string
	JobSpec string

type NoB2BOrderID

type NoB2BOrderID struct {

func (NoB2BOrderID) Run

func (NoB2BOrderID) Run() (key string, value []byte, err error)

type Result

type Result struct {
	ProductName  string         `json:"productName"`
	BrandName    string         `json:"brandName"`
	OrgName      string         `json:"orgName"`
	TradeOrderId string         `json:"tradeOrderId"`
	OrderDate    string         `json:"orderDate"`
	Remark       string         `json:"remark"`
	B2bOrderId   sql.NullString `json:"b2bOrderId"`
	PurchaseQty  float32        `json:"purchaseQty"`

Package Files

  • corn.go
  • func_job.go
Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier