models

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const WhitelistBucket = "whitelist_bucket"

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

type Metrics struct {
	NodeId                string `storm:"id"`
	PeerCount             int32
	BestBlockHeight       int64
	FinalizedBlockHeight  int64
	ReadyTransactionCount int32
}

type MetricsRepository

type MetricsRepository interface {
	FindByID(ID string) (*Metrics, error)
	Save(metrics *Metrics) error
	GetAll() (*[]Metrics, error)
}

type Node

type Node struct {
	ID            string `storm:"id"`
	ConfigHash    string
	NodeUrl       string
	PayoutAddress string
	Token         string
}

type NodeRepository

type NodeRepository interface {
	FindByID(ID string) (*Node, error)
	Save(node *Node) error
	GetAll() (*[]Node, error)
	IsNodeWhitelisted(ID string) (bool, error)
}

type Ping

type Ping struct {
	NodeId    string `storm:"id"`
	Timestamp time.Time
}

type PingRepository

type PingRepository interface {
	FindByNodeID(nodeId string) (*Ping, error)
	Save(ping *Ping) error
	GetAll() (*[]Ping, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL