Documentation
¶
Index ¶
- type Object
- type Store
- func (s *Store) Create(typeName string, fields map[string]any) (*Object, error)
- func (s *Store) Delete(typeName, id string) error
- func (s *Store) Get(typeName, id string) (*Object, error)
- func (s *Store) List(typeName string) ([]string, error)
- func (s *Store) LoadAll(typeName string) ([]*Object, error)
- func (s *Store) Update(typeName, id string, fields map[string]any, merge bool) (*Object, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Object ¶
type Object struct {
Type string
ID string
Fields map[string]any
File string
Inline bool
ReadOnly bool
}
Object represents a single database object loaded from disk.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store coordinates reading and writing objects on disk.
func NewStoreWithOps ¶ added in v0.7.0
NewStoreWithOps constructs a data store rooted at the given directory using the provided file operations.
Click to show internal directories.
Click to hide internal directories.