service

package
v0.0.0-...-54421ad Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2019 License: BSD-3-Clause Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddOrderRequest

type AddOrderRequest struct {
	User_id int `json:"user_id"`
	// 代替用户的token, userid+reqtime 的hash值
	Sign        string  `json:"sign"`
	Stock_code  string  `json:"stock_code"`
	Stock_name  string  `json:"stock_name"`
	Stock_count int     `json:"stock_count"`
	Stock_price float64 `json:"stock_price"`
	Trade_type  int     `json:"trade_type"`
	Req_time    string  `json:"req_time"`
	// 比赛id: 默认非比赛情况
	Contest_id int `json:"default:0"`
}

委托下单的 请求体

type AddOrderResponse

type AddOrderResponse struct {
	Err_msg  string `json:"err_msg"`
	Ret_code int    `json:"ret_code"`
}

委托下单的响应

type OrderService

type OrderService struct{}

rpc service

func (*OrderService) AddOrder

func (this *OrderService) AddOrder(req AddOrderRequest, resp *AddOrderResponse) error

委托下单

func (*OrderService) RevokeOrder

func (this *OrderService) RevokeOrder(req RevokeOrderRequest,
	resp *RevokeOrderResponse) error

type RevokeOrderRequest

type RevokeOrderRequest struct {
	User_id int `json:"user_id"`
	// 代替用户的token, userid+reqtime 的hash值
	Sign     string `json:"sign"`
	Order_id uint   `json:"order_id"`
	Req_time string `json:"req_time"`

	// 比赛id: 默认非比赛情况
	Contest_id int `json:"default:0"`
}

委托撤单的 请求体

type RevokeOrderResponse

type RevokeOrderResponse struct {
	Err_msg  string `json:"err_msg"`
	Ret_code int    `json:"ret_code"`
}

委托撤单的响应

Jump to

Keyboard shortcuts

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