diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2025-02-14 12:54:24 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2025-02-14 12:54:24 -0500 |
commit | 190d3fbe0f99feb8b00cef34d834c4ef5abb5262 (patch) | |
tree | b9dd8520d2e8e3a97ea6267bc06f89b25353d69b /src/lib/index/include | |
parent | 952de22b54c85aac5eef77d9aafe6587ad555fce (diff) | |
download | stasis-testable-entrypoint.tar.gz |
Add library stasis_index.atestable-entrypoint
Diffstat (limited to 'src/lib/index/include')
-rw-r--r-- | src/lib/index/include/args.h | 9 | ||||
-rw-r--r-- | src/lib/index/include/helpers.h | 27 | ||||
-rw-r--r-- | src/lib/index/include/index.h | 14 | ||||
-rw-r--r-- | src/lib/index/include/index_callbacks.h | 9 | ||||
-rw-r--r-- | src/lib/index/include/junitxml_report.h | 8 | ||||
-rw-r--r-- | src/lib/index/include/readmes.h | 8 | ||||
-rw-r--r-- | src/lib/index/include/website.h | 8 |
7 files changed, 83 insertions, 0 deletions
diff --git a/src/lib/index/include/args.h b/src/lib/index/include/args.h new file mode 100644 index 0000000..543aa4b --- /dev/null +++ b/src/lib/index/include/args.h @@ -0,0 +1,9 @@ +#ifndef STASIS_ARGS_H +#define STASIS_ARGS_H + +#include <getopt.h> + +extern struct option long_options[]; +void usage(char *name); + +#endif //STASIS_ARGS_H diff --git a/src/lib/index/include/helpers.h b/src/lib/index/include/helpers.h new file mode 100644 index 0000000..46705d2 --- /dev/null +++ b/src/lib/index/include/helpers.h @@ -0,0 +1,27 @@ +#ifndef HELPERS_H +#define HELPERS_H + +#include "delivery.h" + +#define ARRAY_COUNT_DYNAMIC(X, COUNTER) \ + do { \ + for ((COUNTER) = 0; (X) && (X)[COUNTER] != NULL; (COUNTER)++) {} \ + } while(0) + +#define ARRAY_COUNT_BY_STRUCT_MEMBER(X, MEMBER, COUNTER) \ + do { \ + for ((COUNTER) = 0; (X)[COUNTER].MEMBER != NULL; (COUNTER)++) {} \ + } while(0) + +struct StrList *get_architectures(struct Delivery ctx[], size_t nelem); +struct StrList *get_platforms(struct Delivery ctx[], size_t nelem); +int get_pandoc_version(size_t *result); +int pandoc_exec(const char *in_file, const char *out_file, const char *css_file, const char *title); +int get_latest_rc(struct Delivery ctx[], size_t nelem); +struct Delivery *get_latest_deliveries(struct Delivery ctx[], size_t nelem); +int get_files(struct StrList **out, const char *path, const char *pattern, ...); +struct StrList *get_docker_images(struct Delivery *ctx, char *pattern); +int load_metadata(struct Delivery *ctx, const char *filename); +int micromamba_configure(const struct Delivery *ctx, struct MicromambaInfo *m); + +#endif //HELPERS_H diff --git a/src/lib/index/include/index.h b/src/lib/index/include/index.h new file mode 100644 index 0000000..c57fc7b --- /dev/null +++ b/src/lib/index/include/index.h @@ -0,0 +1,14 @@ +#ifndef STASIS_INDEX_H +#define STASIS_INDEX_H + +#include "args.h" +#include "helpers.h" +#include "index_callbacks.h" +#include "index.h" +#include "junitxml_report.h" +#include "readmes.h" +#include "website.h" + +int stasis_index_entrypoint(int argc, char *argv[]); + +#endif diff --git a/src/lib/index/include/index_callbacks.h b/src/lib/index/include/index_callbacks.h new file mode 100644 index 0000000..7d95cbb --- /dev/null +++ b/src/lib/index/include/index_callbacks.h @@ -0,0 +1,9 @@ +#ifndef CALLBACKS_H +#define CALLBACKS_H + +#include "delivery.h" + +int callback_sort_deliveries_cmpfn(const void *a, const void *b); +int callback_sort_deliveries_dynamic_cmpfn(const void *a, const void *b); + +#endif //CALLBACKS_H diff --git a/src/lib/index/include/junitxml_report.h b/src/lib/index/include/junitxml_report.h new file mode 100644 index 0000000..6d2a248 --- /dev/null +++ b/src/lib/index/include/junitxml_report.h @@ -0,0 +1,8 @@ +#ifndef JUNITXML_REPORT_H +#define JUNITXML_REPORT_H + +#include "helpers.h" + +int indexer_junitxml_report(struct Delivery ctx[], size_t nelem); + +#endif //JUNITXML_REPORT_H diff --git a/src/lib/index/include/readmes.h b/src/lib/index/include/readmes.h new file mode 100644 index 0000000..d4fa7ac --- /dev/null +++ b/src/lib/index/include/readmes.h @@ -0,0 +1,8 @@ +#ifndef READMES_H +#define READMES_H + +#include "helpers.h" + +int indexer_readmes(struct Delivery ctx[], size_t nelem); + +#endif //READMES_H diff --git a/src/lib/index/include/website.h b/src/lib/index/include/website.h new file mode 100644 index 0000000..e67d58b --- /dev/null +++ b/src/lib/index/include/website.h @@ -0,0 +1,8 @@ +#ifndef WEBSITE_H +#define WEBSITE_H + +#include "helpers.h" + +int indexer_make_website(const struct Delivery *ctx); + +#endif //WEBSITE_H |