github.com/braveheart12/insolar-09-08-19@v0.8.7/api/requester/responses.go (about) 1 /* 2 * Copyright 2019 Insolar Technologies 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package requester 18 19 type rpcResponse struct { 20 RPCVersion string `json:"jsonrpc"` 21 Error map[string]interface{} `json:"error"` 22 } 23 24 type seedResponse struct { 25 Seed []byte `json:"Seed"` 26 TraceID string `json:"TraceID"` 27 } 28 type rpcSeedResponse struct { 29 rpcResponse 30 Result seedResponse `json:"result"` 31 } 32 33 // StatusResponse represents response from rpc on status.Get method 34 type StatusResponse struct { 35 NetworkState string `json:"NetworkState"` 36 } 37 38 type rpcStatusResponse struct { 39 rpcResponse 40 Result StatusResponse `json:"result"` 41 } 42 43 // InfoResponse represents response from rpc on info.Get method 44 type InfoResponse struct { 45 RootDomain string `json:"RootDomain"` 46 RootMember string `json:"RootMember"` 47 NodeDomain string `json:"NodeDomain"` 48 TraceID string `json:"TraceID"` 49 } 50 51 type rpcInfoResponse struct { 52 rpcResponse 53 Result InfoResponse `json:"result"` 54 }