feat(landerctl): implement -S flag using restructured codebase

This commit is contained in:
Jef Roosens 2024-10-03 09:30:35 +02:00
parent 4b469623dd
commit 086ee8900b
Signed by: Jef Roosens
GPG key ID: B75D4F293C7052DB
5 changed files with 423 additions and 137 deletions

View file

@ -50,6 +50,23 @@ typedef struct landerctl_ctx {
FILE *data_file;
} landerctl_ctx;
typedef struct landerctl_args {
bool secure;
bool verbose;
landerctl_cfg cfg;
struct {
char **arr;
int len;
} args;
landerctl_mode mode;
} landerctl_args;
typedef struct landerctl_curl {
CURL *curl;
struct curl_slist *headers;
char err_msg[CURL_ERROR_SIZE];
} landerctl_curl;
const char *landerctl_err_msg(landerctl_err err);
void landerctl_set_common(landerctl_ctx *ctx);
@ -57,4 +74,7 @@ landerctl_err landerctl_post_short(landerctl_ctx *ctx);
landerctl_err landerctl_post_paste(landerctl_ctx *ctx);
landerctl_err landerctl_post_file(landerctl_ctx *ctx);
int landerctl_cmd_short(landerctl_args *args);
int landerctl_parse_args(landerctl_args *out, int argc, char **argv);
#endif