mirror of
https://github.com/ElementsProject/lightning.git
synced 2026-08-19 13:17:42 +02:00
You can specify the format for each line in a flexible way, using format tags (inclding defaults if they are not set, recursively). Changelog-Added: JSON-RPC: `bkpr-report` allows flexible summaries of bookkeeper income. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
30 lines
880 B
C
30 lines
880 B
C
#ifndef LIGHTNING_PLUGINS_BKPR_REPORT_H
|
|
#define LIGHTNING_PLUGINS_BKPR_REPORT_H
|
|
#include "config.h"
|
|
#include <ccan/short_types/short_types.h>
|
|
#include <common/json_parse_simple.h>
|
|
|
|
struct command;
|
|
|
|
enum escape_format {
|
|
REPORT_FMT_NONE,
|
|
REPORT_FMT_CSV,
|
|
};
|
|
|
|
struct report_info {
|
|
struct report_format *format;
|
|
const char **headers;
|
|
enum escape_format *escapes;
|
|
u64 *start_time, *end_time;
|
|
};
|
|
|
|
struct command_result *do_bkpr_report(struct command *cmd,
|
|
struct report_info *info);
|
|
|
|
struct command_result *param_report_format(struct command *cmd, const char *name,
|
|
const char *buffer, const jsmntok_t *tok,
|
|
struct report_format **format);
|
|
struct command_result *param_escape_format(struct command *cmd, const char *name,
|
|
const char *buffer, const jsmntok_t *tok,
|
|
enum escape_format **escape);
|
|
#endif /* LIGHTNING_PLUGINS_BKPR_REPORT_H */
|