memorystorage

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

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 NewMemory

func NewMemory() *Memory

func (*Memory) BeginTx

func (storage *Memory) BeginTx(ctx context.Context) (context.Context, error)

func (*Memory) Close

func (storage *Memory) Close() error

func (*Memory) CommitTx

func (storage *Memory) CommitTx(ctx context.Context) error

func (*Memory) Create

func (storage *Memory) Create(ctx context.Context, ptr interface{}) error

func (*Memory) DeleteAll

func (storage *Memory) DeleteAll(ctx context.Context, Type interface{}) error

func (*Memory) DeleteByID

func (storage *Memory) DeleteByID(ctx context.Context, Type interface{}, id string) error

func (*Memory) FindAll

func (storage *Memory) FindAll(ctx context.Context, Type interface{}) frameless.Iterator

func (*Memory) FindByID

func (storage *Memory) FindByID(ctx context.Context, ptr interface{}, ID string) (bool, error)

func (*Memory) RollbackTx

func (storage *Memory) RollbackTx(ctx context.Context) error

func (*Memory) TableFor

func (storage *Memory) TableFor(ctx context.Context, e interface{}) MemoryTable

func (*Memory) Update

func (storage *Memory) Update(ctx context.Context, entityPtr interface{}) error

type MemoryTable

type MemoryTable map[string]interface{}

Jump to

Keyboard shortcuts

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