Documentation
¶
Index ¶
- type AddressbookRepository
- func (r *AddressbookRepository) Create(addressbook *domain.Addressbook) error
- func (r *AddressbookRepository) Delete(id int64) error
- func (r *AddressbookRepository) GetByID(id int64) (*domain.Addressbook, error)
- func (r *AddressbookRepository) GetByUserAndName(userID int64, name string) (*domain.Addressbook, error)
- func (r *AddressbookRepository) GetByUserID(userID int64) ([]*domain.Addressbook, error)
- func (r *AddressbookRepository) Update(addressbook *domain.Addressbook) error
- func (r *AddressbookRepository) UpdateSyncToken(id int64, token string) error
- type ContactRepository
- func (r *ContactRepository) Create(contact *domain.Contact) error
- func (r *ContactRepository) Delete(id int64) error
- func (r *ContactRepository) GetByAddressbook(addressbookID int64) ([]*domain.Contact, error)
- func (r *ContactRepository) GetByID(id int64) (*domain.Contact, error)
- func (r *ContactRepository) GetByUID(addressbookID int64, uid string) (*domain.Contact, error)
- func (r *ContactRepository) Search(addressbookID int64, query string) ([]*domain.Contact, error)
- func (r *ContactRepository) Update(contact *domain.Contact) error
- func (r *ContactRepository) UpdateETag(id int64, etag string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressbookRepository ¶
type AddressbookRepository struct {
// contains filtered or unexported fields
}
AddressbookRepository implements domain.AddressbookRepository for SQLite
func NewAddressbookRepository ¶
func NewAddressbookRepository(db *sql.DB) *AddressbookRepository
NewAddressbookRepository creates a new SQLite addressbook repository
func (*AddressbookRepository) Create ¶
func (r *AddressbookRepository) Create(addressbook *domain.Addressbook) error
Create creates a new addressbook
func (*AddressbookRepository) Delete ¶
func (r *AddressbookRepository) Delete(id int64) error
Delete deletes an addressbook
func (*AddressbookRepository) GetByID ¶
func (r *AddressbookRepository) GetByID(id int64) (*domain.Addressbook, error)
GetByID retrieves an addressbook by ID
func (*AddressbookRepository) GetByUserAndName ¶
func (r *AddressbookRepository) GetByUserAndName(userID int64, name string) (*domain.Addressbook, error)
GetByUserAndName retrieves an addressbook by user ID and name
func (*AddressbookRepository) GetByUserID ¶
func (r *AddressbookRepository) GetByUserID(userID int64) ([]*domain.Addressbook, error)
GetByUserID retrieves all addressbooks for a user
func (*AddressbookRepository) Update ¶
func (r *AddressbookRepository) Update(addressbook *domain.Addressbook) error
Update updates an existing addressbook
func (*AddressbookRepository) UpdateSyncToken ¶
func (r *AddressbookRepository) UpdateSyncToken(id int64, token string) error
UpdateSyncToken updates the sync token for an addressbook
type ContactRepository ¶
type ContactRepository struct {
// contains filtered or unexported fields
}
ContactRepository implements domain.ContactRepository for SQLite
func NewContactRepository ¶
func NewContactRepository(db *sql.DB) *ContactRepository
NewContactRepository creates a new SQLite contact repository
func (*ContactRepository) Create ¶
func (r *ContactRepository) Create(contact *domain.Contact) error
Create creates a new contact
func (*ContactRepository) Delete ¶
func (r *ContactRepository) Delete(id int64) error
Delete deletes a contact
func (*ContactRepository) GetByAddressbook ¶
func (r *ContactRepository) GetByAddressbook(addressbookID int64) ([]*domain.Contact, error)
GetByAddressbook retrieves all contacts for an addressbook
func (*ContactRepository) GetByID ¶
func (r *ContactRepository) GetByID(id int64) (*domain.Contact, error)
GetByID retrieves a contact by ID
func (*ContactRepository) Update ¶
func (r *ContactRepository) Update(contact *domain.Contact) error
Update updates an existing contact
func (*ContactRepository) UpdateETag ¶
func (r *ContactRepository) UpdateETag(id int64, etag string) error
UpdateETag updates the ETag for a contact