sqlite

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

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) GetByUID

func (r *ContactRepository) GetByUID(addressbookID int64, uid string) (*domain.Contact, error)

GetByUID retrieves a contact by UID and addressbook ID

func (*ContactRepository) Search

func (r *ContactRepository) Search(addressbookID int64, query string) ([]*domain.Contact, error)

Search searches contacts by query string

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

Jump to

Keyboard shortcuts

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