dal

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2020 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, c *app.Contact) error

func (*Repo) Contacts

func (r *Repo) Contacts(_ Ctx) ([]app.Contact, error)

Jump to

Keyboard shortcuts

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