feat: work on Rest API

This commit is contained in:
Eugen Eisler
2024-10-06 15:29:01 +02:00
parent 0b26b930f9
commit 3380972df1
20 changed files with 345 additions and 96 deletions

View File

@@ -55,6 +55,11 @@ func Cli(version string) (err error) {
}
}
if currentFlags.Serve {
err = fabric.Serve()
return
}
if currentFlags.UpdatePatterns {
err = fabric.PopulateDB()
return

View File

@@ -52,6 +52,7 @@ type Flags struct {
PrintSession string `long:"printsession" description:"Print session"`
HtmlReadability bool `long:"readability" description:"Convert HTML input into a clean, readable view"`
DryRun bool `long:"dry-run" description:"Show what would be sent to the model without actually sending it"`
Serve bool `long:"serve" description:"Serve the Fabric Rest API"`
Version bool `long:"version" description:"Print current version"`
}