nodes

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddNodeWhenNew

func AddNodeWhenNew(db *sqlx.DB, node Node) (int, error)

func RegisterNodeRoutes

func RegisterNodeRoutes(r *gin.RouterGroup, db *sqlx.DB)

Types

type ConnectNodeRequest

type ConnectNodeRequest struct {
	NodeId     int        `json:"nodeId"`
	LndAddress LndAddress `json:"lndAddress"`
	Perm       *bool      `json:"perm"`
	TimeOut    *uint64    `json:"timeOut"`
}

type LndAddress

type LndAddress struct {
	PubKey string `json:"pubKey"`
	Host   string `json:"host"`
}

type Node

type Node struct {
	NodeId    int             `json:"nodeId" db:"node_id"`
	PublicKey string          `json:"publicKey" db:"public_key"`
	Chain     commons.Chain   `json:"chain" db:"chain"`
	Network   commons.Network `json:"network" db:"network"`
	CreatedOn time.Time       `json:"createdOn" db:"created_on"`
}

func GetNodeById

func GetNodeById(db *sqlx.DB, nodeId int) (Node, error)

func GetNodeByPublicKey

func GetNodeByPublicKey(db *sqlx.DB, publicKey string) (Node, error)

type NodeEvent

type NodeEvent struct {
	EventTime     time.Time `json:"eventTime" db:"timestamp"`
	PublicKey     string    `json:"publicKey" db:"pub_key"`
	Alias         string    `json:"alias" db:"alias"`
	Color         string    `json:"color" db:"color"`
	NodeAddresses string    `json:"nodeAddresses" db:"node_addresses"`
	Features      string    `json:"features" db:"features"`
}

type NodeInformation

type NodeInformation struct {
	NodeId    int    `json:"nodeId"`
	PublicKey string `json:"publicKey"`
	Alias     string `json:"alias"`
	Color     string `json:"color"`
}

Jump to

Keyboard shortcuts

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