rewrite all to PIP
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
#ifndef PIPELINE_H
|
||||
#define PIPELINE_H
|
||||
|
||||
#include <pijson.h>
|
||||
#include <pimap.h>
|
||||
#include <pistring.h>
|
||||
#include <pivector.h>
|
||||
|
||||
struct Prompt {
|
||||
PIString id;
|
||||
PIString text;
|
||||
PIString title;
|
||||
int order = 0;
|
||||
};
|
||||
|
||||
struct Pipeline {
|
||||
PIString id;
|
||||
PIString name;
|
||||
PIVector<Prompt> prompts;
|
||||
PIString working_dir;
|
||||
PIString created_at;
|
||||
PIString updated_at;
|
||||
};
|
||||
|
||||
// Storage functions
|
||||
PIVector<Pipeline> loadPipelines(const PIString & pipelines_dir);
|
||||
bool savePipeline(const PIString & pipelines_dir, Pipeline & pipeline);
|
||||
bool deletePipeline(const PIString & pipelines_dir, const PIString & pipeline_id);
|
||||
Pipeline findPipeline(const PIString & pipelines_dir, const PIString & pipeline_id);
|
||||
|
||||
// Log functions
|
||||
void appendLog(const PIString & logs_dir, const PIString & run_id, const PIString & line);
|
||||
PIString readLog(const PIString & logs_dir, const PIString & run_id);
|
||||
|
||||
// Utility
|
||||
PIString generateUUID();
|
||||
PIString nowISO();
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user