feat(landerctl): implement -S flag using restructured codebase
This commit is contained in:
parent
4b469623dd
commit
086ee8900b
5 changed files with 423 additions and 137 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue