jsonds

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const ModelQueryKey = "name"

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONDatastore

type JSONDatastore struct {
	// contains filtered or unexported fields
}

JSONDatastore implements datastore.Datastore interface using JSON files

func NewJSONDatastore

func NewJSONDatastore(fs embed.FS) *JSONDatastore

NewJSONDatastore creates a new JSON datastore instance

func (*JSONDatastore) Add

func (j *JSONDatastore) Add(ctx context.Context, entity datastore.Entity) error

Add implements datastore.Datastore interface

func (*JSONDatastore) BatchAdd

func (j *JSONDatastore) BatchAdd(ctx context.Context, entities []datastore.Entity) error

BatchAdd implements datastore.Datastore interface

func (*JSONDatastore) Commit

func (j *JSONDatastore) Commit(ctx context.Context) error

Commit implements datastore.Datastore interface

func (*JSONDatastore) Count

func (j *JSONDatastore) Count(ctx context.Context, entity datastore.Entity, options *datastore.FilterOptions) (int64, error)

Count implements datastore.Datastore interface

func (*JSONDatastore) Delete

func (j *JSONDatastore) Delete(ctx context.Context, entity datastore.Entity) error

Delete implements datastore.Datastore interface

func (*JSONDatastore) Get

func (j *JSONDatastore) Get(ctx context.Context, entity datastore.Entity) error

Get implements datastore.Datastore interface

func (*JSONDatastore) Init

func (j *JSONDatastore) Init() error

Init implements datastore.Datastore interface

func (*JSONDatastore) IsExist

func (j *JSONDatastore) IsExist(ctx context.Context, entity datastore.Entity) (bool, error)

IsExist implements datastore.Datastore interface

func (*JSONDatastore) List

List implements datastore.Datastore interface

func (*JSONDatastore) Put

func (j *JSONDatastore) Put(ctx context.Context, entity datastore.Entity) error

Put implements datastore.Datastore interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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