addressbook

package
v0.0.0-...-5a119b3 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2024 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 Contact

type Contact struct {
}

type Handler

type Handler interface {
	CreateContacts(w http.ResponseWriter, r *http.Request)
}

func NewHandler

func NewHandler(svc Service) Handler

type Repository

type Repository interface {
}

func NewBBoltRepository

func NewBBoltRepository(db *bbolt.DB) Repository

type Service

type Service interface {
	AddContact(c *Contact) (*Contact, error)
	UpdateContact(c *Contact) (*Contact, error)
	DeleteContact(id string) error
	FetchContact(id string) (*Contact, error)
	FetchAllContacts() ([]*Contact, error)
}

func NewService

func NewService(r Repository) Service

Jump to

Keyboard shortcuts

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