storage

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCollection

func CreateCollection(dbName, collectionName string) error

func CreateDatabase

func CreateDatabase(dbName string) error

func DeleteCollection

func DeleteCollection(dbName, collectionName string) error

func DeleteDatabase

func DeleteDatabase(dbName string) error

func GetDocPath

func GetDocPath(dbName, collectionName, docID string) (string, error)

func ListCollections

func ListCollections(dbName string) ([]string, error)

func ListDatabases

func ListDatabases() ([]string, error)

func ListDocuments

func ListDocuments(dbName, collectionName string, filters []DocumentFilter, sortParams *DocumentSort, pagination *DocumentPagination) ([]map[string]interface{}, error)

func LoadDocument

func LoadDocument(dbName, collectionName, docID string) (map[string]interface{}, error)

func SaveDocument

func SaveDocument(dbName, collectionName, docID string, data map[string]interface{}) error

Types

type DocumentFilter

type DocumentFilter struct {
	Field string
	Value string
}

type DocumentPagination

type DocumentPagination struct {
	Limit  int
	Offset int
}

type DocumentSort

type DocumentSort struct {
	Field string
	Order string // "asc" or "desc"
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL