contacts

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2019 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DatabaseName = "contact"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository interface {
	SetAddress(*contactspb.SetAddressRequest) (*contactspb.Contact, error)
	SetPhone(*contactspb.SetPhoneRequest) (*contactspb.Contact, error)
	Query(*contactspb.QueryRequest) ([]*contactspb.Contact, error)
	RemoveContact(*contactspb.RemoveContactRequest) (bool, error)
	Migrate() error
}

func NewRepository

func NewRepository(url string) (Repository, error)

type Server

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

func NewServer

func NewServer(logger zerolog.Logger, grpcServer *grpc.Server, contactStorage Repository) Server

func (Server) Query

func (Server) SetAddress

func (Server) SetPhone

func (Server) Start

func (s Server) Start(addr string) error

func (Server) Stop

func (s Server) Stop()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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