orm

package
v4.8.11+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2020 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	ID                       uint16 `gorm:"primary_key"`
	Alias                    string
	Xpub                     string
	PublicKey                string
	IP                       string
	Port                     uint16
	BestHeight               uint64
	AvgRttMS                 sql.NullInt64
	LatestDailyUptimeMinutes uint64
	Status                   uint8
	CreatedAt                time.Time
	UpdatedAt                time.Time
}

func (*Node) MarshalJSON

func (n *Node) MarshalJSON() ([]byte, error)

type NodeLiveness

type NodeLiveness struct {
	ID         uint64 `gorm:"primary_key"`
	NodeID     uint16
	PingTimes  uint64
	PongTimes  uint64
	BestHeight uint64
	CreatedAt  time.Time
	UpdatedAt  time.Time

	Node *Node `gorm:"foreignkey:NodeID"`
}

Jump to

Keyboard shortcuts

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