dal

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package dal implements Data Access Layer using in-memory DB.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ctx

type Ctx = context.Context

Ctx is a synonym for convenience.

type Repo

type Repo struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Repo provides access to storage.

func New

func New(_ Ctx) (*Repo, error)

New creates and returns new Repo.

func (*Repo) AddContact

func (r *Repo) AddContact(ctx Ctx, name string) (id int, err error)

func (*Repo) LstContacts

func (r *Repo) LstContacts(ctx Ctx, page app.SeekPage) ([]app.Contact, error)

Jump to

Keyboard shortcuts

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