operation

package
v0.0.0-...-58d3d42 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2018 License: MIT Imports: 3 Imported by: 39

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Operation

type Operation struct {
	*client.Client
}

func New

func New(c *client.Client) *Operation

func (*Operation) Cancel

func (self *Operation) Cancel(id int64) (bool, error)

Cancel an operation

func (*Operation) Count

func (self *Operation) Count() (int64, error)

Count operations created by this contact

func (*Operation) Info

func (self *Operation) Info(id int64) (*OperationInfo, error)

Get operation information

func (*Operation) List

func (self *Operation) List() ([]*OperationInfo, error)

List operations created by this contact

type OperationDetails

type OperationDetails struct {
	Id            string
	Label         string
	ProductAction string
	ProductName   string
	ProductType   string
	Quantity      int64
}

func ToOperationDetails

func ToOperationDetails(res map[string]interface{}) *OperationDetails

type OperationInfo

type OperationInfo struct {
	DateCreated      time.Time
	DateStart        time.Time
	DateUpdated      time.Time
	Eta              string
	Id               int64
	LastError        string
	SessionId        int64
	Source           string
	Step             string
	Type             string
	Params           map[string]interface{}
	OperationDetails *OperationDetails
}

func ToOperationInfo

func ToOperationInfo(res map[string]interface{}) *OperationInfo

Jump to

Keyboard shortcuts

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