Documentation ¶
Index ¶
- type Memory
- func (storage *Memory) Close() error
- func (storage *Memory) Create(ctx context.Context, ptr interface{}) error
- func (storage *Memory) DeleteByID(ctx context.Context, Type interface{}, ID string) error
- func (storage *Memory) FindAll(ctx context.Context, Type interface{}) frameless.Iterator
- func (storage *Memory) FindByID(ctx context.Context, ptr interface{}, ID string) (bool, error)
- func (storage *Memory) TableFor(e interface{}) MemoryTable
- func (storage *Memory) Truncate(ctx context.Context, Type interface{}) error
- func (storage *Memory) Update(ctx context.Context, entityPtr interface{}) error
- type MemoryTable
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Memory ¶
type Memory struct { DB map[string]MemoryTable Mutex *sync.RWMutex }
Example ¶
package main import ( "github.com/adamluzsi/frameless/resources/storages/memorystorage" ) func main() *memorystorage.Memory { return memorystorage.NewMemory() }
Output:
func (*Memory) DeleteByID ¶
func (*Memory) TableFor ¶
func (storage *Memory) TableFor(e interface{}) MemoryTable
type MemoryTable ¶
type MemoryTable map[string]interface{}
Click to show internal directories.
Click to hide internal directories.