Documentation ¶
Index ¶
- func Deserialize(bytes []byte, or *Order) error
- type Contract
- func (c *Contract) Confirm(ctx TransactionContextInterface, orderID int64, time string) (*Order, error)
- func (c *Contract) Dispatch(ctx TransactionContextInterface, orderID int64, time string) (*Order, error)
- func (c *Contract) GetHistory(ctx TransactionContextInterface, orderID int64) ([]byte, error)
- func (c *Contract) GetOrder(ctx TransactionContextInterface, orderID int64) (*Order, error)
- func (c *Contract) Instantiate()
- func (c *Contract) Launch(ctx TransactionContextInterface, orderID, price int64, time string) (*Order, error)
- func (c *Contract) Pay(ctx TransactionContextInterface, orderID int64, time string) (*Order, error)
- type ListInterface
- type Order
- type OrderList
- type State
- type TransactionContext
- type TransactionContextInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Deserialize ¶
Types ¶
type Contract ¶
type Contract struct {
*contractapi.Contract
}
func (*Contract) GetHistory ¶
func (c *Contract) GetHistory(ctx TransactionContextInterface, orderID int64) ([]byte, error)
func (*Contract) GetOrder ¶
func (c *Contract) GetOrder(ctx TransactionContextInterface, orderID int64) (*Order, error)
func (*Contract) Instantiate ¶
func (c *Contract) Instantiate()
type ListInterface ¶
type ListInterface interface { ledgerapi.StateListInterface }
type Order ¶
type Order struct { OrderID int64 `json:"orderID"` Price int64 `json:"price"` LaunchTime string `json:"launchTime"` PayTime string `json:"payTime"` DispatchTime string `json:"dispatchTime"` ConfirmTime string `json:"confirmTime"` // contains filtered or unexported fields }
func (*Order) GetSplitKey ¶
func (Order) MarshalJSON ¶
func (*Order) UnmarshalJSON ¶
type OrderList ¶
type OrderList struct {
// contains filtered or unexported fields
}
func (*OrderList) UpdateState ¶
type TransactionContext ¶
type TransactionContext struct { contractapi.TransactionContext // contains filtered or unexported fields }
func (*TransactionContext) GetOrderList ¶
func (tc *TransactionContext) GetOrderList() *OrderList
type TransactionContextInterface ¶
type TransactionContextInterface interface { contractapi.TransactionContextInterface GetOrderList() *OrderList }
Click to show internal directories.
Click to hide internal directories.