repository

package
v0.0.0-...-951d22a Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbstractRepository

type AbstractRepository interface {
	GetList(key string) ([]*map[string]interface{}, error)
	GetDetail(key, id string) ([]*map[string]interface{}, error)
	Set(key string, data []*map[string]interface{}) error
	Delete(key, id string) error
}

type Repository

type Repository struct {
	AbstractRepository
	MemoryDatastore *buntdb.DB
}

func NewRepository

func NewRepository() *Repository

func (*Repository) Delete

func (r *Repository) Delete(key, id string) error

func (*Repository) GetDetail

func (r *Repository) GetDetail(key, id string) (*map[string]interface{}, error)

func (*Repository) GetList

func (r *Repository) GetList(key string) ([]*map[string]interface{}, error)

func (*Repository) MemoryDelete

func (r *Repository) MemoryDelete(key, id string) error

func (*Repository) MemoryGetDetail

func (r *Repository) MemoryGetDetail(key, id string) (*map[string]interface{}, error)

func (*Repository) MemoryGetList

func (r *Repository) MemoryGetList(key string) ([]*map[string]interface{}, error)

func (*Repository) MemorySet

func (r *Repository) MemorySet(key string, data []*map[string]interface{}) error

func (*Repository) Set

func (r *Repository) Set(key string, data []*map[string]interface{}) error

Jump to

Keyboard shortcuts

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