1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-api-healthcheck synced 2026-06-18 05:00:03 +02:00

eosapi/types.go: Adding Health and Service structs.

This commit is contained in:
Henrik Hautakoski 2020-02-06 15:51:22 +01:00
parent 2e6ebe28c0
commit e6115260ef

View file

@ -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"`
}