googlecontactsource

package
v0.0.0-...-c4b140d Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapAddress

func MapAddress(address domain.Address) (dto *people.Address)

func MapBirthday

func MapBirthday(birthday domain.Birthday) (dto *people.Birthday)

func MapEmailAddress

func MapEmailAddress(email domain.EmailAddress) (dto *people.EmailAddress)

func MapGender

func MapGender(gender domain.Gender) (dto *people.Gender)

func MapName

func MapName(name *domain.UserNames) (dto *people.Name)

func MapNickname

func MapNickname(name domain.Nickname) (dto *people.Nickname)

func MapOccupation

func MapOccupation(occupation domain.Occupation) (dto *people.Occupation)

func MapOrganization

func MapOrganization(organization domain.Organization) (dto *people.Organization)

func MapPerson

func MapPerson(user domain.Unified) (dto *people.Person)

func MapPhone

func MapPhone(phone domain.PhoneNumber) (dto *people.PhoneNumber)

func MapPhoto

func MapPhoto(phone domain.Photo) (dto *people.Photo)

func MapRelation

func MapRelation(relation domain.Relation) (dto *people.Relation)

func MapUrl

func MapUrl(url domain.Url) (dto *people.Url)

Types

type GoogleContactSource

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

func NewGoogleContactSource

func NewGoogleContactSource(
	repo *firestore.GoogleContactsFirestore,
	contactSourceRepo *firestore.ContactSourceFirestore,
	peopleServiceFactory application.PeopleServiceFactory,
	googleContactsRepo repository.IGoogleContacts,
) *GoogleContactSource

func (*GoogleContactSource) Puller

func (source *GoogleContactSource) Puller(ctx context.Context, userId domain.UserID, contactSource domain.ContactSource) (puller application.IContactSourcePuller)

func (*GoogleContactSource) Reader

func (source *GoogleContactSource) Reader(ctx context.Context, userId domain.UserID, contactSourceId domain.ContactSourceID) (puller application.IContactSourceReader)

func (*GoogleContactSource) Remove

func (source *GoogleContactSource) Remove(ctx context.Context, userId domain.UserID, sourceId domain.ContactSourceID, contactIds []domain.ContactID) (err error)

func (*GoogleContactSource) Update

func (source *GoogleContactSource) Update(ctx context.Context, userId domain.UserID, sourceId domain.ContactSourceID, contactId domain.ContactID, unified domain.Unified) (err error)

Google person update: https://developers.google.com/people/api/rest/v1/people/updateContact?hl=en

type GoogleContactSourcePuller

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

func NewGoogleContactSourcePuller

func NewGoogleContactSourcePuller(userId domain.UserID,
	contactSourceId domain.ContactSourceID,
	googleContactsRepo repository.IGoogleContacts,
	peopleService application.PeopleService) *GoogleContactSourcePuller

func (*GoogleContactSourcePuller) Pull

func (s *GoogleContactSourcePuller) Pull(ctx context.Context) (newContacts []domain.Contact, updatedContacts []domain.Contact, deletedContacts []domain.Contact, err error)

type GoogleContactsReader

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

func NewGoogleContactsReader

func NewGoogleContactsReader(googleContactsRepo repository.IGoogleContacts, userId domain.UserID, sourceId domain.ContactSourceID, batchSize int) *GoogleContactsReader

func (*GoogleContactsReader) Read

func (reader *GoogleContactsReader) Read(ctx context.Context) (contacts []domain.Contact, err error)

Jump to

Keyboard shortcuts

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