Documentation ¶
Index ¶
- type ContactRepository
- func (r *ContactRepository) Add(p domain.Contact) error
- func (r *ContactRepository) AddToFavourites(id, owner_id string) error
- func (r *ContactRepository) Delete(id, owner_id string) error
- func (r *ContactRepository) Edit(id, owner_id string, newContact domain.Contact) error
- func (r *ContactRepository) GetByID(id string) (*domain.Contact, error)
- func (r *ContactRepository) GetByOwnerID(ownerID string) ([]domain.Contact, error)
- func (r *ContactRepository) GetFavouritesByOwnerID(ownerID string) ([]domain.Contact, error)
- func (r *ContactRepository) Merge(toMerge domain.Contact, toDelete []string) error
- func (r *ContactRepository) RemoveFromFavourites(id, owner_id string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContactRepository ¶
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) 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
Click to show internal directories.
Click to hide internal directories.