Implement state export endpoint

This commit is contained in:
Pijus Kamandulis
2024-02-23 00:27:12 +02:00
parent 16f41a5479
commit 332be181ef
4 changed files with 25 additions and 1 deletions

View File

@@ -29,3 +29,11 @@ func LoadStateFS(filePath string) {
collections = state.Collections
documents = state.Documents
}
func GetState() map[string]interface{} {
return map[string]interface{}{
"databases": databases,
"collections": collections,
"documents": documents,
}
}