storage

package
v0.0.0-...-d2bec9b Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Readable

type Readable interface {
	Unmarshal([]byte) (Readable, error)
}

type Saveable

type Saveable interface {
	GetKey() string
	GetIndices() []string
	Marshal() ([]byte, error)
}

type Store

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

Store is simple access layer to a dapr store

func New

func New(name string) (Store, error)

func (*Store) Close

func (s *Store) Close()

func (*Store) Persist

func (s *Store) Persist(ctx context.Context, e Saveable) error

func (*Store) Read

func (s *Store) Read(ctx context.Context, key string, v Readable) (Readable, error)

func (*Store) ReadMany

func (s *Store) ReadMany(ctx context.Context, index string, helper Readable) ([]Readable, error)

Jump to

Keyboard shortcuts

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