service

package
v1.0.2 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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressbookService

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

AddressbookService implements domain.AddressbookService

func NewAddressbookService

func NewAddressbookService(addressbookRepo domain.AddressbookRepository, contactRepo domain.ContactRepository) *AddressbookService

NewAddressbookService creates a new addressbook service

func (*AddressbookService) CreateAddressbook

func (s *AddressbookService) CreateAddressbook(userID int64, name, displayName, description string) (*domain.Addressbook, error)

CreateAddressbook creates a new addressbook for a user

func (*AddressbookService) DeleteAddressbook

func (s *AddressbookService) DeleteAddressbook(id int64) error

DeleteAddressbook deletes an addressbook and all its contacts

func (*AddressbookService) GenerateSyncToken

func (s *AddressbookService) GenerateSyncToken(id int64) (string, error)

GenerateSyncToken generates a new sync token for an addressbook

func (*AddressbookService) GetAddressbook

func (s *AddressbookService) GetAddressbook(id int64) (*domain.Addressbook, error)

GetAddressbook retrieves an addressbook by ID

func (*AddressbookService) GetUserAddressbooks

func (s *AddressbookService) GetUserAddressbooks(userID int64) ([]*domain.Addressbook, error)

GetUserAddressbooks retrieves all addressbooks for a user

func (*AddressbookService) UpdateAddressbook

func (s *AddressbookService) UpdateAddressbook(id int64, displayName, description *string) error

UpdateAddressbook updates addressbook properties

type ContactService

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

ContactService implements domain.ContactService

func NewContactService

func NewContactService(contactRepo domain.ContactRepository, addressbookRepo domain.AddressbookRepository) *ContactService

NewContactService creates a new contact service

func (*ContactService) CreateContact

func (s *ContactService) CreateContact(addressbookID int64, vcardData string) (*domain.Contact, error)

CreateContact creates a new contact from vCard data

func (*ContactService) DeleteContact

func (s *ContactService) DeleteContact(id int64) error

DeleteContact deletes a contact

func (*ContactService) GenerateETag

func (s *ContactService) GenerateETag(contact *domain.Contact) string

GenerateETag generates a new ETag for a contact

func (*ContactService) GetAddressbookContacts

func (s *ContactService) GetAddressbookContacts(addressbookID int64) ([]*domain.Contact, error)

GetAddressbookContacts retrieves all contacts for an addressbook

func (*ContactService) GetContact

func (s *ContactService) GetContact(id int64) (*domain.Contact, error)

GetContact retrieves a contact by ID

func (*ContactService) SearchContacts

func (s *ContactService) SearchContacts(addressbookID int64, query string) ([]*domain.Contact, error)

SearchContacts searches contacts by query

func (*ContactService) UpdateContact

func (s *ContactService) UpdateContact(id int64, vcardData string) error

UpdateContact updates a contact from vCard data

Jump to

Keyboard shortcuts

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