models

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const MaxRoutingEvents = 512 // 8K monitor @ 8px per line = 540

Variables

This section is empty.

Functions

func BoolSort added in v0.2.0

func BoolSort(a, b bool, o Order) bool

func DateSort added in v0.1.0

func DateSort(a, b *time.Time, o Order) bool

func Float64Sort added in v0.4.0

func Float64Sort(a, b float64, o Order) bool

func Int32Sort added in v0.1.0

func Int32Sort(a, b int32, o Order) bool

func Int64Sort added in v0.1.0

func Int64Sort(a, b int64, o Order) bool

func IntSort added in v0.1.0

func IntSort(a, b int, o Order) bool

func StringSort added in v0.2.0

func StringSort(a, b string, o Order) bool

func UInt32Sort added in v0.4.0

func UInt32Sort(a, b uint32, o Order) bool

func UInt64Sort added in v0.2.0

func UInt64Sort(a, b uint64, o Order) bool

Types

type Channels

type Channels struct {
	CurrentNode *models.Node
	// contains filtered or unexported fields
}

func NewChannels

func NewChannels() *Channels

func (*Channels) Add

func (c *Channels) Add(channel *models.Channel)

func (*Channels) Contains

func (c *Channels) Contains(channel *models.Channel) bool

func (*Channels) Current added in v0.1.0

func (c *Channels) Current() *models.Channel

func (*Channels) Get

func (c *Channels) Get(index int) *models.Channel

func (*Channels) GetByChanPoint

func (c *Channels) GetByChanPoint(chanPoint string) *models.Channel

func (*Channels) Len added in v0.0.2

func (c *Channels) Len() int

func (*Channels) Less added in v0.1.0

func (c *Channels) Less(i, j int) bool

func (*Channels) List

func (c *Channels) List() []*models.Channel

func (*Channels) SetCurrent added in v0.1.0

func (c *Channels) SetCurrent(index int)

func (*Channels) Sort added in v0.1.0

func (c *Channels) Sort(s ChannelsSort)

func (*Channels) Swap added in v0.1.0

func (c *Channels) Swap(i, j int)

func (*Channels) Update

func (c *Channels) Update(newChannel *models.Channel)

type ChannelsBalance

type ChannelsBalance struct {
	*models.ChannelsBalance
}

type ChannelsSort added in v0.1.0

type ChannelsSort func(*models.Channel, *models.Channel) bool

type FwdingHist added in v0.4.0

type FwdingHist struct {
	StartTime    string
	MaxNumEvents uint32
	// contains filtered or unexported fields
}

func (*FwdingHist) Clear added in v0.4.0

func (t *FwdingHist) Clear()

func (*FwdingHist) Current added in v0.4.0

func (t *FwdingHist) Current() *models.ForwardingEvent

func (*FwdingHist) Get added in v0.4.0

func (t *FwdingHist) Get(index int) *models.ForwardingEvent

func (*FwdingHist) Len added in v0.4.0

func (t *FwdingHist) Len() int

func (*FwdingHist) Less added in v0.4.0

func (t *FwdingHist) Less(i, j int) bool

func (*FwdingHist) List added in v0.4.0

func (t *FwdingHist) List() []*models.ForwardingEvent

func (*FwdingHist) SetCurrent added in v0.4.0

func (t *FwdingHist) SetCurrent(index int)

func (*FwdingHist) Sort added in v0.4.0

func (t *FwdingHist) Sort(s FwdinghistSort)

func (*FwdingHist) Swap added in v0.4.0

func (t *FwdingHist) Swap(i, j int)

func (*FwdingHist) Update added in v0.4.0

func (t *FwdingHist) Update(events []*models.ForwardingEvent)

type FwdinghistSort added in v0.4.0

type FwdinghistSort func(*models.ForwardingEvent, *models.ForwardingEvent) bool

type Info

type Info struct {
	*models.Info
}

type Models

type Models struct {
	Info            *Info
	Channels        *Channels
	WalletBalance   *WalletBalance
	ChannelsBalance *ChannelsBalance
	Transactions    *Transactions
	RoutingLog      *RoutingLog
	FwdingHist      *FwdingHist
	// contains filtered or unexported fields
}

func New

func New(app *app.App) *Models

func (*Models) RefreshChannels

func (m *Models) RefreshChannels(ctx context.Context) error

func (*Models) RefreshChannelsBalance

func (m *Models) RefreshChannelsBalance(ctx context.Context) error

func (*Models) RefreshCurrentNode added in v0.4.0

func (m *Models) RefreshCurrentNode(ctx context.Context) (err error)

func (*Models) RefreshForwardingHistory added in v0.4.0

func (m *Models) RefreshForwardingHistory(ctx context.Context) error

func (*Models) RefreshInfo

func (m *Models) RefreshInfo(ctx context.Context) error

func (*Models) RefreshPolicies added in v0.4.0

func (m *Models) RefreshPolicies(update interface{}) func(context.Context) error

func (*Models) RefreshRouting added in v0.2.0

func (m *Models) RefreshRouting(update interface{}) func(context.Context) error

func (*Models) RefreshTransactions added in v0.1.0

func (m *Models) RefreshTransactions(ctx context.Context) error

func (*Models) RefreshWalletBalance

func (m *Models) RefreshWalletBalance(ctx context.Context) error

type Order added in v0.1.0

type Order int
const (
	Asc Order = iota
	Desc
)

type RoutingLog added in v0.2.0

type RoutingLog struct {
	Log []*models.RoutingEvent
}

type Transactions added in v0.1.0

type Transactions struct {
	// contains filtered or unexported fields
}

func (*Transactions) Add added in v0.1.0

func (t *Transactions) Add(tx *models.Transaction)

func (*Transactions) Contains added in v0.1.0

func (t *Transactions) Contains(tx *models.Transaction) bool

func (*Transactions) Current added in v0.1.0

func (t *Transactions) Current() *models.Transaction

func (*Transactions) Get added in v0.1.0

func (t *Transactions) Get(index int) *models.Transaction

func (*Transactions) Len added in v0.1.0

func (t *Transactions) Len() int

func (*Transactions) Less added in v0.1.0

func (t *Transactions) Less(i, j int) bool

func (*Transactions) List added in v0.1.0

func (t *Transactions) List() []*models.Transaction

func (*Transactions) SetCurrent added in v0.1.0

func (t *Transactions) SetCurrent(index int)

func (*Transactions) Sort added in v0.1.0

func (t *Transactions) Sort(s TransactionsSort)

func (*Transactions) Swap added in v0.1.0

func (t *Transactions) Swap(i, j int)

func (*Transactions) Update added in v0.1.0

func (t *Transactions) Update(tx *models.Transaction)

type TransactionsSort added in v0.1.0

type TransactionsSort func(*models.Transaction, *models.Transaction) bool

type WalletBalance

type WalletBalance struct {
	*models.WalletBalance
}

Jump to

Keyboard shortcuts

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