mirror of
https://github.com/edouardparis/lntop
synced 2024-11-17 21:26:12 +00:00
f72c5ca099
* config: add Views * refac views channels * fix config default * views: menu * config default: add comment * fix config default * README: enhance config section * fix README * controller: F2 Menu * views: transactions * fix views: set current in layout * fix menu * ft transactions * fix Help * fix controller Menu * view: transaction * refac controller * fix ui controller * try some bold * fix cursor * refac color * focus column transactions * controller: add keyBinding Menu m * help view: add menu * fix cursor: push to the right * refac remove current model * ui: txs and channels sortable * fix focus column * view transaction: transaction dest addresses * fix menu * refac controller * channels: sort * rename current column * refac cursor * refac currentColumnIndex * set cursor if view deleted * remove previous * clean view.View * controller: ToggleView * fix menu * view txs: add config * feat order * fix channels sort * feat transactions sort * feat help: add asc/desc * fix README * color: magenta * fix color * fix views menu * fix views help * network backend: SubscribeTransactions * pubsub: transactions * controller.Listen: refresh transactions * fix controller * fix controller pubsub: no need for wallet ticker * fix models transactions * views channels: column SENT and RECEIVED * update version * fix README * fix README * fix models sort * fix readme and default config * fix readme
43 lines
1.1 KiB
Go
43 lines
1.1 KiB
Go
package backend
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/edouardparis/lntop/network/models"
|
|
"github.com/edouardparis/lntop/network/options"
|
|
)
|
|
|
|
type Backend interface {
|
|
Ping() error
|
|
|
|
SubscribeInvoice(context.Context, chan *models.Invoice) error
|
|
|
|
SubscribeChannels(context.Context, chan *models.ChannelUpdate) error
|
|
|
|
NodeName() string
|
|
|
|
Info(context.Context) (*models.Info, error)
|
|
|
|
GetNode(context.Context, string) (*models.Node, error)
|
|
|
|
GetWalletBalance(context.Context) (*models.WalletBalance, error)
|
|
|
|
GetChannelsBalance(context.Context) (*models.ChannelsBalance, error)
|
|
|
|
ListChannels(context.Context, ...options.Channel) ([]*models.Channel, error)
|
|
|
|
GetChannelInfo(context.Context, *models.Channel) error
|
|
|
|
CreateInvoice(context.Context, int64, string) (*models.Invoice, error)
|
|
|
|
GetInvoice(context.Context, string) (*models.Invoice, error)
|
|
|
|
DecodePayReq(context.Context, string) (*models.PayReq, error)
|
|
|
|
SendPayment(context.Context, *models.PayReq) (*models.Payment, error)
|
|
|
|
GetTransactions(context.Context) ([]*models.Transaction, error)
|
|
|
|
SubscribeTransactions(context.Context, chan *models.Transaction) error
|
|
}
|