Documentation ¶
Index ¶
- type Memory
- func (storage *Memory) BeginTx(ctx context.Context) (context.Context, error)
- func (storage *Memory) Close() error
- func (storage *Memory) CommitTx(ctx context.Context) error
- func (storage *Memory) Create(ctx context.Context, ptr interface{}) error
- func (storage *Memory) DeleteAll(ctx context.Context, Type 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) RollbackTx(ctx context.Context) error
- func (storage *Memory) TableFor(ctx context.Context, e interface{}) MemoryTable
- 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/memorystorage" ) func main() *memorystorage.Memory { return memorystorage.NewMemory() }
Output:
func (*Memory) DeleteByID ¶
type MemoryTable ¶
type MemoryTable map[string]interface{}
Click to show internal directories.
Click to hide internal directories.