-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathdata.go
More file actions
55 lines (47 loc) · 1.51 KB
/
data.go
File metadata and controls
55 lines (47 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package data
import (
"encoding/json"
)
// ValidatorsPublicKeys is a structure containing fields for validators public keys
type ValidatorsPublicKeys struct {
PublicKeys []string `json:"publicKeys"`
}
// Response is a structure that holds response from Kibana
type Response struct {
Error interface{} `json:"error,omitempty"`
Status int `json:"status"`
}
// ValidatorRatingInfo is a structure containing validator rating information
type ValidatorRatingInfo struct {
PublicKey string `json:"-"`
Rating float32 `json:"rating"`
}
// RoundInfo is a structure containing block signers and shard id
type RoundInfo struct {
Round uint64 `json:"round"`
SignersIndexes []uint64 `json:"signersIndexes"`
BlockWasProposed bool `json:"blockWasProposed"`
ShardId uint32 `json:"shardId"`
Epoch uint32 `json:"epoch"`
Timestamp uint64 `json:"timestamp"`
TimestampMs uint64 `json:"timestampMs,omitempty"`
}
// EpochInfo holds the information about epoch
type EpochInfo struct {
AccumulatedFees string `json:"accumulatedFees"`
DeveloperFees string `json:"developerFees"`
}
// ResponseScroll defines the generic structure for an Elasticsearch scroll request
type ResponseScroll struct {
Hits struct {
Hits []struct {
ID string `json:"_id"`
Source json.RawMessage `json:"_source"`
} `json:"hits"`
} `json:"hits"`
}
// KeyValueObj is the dto for values index
type KeyValueObj struct {
Key string `json:"key"`
Value string `json:"value"`
}