storage

package
v0.0.0-...-9841d36 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContactRepository

type ContactRepository struct {
	Adapter *storage.PSQL
}

func NewRepository

func NewRepository(ctx context.Context, options map[string]interface{}, logger *log.Logger) (*ContactRepository, error)

NewRepository creates a PSQL implementation of a secrets repository

func (*ContactRepository) Add

func (*ContactRepository) AddToFavourites

func (r *ContactRepository) AddToFavourites(id, owner_id string) error

func (*ContactRepository) Delete

func (r *ContactRepository) Delete(id, owner_id string) error

func (*ContactRepository) Edit

func (r *ContactRepository) Edit(id, owner_id string, newContact domain.Contact) error

func (*ContactRepository) GetByID

func (r *ContactRepository) GetByID(id string) (*domain.Contact, error)

func (*ContactRepository) GetByOwnerID

func (r *ContactRepository) GetByOwnerID(ownerID string) ([]domain.Contact, error)

func (*ContactRepository) GetFavouritesByOwnerID

func (r *ContactRepository) GetFavouritesByOwnerID(ownerID string) ([]domain.Contact, error)

func (*ContactRepository) Merge

func (r *ContactRepository) Merge(toMerge domain.Contact, toDelete []string) error

func (*ContactRepository) RemoveFromFavourites

func (r *ContactRepository) RemoveFromFavourites(id, owner_id string) error

Jump to

Keyboard shortcuts

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