From e6115260ef9bf7e2dd8d507d3b9e26a033a009d7 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Thu, 6 Feb 2020 15:51:22 +0100 Subject: [PATCH] eosapi/types.go: Adding Health and Service structs. --- eosapi/types.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/eosapi/types.go b/eosapi/types.go index 4b31dac..9d9acb5 100644 --- a/eosapi/types.go +++ b/eosapi/types.go @@ -1,7 +1,7 @@ package eosapi; -import "time"; +import "time" // get_info format (not all fields). type Info struct { @@ -9,3 +9,15 @@ type Info struct { HeadBlockNum int64 `json:"head_block_num"` HeadBlockTime time.Time `json:"head_block_time"` } + +type Service struct { + Name string `json:"service"` + Status string `json:"status"` + Data map[string]interface{} `json:"service_data"` + Time int64 `json:"time"` // unix timestamp. +} + +type Health struct { + VersionHash string `json:"version_hash"` + Health []Service `json:"health"` +}