storage

package
v0.0.0-...-540e53d Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DaprStorage

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

func NewDaprStorage

func NewDaprStorage(maxItems int) *DaprStorage

func (*DaprStorage) Create

func (s *DaprStorage) Create(todo *todos.Todo) error

func (*DaprStorage) Delete

func (s *DaprStorage) Delete(todo *todos.Todo) error

func (*DaprStorage) ListAll

func (s *DaprStorage) ListAll() ([]*todos.Todo, error)

func (*DaprStorage) Update

func (s *DaprStorage) Update(todo *todos.Todo) error

type InMemoryStorage

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

func NewInMemoryStorage

func NewInMemoryStorage(maxItems int) *InMemoryStorage

func (*InMemoryStorage) Create

func (s *InMemoryStorage) Create(todo *todos.Todo) error

func (*InMemoryStorage) Delete

func (s *InMemoryStorage) Delete(todo *todos.Todo) error

func (*InMemoryStorage) ListAll

func (s *InMemoryStorage) ListAll() ([]*todos.Todo, error)

func (*InMemoryStorage) Update

func (s *InMemoryStorage) Update(todo *todos.Todo) error

type MongoStorage

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

func NewMongoStorage

func NewMongoStorage(connStr string, maxItems int) *MongoStorage

func (*MongoStorage) Create

func (s *MongoStorage) Create(todo *todos.Todo) error

func (*MongoStorage) Delete

func (s *MongoStorage) Delete(todo *todos.Todo) error

func (*MongoStorage) ListAll

func (s *MongoStorage) ListAll() ([]*todos.Todo, error)

func (*MongoStorage) Update

func (s *MongoStorage) Update(todo *todos.Todo) error

type TodosStorage

type TodosStorage interface {
	Create(todo *todos.Todo) error
	Update(todo *todos.Todo) error
	Delete(todo *todos.Todo) error
	ListAll() ([]*todos.Todo, error)
}

Jump to

Keyboard shortcuts

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