memory

package
v0.0.0-...-f040671 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemoryDataSource

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

MemoryDataSource is an in memory data source that implements the lower level DataAccesser interface

func NewMemoryDataSource

func NewMemoryDataSource() *MemoryDataSource

func (*MemoryDataSource) Add

func (m *MemoryDataSource) Add(e webapp.Entity) (int, error)

Add helps satisfy the DataAccesser interface Add must only add to the underlying storage if it does not exist

func (*MemoryDataSource) Del

func (m *MemoryDataSource) Del(id int) error

Del helps satisfy the DataAccesser interface

func (*MemoryDataSource) Get

func (m *MemoryDataSource) Get(id int) (webapp.Entity, error)

Get helps satisfy the DataAccesser interface

func (*MemoryDataSource) GetAll

func (m *MemoryDataSource) GetAll() ([]webapp.Entity, error)

GetAll helps satisfy the DataAccesser interface

func (*MemoryDataSource) Set

func (m *MemoryDataSource) Set(e webapp.Entity) error

Set helps satisfy the DataAccesser interface

Jump to

Keyboard shortcuts

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