fakedb

package
v0.0.0-...-7aeffd2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDuplicateEntry = errors.New("duplicate entry")
	ErrNotFound       = errors.New("not found")
)

Functions

This section is empty.

Types

type FakeDB

type FakeDB struct{}

FakeDB is a fake implementation of a database.

func New

func New() *FakeDB

New creates a new instance of the fake database.

func (*FakeDB) Create

func (db *FakeDB) Create(id string) error

Create creates a new foo with the given id.

func (*FakeDB) Get

func (db *FakeDB) Get(id string) (string, error)

Get gets a foo with the given id.

Jump to

Keyboard shortcuts

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