-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathnoKibana.go
More file actions
53 lines (45 loc) · 2.66 KB
/
noKibana.go
File metadata and controls
53 lines (45 loc) · 2.66 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
package templatesAndPolicies
import (
"bytes"
indexer "github.com/multiversx/mx-chain-es-indexer-go/process/dataindexer"
"github.com/multiversx/mx-chain-es-indexer-go/templates"
"github.com/multiversx/mx-chain-es-indexer-go/templates/noKibana"
)
type templatesAndPolicyReaderNoKibana struct{}
// NewTemplatesAndPolicyReaderNoKibana will create a new instance of templatesAndPolicyReaderNoKibana
func NewTemplatesAndPolicyReaderNoKibana() *templatesAndPolicyReaderNoKibana {
return new(templatesAndPolicyReaderNoKibana)
}
// GetElasticTemplatesAndPolicies will return templates and policies
func (tr *templatesAndPolicyReaderNoKibana) GetElasticTemplatesAndPolicies() (map[string]*bytes.Buffer, map[string]*bytes.Buffer, error) {
indexPolicies := make(map[string]*bytes.Buffer)
indexTemplates := make(map[string]*bytes.Buffer)
indexTemplates["opendistro"] = noKibana.OpenDistro.ToBuffer()
indexTemplates[indexer.TransactionsIndex] = noKibana.Transactions.ToBuffer()
indexTemplates[indexer.BlockIndex] = noKibana.Blocks.ToBuffer()
indexTemplates[indexer.MiniblocksIndex] = noKibana.Miniblocks.ToBuffer()
indexTemplates[indexer.RatingIndex] = noKibana.Rating.ToBuffer()
indexTemplates[indexer.RoundsIndex] = noKibana.Rounds.ToBuffer()
indexTemplates[indexer.ValidatorsIndex] = noKibana.Validators.ToBuffer()
indexTemplates[indexer.AccountsIndex] = noKibana.Accounts.ToBuffer()
indexTemplates[indexer.AccountsHistoryIndex] = noKibana.AccountsHistory.ToBuffer()
indexTemplates[indexer.AccountsESDTIndex] = noKibana.AccountsESDT.ToBuffer()
indexTemplates[indexer.AccountsESDTHistoryIndex] = noKibana.AccountsESDTHistory.ToBuffer()
indexTemplates[indexer.EpochInfoIndex] = noKibana.EpochInfo.ToBuffer()
indexTemplates[indexer.ReceiptsIndex] = noKibana.Receipts.ToBuffer()
indexTemplates[indexer.ScResultsIndex] = noKibana.SCResults.ToBuffer()
indexTemplates[indexer.SCDeploysIndex] = noKibana.SCDeploys.ToBuffer()
indexTemplates[indexer.TokensIndex] = noKibana.Tokens.ToBuffer()
indexTemplates[indexer.TagsIndex] = noKibana.Tags.ToBuffer()
indexTemplates[indexer.LogsIndex] = noKibana.Logs.ToBuffer()
indexTemplates[indexer.DelegatorsIndex] = noKibana.Delegators.ToBuffer()
indexTemplates[indexer.OperationsIndex] = noKibana.Operations.ToBuffer()
indexTemplates[indexer.ESDTsIndex] = noKibana.ESDTs.ToBuffer()
indexTemplates[indexer.ValuesIndex] = noKibana.Values.ToBuffer()
indexTemplates[indexer.EventsIndex] = noKibana.Events.ToBuffer()
return indexTemplates, indexPolicies, nil
}
// GetExtraMappings will return an array of indices extra mappings
func (tr *templatesAndPolicyReaderNoKibana) GetExtraMappings() ([]templates.ExtraMapping, error) {
return []templates.ExtraMapping{}, nil
}