Documentation ¶
Index ¶
- Constants
- func GetFirstDay(monthsAgo int) time.Time
- func GetForwardsChannel(ctx context.Context, lightning api.NewAPICall, from time.Time) <-chan api.RawMessage
- func GetInvoicesChannel(ctx context.Context, lightning api.NewAPICall, from time.Time) <-chan api.RawMessage
- func GetPaymentsChannel(ctx context.Context, lightning api.NewAPICall, from time.Time) <-chan api.RawMessage
- type Credentials
- type GetRawData
- type Sender
Constants ¶
const DefaultBatchSize = 50
DefaultBatchSize is the default batch size
const ReportBatch = 10
ReportBatch is how often a log is printed to show progress
Variables ¶
This section is empty.
Functions ¶
func GetFirstDay ¶
GetFirstDay get first day of the month monthsAgo (0 is current month) firstLastMonth := GetFirstDay(1) beginOfThisMonth := GetFirstDay(0) endOfThisMonth := GetFirstDay(-1).Add(-1 * time.Millisecond)
func GetForwardsChannel ¶
func GetForwardsChannel(ctx context.Context, lightning api.NewAPICall, from time.Time) <-chan api.RawMessage
GetForwardsChannel returns a channel with raw forwards
func GetInvoicesChannel ¶
func GetInvoicesChannel(ctx context.Context, lightning api.NewAPICall, from time.Time) <-chan api.RawMessage
GetInvoicesChannel returns a channel with raw invoices
func GetPaymentsChannel ¶
func GetPaymentsChannel(ctx context.Context, lightning api.NewAPICall, from time.Time) <-chan api.RawMessage
GetPaymentsChannel returns a channel with raw payments
Types ¶
type Credentials ¶
Credentials implements PerRPCCredentials
func MakeCredentials ¶
func MakeCredentials(pubkey, authToken string) *Credentials
MakeCredentials creates new Credentials
func (*Credentials) GetRequestMetadata ¶
func (c *Credentials) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error)
GetRequestMetadata implements PerRPCCredentials
func (*Credentials) RequireTransportSecurity ¶
func (c *Credentials) RequireTransportSecurity() bool
RequireTransportSecurity implements PerRPCCredentials
type GetRawData ¶
type GetRawData func(ctx context.Context, lightning api.NewAPICall, pagination api.RawPagination) ([]api.RawMessage, *api.ResponseRawPagination, error)
GetRawData - signature for the function to get raw data
type Sender ¶
type Sender struct { AuthToken string LightningAPI api.NewAPICall AgentAPI agent.AgentAPIClient PubKey string ClientType int }
Sender struct
func MakeSender ¶
func MakeSender(ctx context.Context, authToken string, endpoint string, l api.NewAPICall, isInsecure bool) (*Sender, error)
MakeSender creates a new Sender
func (*Sender) SendForwards ¶
SendForwards will send forwards
func (*Sender) SendInvoices ¶
SendInvoices will send invoices