repository

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuntDB

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

BuntDB is the repository using buntdb.

func NewBuntDB

func NewBuntDB(db *buntdb.DB) *BuntDB

NewBuntDB creates a new repository using buntdb.

func (*BuntDB) Create

func (r *BuntDB) Create(e *entity.Image) error

Create creates an image entry.

func (*BuntDB) List

func (r *BuntDB) List() ([]*entity.Image, error)

List returns a list of image entries.

type InMem

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

InMem is the repository using the memory.

func NewInMem

func NewInMem() *InMem

NewInMem creates a new repository using the memory.

func (*InMem) Create

func (r *InMem) Create(e *entity.Image) error

Create creates an image entry.

func (*InMem) List

func (r *InMem) List() ([]*entity.Image, error)

List returns a list of image entries.

Jump to

Keyboard shortcuts

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