Beispiel #1
0
func main() {
	var header response.Header
	var resp response.SaveResponse
	resp.Process.ProcessResponses = []response.ProcessResponse{
		response.ProcessResponse{
			"1", "PATH", "20,20",
		},
	}
	header.ServerIP = "10.2.25.0"
	content, _ := DecResp(&header, &resp)
	fmt.Println(string(content))
}
Beispiel #2
0
func transformHeader(r request.Header, resultcode string, resultmsg string) *response.Header {
	header := response.Header{}
	header.AssemblyVersion = r.AssemblyVersion
	header.Environment = "fws" //todo
	header.RequestBodySize = r.RequestBodySize
	header.RequestID = r.RequestID
	header.ResultCode = resultcode
	header.RouteStep = r.RouteStep
	header.SerializeMode = r.SerializeMode
	header.ServerIP = util.GetIP()
	header.ShouldRecordPerformanceTime = false //todo
	header.UserID = r.UserID
	header.ResultMsg = resultmsg
	//TODO
	return &header
}