Documentation
¶
Index ¶
- Variables
- func GetBirthdayNumber(date time.Time) int
- func GetBirthdayNumberFromString(dateStr string) (number int, err error)
- func IsUpdated[T comparable](current []T, update []T) bool
- func PareseBirthdayDate(dateStr string) (date time.Time, err error)
- type Action
- type Address
- type Birthday
- type Contact
- type ContactCatgeory
- type ContactID
- type ContactLog
- type ContactLogId
- type ContactOrigin
- type ContactSearchFilter
- type ContactSource
- type ContactSourceID
- type ContactSources
- type ContactUpdates
- type Contacts
- type CsvContact
- type EmailAddress
- type Gender
- type GoogleContact
- type LinkMatch
- type LinkSuggestion
- type LinkSuggestionID
- type LinkSuggestionKey
- type LinkSuggestions
- type Nickname
- type Note
- type NoteID
- type Notes
- type Occupation
- type Organization
- type PhoneNumber
- type Photo
- type Quota
- type Relation
- type Role
- type SearchFilterField
- type SearchOperator
- type SearchParams
- type Sort
- type SortOrder
- type Source
- type Tag
- type TagID
- type Tags
- type Unified
- func (contact *Unified) ComputeDisplayName() string
- func (contact Unified) ComputeSearchTerms() (terms []string)
- func (contact *Unified) FromContact(dto Contact, sourceId ContactOrigin)
- func (contact *Unified) FromDto(dto *models.Unified)
- func (contact *Unified) FromUpdateDto(dto *models.UpdateUnifiedDto)
- func (u Unified) GetDisplayName() string
- func (user Unified) MapToDto() (dto *models.Unified)
- func (u *Unified) Merge(duplicate Unified)
- func (u *Unified) MergeAddresses(duplicate []Address)
- func (u *Unified) MergeBirthDays(duplicate []Birthday)
- func (u *Unified) MergeEmails(duplicate []EmailAddress)
- func (u *Unified) MergeGenders(duplicate []Gender)
- func (u *Unified) MergeNicknames(duplicate []Nickname)
- func (u *Unified) MergeOccupations(duplicate []Occupation)
- func (u *Unified) MergeOrganizations(duplicate []Organization)
- func (u *Unified) MergePhones(duplicate []PhoneNumber)
- func (u *Unified) MergePhotos(duplicate []Photo)
- func (u *Unified) MergeRelations(duplicate []Relation)
- func (u *Unified) MergeUrls(duplicate []Url)
- type UnifiedContacts
- func (contacts UnifiedContacts) FilterByEmail(emailFilter string) (filtered []Unified)
- func (contacts UnifiedContacts) FilterByFamilyName(nameFilter string) (filtered []Unified)
- func (contacts UnifiedContacts) FilterByGivenName(nameFilter string) (filtered []Unified)
- func (contacts UnifiedContacts) FilterByMiddleName(nameFilter string) (filtered []Unified)
- func (contacts UnifiedContacts) FilterByPhone(phoneFilter string) (filtered []Unified)
- func (contacts UnifiedContacts) MapToDto() (dto []*models.Unified)
- type UnifiedId
- type UnifiedIds
- type UnifiedSearch
- type UnifiedSearchId
- type UnifiedSearchResults
- type Url
- type User
- type UserID
- type UserNames
- type Users
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCategoryAssignableLimitReached = errors.New("total category assignable limit reached")
View Source
var ErrContactSourcesLimitReached = errors.New("contact sources limit reached")
View Source
var ErrContactsLimitReached = errors.New("total contacts limit reached")
View Source
var GreaterThanOrEqual = ">="
View Source
var LessThanOrEqual = "<="
Functions ¶
func GetBirthdayNumber ¶
func GetBirthdayNumberFromString ¶
dateStr must of the format 'MM-dd"
func IsUpdated ¶
func IsUpdated[T comparable](current []T, update []T) bool
Types ¶
type Action ¶
type Action string
const Create Action = "create"
const Delete Action = "delete"
const Update Action = "update"
type Address ¶
type Address struct { City string `firestore:"city,omitempty" json:"city,omitempty" fake:"{city}"` Country string `firestore:"country,omitempty" json:"country,omitempty" fake:"{country}"` CountryCode string `firestore:"country_code,omitempty" json:"country_code,omitempty" fake:"{countryabr}"` ExtendedAddress string `firestore:"extended_address,omitempty" json:"extended_address,omitempty" fake:"{street}, {streetnumber}, {city}"` PoBox string `firestore:"po_box,omitempty" json:"po_box,omitempty"` PostalCode string `firestore:"postal_code,omitempty" json:"postal_code,omitempty" fake:"{zip}"` Region string `firestore:"region,omitempty" json:"region,omitempty" fake:"{state}"` StreetAddress string `firestore:"street_address,omitempty" json:"street_address,omitempty" fake:"{street}"` Type string `firestore:"type,omitempty" json:"type,omitempty"` }
type Birthday ¶
type Contact ¶
type Contact struct { ID ContactID `firestore:"id" json:"id"` DisplayName string `firestore:"display_name" json:"display_name"` Names []*UserNames `firestore:"names" json:"names"` Nicknames []Nickname `firestore:"nicknames" json:"nicknames" fakesize:"1"` Addresses []Address `firestore:"addresses" json:"addresses" fakesize:"1"` Birthdays []Birthday `firestore:"birthdays" json:"birthdays" fakesize:"1"` EmailAddresses []EmailAddress `firestore:"email_addresses" json:"email_addresses" fakesize:"1"` Genders []Gender `firestore:"genders" json:"genders" fakesize:"1"` Occupations []Occupation `firestore:"occupations" json:"occupations" fakesize:"1"` PhoneNumbers []PhoneNumber `firestore:"phone_numbers" json:"phone_numbers" fakesize:"1"` Photos []Photo `firestore:"photos" json:"photos" fakesize:"1"` Relations []Relation `firestore:"relations" json:"relations" fakesize:"1"` Urls []Url `firestore:"urls" json:"urls" fakesize:"1"` Organizations []Organization `firestore:"organizations" json:"organizations" fakesize:"1"` CreatedAt time.Time `firestore:"created_at" json:"created_at"` UpdatedAt time.Time `firestore:"updated_at" json:"updated_at"` }
func (*Contact) FromCsv ¶
func (contact *Contact) FromCsv(dto CsvContact)
func (*Contact) FromDto ¶
func (contact *Contact) FromDto(dto *models.CreateContactDto)
func (*Contact) FromUnified ¶
type ContactCatgeory ¶
type ContactCatgeory string
const A ContactCatgeory = "A"
const B ContactCatgeory = "B"
const C ContactCatgeory = "C"
const D ContactCatgeory = "D"
func (ContactCatgeory) String ¶
func (c ContactCatgeory) String() string
func (ContactCatgeory) Valid ¶
func (catgeory ContactCatgeory) Valid() bool
type ContactLog ¶
type ContactLog struct { ID ContactLogId `firestore:"id" json:"id"` UnifiedId UnifiedId `firestore:"unified_id" json:"unified_id"` CreatedAt time.Time `firestore:"created_at" json:"created_at"` Action Action `firestore:"action" json:"action"` Updates *ContactUpdates `firestore:"updates" json:"updates"` }
func NewContactLog ¶
func NewContactLog(unified Unified, action Action) (log ContactLog)
type ContactLogId ¶
type ContactLogId string
func (ContactLogId) String ¶
func (id ContactLogId) String() string
type ContactOrigin ¶
type ContactOrigin string
func NewContactOrigin ¶
func NewContactOrigin(source Source, contactSourceId ContactSourceID, contactId ContactID) ContactOrigin
func (ContactOrigin) ContactId ¶
func (c ContactOrigin) ContactId() (contactID ContactID)
func (ContactOrigin) Source ¶
func (c ContactOrigin) Source() (source Source)
func (ContactOrigin) SourceId ¶
func (c ContactOrigin) SourceId() (sourceId ContactSourceID)
func (ContactOrigin) String ¶
func (c ContactOrigin) String() string
type ContactSearchFilter ¶
type ContactSearchFilter struct { Field SearchFilterField Operator SearchOperator Value string }
func MapSearchFilters ¶
func MapSearchFilters(filters []*models.SearchFilter) (mapped []ContactSearchFilter)
type ContactSource ¶
type ContactSource struct { ID ContactSourceID `firestore:"id" json:"id"` UserID UserID `firestore:"user_id" json:"user_id"` CreatedAt time.Time `firestore:"created_at" json:"created_at"` UpdatedAt time.Time `firestore:"updated_at" json:"updated_at"` Source Source `firestore:"source" json:"source"` Email string `firestore:"email" json:"email"` GoogleUserId string `firestore:"google_user_id" json:"google_user_id"` AccessToken string `firestore:"access_token" json:"access_token"` RefreshToken string `firestore:"refresh_token" json:"refresh_token"` TokenExpiry time.Time `firestore:"token_expiry" json:"token_expiry"` NextSyncAt time.Time `firestore:"next_sync_at" json:"next_sync_at"` }
func (ContactSource) MapToDto ¶
func (doc ContactSource) MapToDto() (dto *models.ContactSource)
type ContactSourceID ¶
type ContactSourceID string
func (ContactSourceID) String ¶
func (c ContactSourceID) String() string
type ContactSources ¶
type ContactSources []ContactSource
func (ContactSources) MapToDto ¶
func (docs ContactSources) MapToDto() (dto []*models.ContactSource)
type ContactUpdates ¶
type ContactUpdates struct { Names []*UserNames `firestore:"names,omitempty" json:"names,omitempty"` Nicknames []Nickname `firestore:"nicknames,omitempty" json:"nicknames,omitempty" fakesize:"1"` Addresses []Address `firestore:"addresses,omitempty" json:"addresses,omitempty" fakesize:"1"` Birthdays []Birthday `firestore:"birthdays,omitempty" json:"birthdays,omitempty" fakesize:"1"` EmailAddresses []EmailAddress `firestore:"email_addresses,omitempty" json:"email_addresses,omitempty" fakesize:"1"` Genders []Gender `firestore:"genders,omitempty" json:"genders,omitempty" fakesize:"1"` Occupations []Occupation `firestore:"occupations,omitempty" json:"occupations,omitempty" fakesize:"1"` PhoneNumbers []PhoneNumber `firestore:"phone_numbers,omitempty" json:"phone_numbers,omitempty" fakesize:"1"` Photos []Photo `firestore:"photos,omitempty" json:"photos,omitempty" fakesize:"1"` Relations []Relation `firestore:"relations,omitempty" json:"relations,omitempty" fakesize:"1"` Urls []Url `firestore:"urls,omitempty" json:"urls,omitempty" fakesize:"1"` Organizations []Organization `firestore:"organizations,omitempty" json:"organizations,omitempty" fakesize:"1"` NextContact *time.Time `firestore:"next_contact,omitempty" json:"next_contact,omitempty"` LastContact *time.Time `firestore:"last_contact,omitempty" json:"last_contact,omitempty"` Score int `firestore:"score,omitempty" json:"score,omitempty"` Category ContactCatgeory `firestore:"category,omitempty" json:"category,omitempty"` Origins map[string]bool `firestore:"origins,omitempty" json:"origins,omitempty"` SearchTerms []string `firestore:"search_terms,omitempty" json:"search_terms,omitempty"` }
func (*ContactUpdates) FromUnified ¶
func (contact *ContactUpdates) FromUnified(unified Unified)
type CsvContact ¶
type CsvContact struct { DisplayName string `csv:"display_name"` DisplayNameLastFirst string `csv:"display_name_last_first"` FamilyName string `csv:"family_name"` GivenName string `csv:"given_name"` HonorificPrefix string `csv:"honorific_prefix"` HonorificSuffix string `csv:"honorific_suffix"` MiddleName string `csv:"middle_name"` PhoneticFamilyName string `csv:"phonetic_family_name"` PhoneticFullName string `csv:"phonetic_full_name"` PhoneticGivenName string `csv:"phonetic_given_name"` PhoneticHonorificPrefix string `csv:"phonetic_honorific_prefix"` PhoneticHonorificSuffix string `csv:"phonetic_honorific_suffix"` PhoneticMiddleName string `csv:"phonetic_middle_name"` UnstructuredName string `csv:"unstructured_name"` Nickname string `csv:"nickname"` City string `csv:"city"` Country string `csv:"country"` CountryCode string `csv:"country_code"` ExtendedAddress string `csv:"extended_address"` PoBox string `csv:"po_box"` PostalCode string `csv:"postal_code"` Region string `csv:"region"` StreetAddress string `csv:"street_address"` AddressType string `csv:"address_type"` BirthDate string `csv:"birth_date"` BirthText string `csv:"birth_text"` EmailDisplayName string `csv:"email_display_name"` EmailType string `csv:"email_type"` Email string `csv:"email"` AddressMeAs string `csv:"address_me_as"` Gender string `csv:"gender"` Occupation string `csv:"occupation"` PhoneType string `csv:"phone_type"` Phone string `csv:"phone"` PhotoDefault string `csv:"photo_default"` PhotoUrl string `csv:"photo_url"` Relation string `csv:"relation"` RelationType string `csv:"relation_type"` UrlType string `csv:"url_type"` Url string `csv:"url"` Department string `csv:"department"` Domain string `csv:"domain"` EndDate string `csv:"end_date"` JobDescription string `csv:"job_description"` Location string `csv:"location"` Name string `csv:"name"` PhoneticName string `csv:"phonetic_name"` StartDate string `csv:"start_date"` Symbol string `csv:"symbol"` Title string `csv:"title"` OrganizationType string `csv:"organization_type"` IsCurrent string `csv:"is_current"` }
type EmailAddress ¶
type EmailAddress struct { DisplayName string `firestore:"display_name,omitempty" json:"display_name,omitempty" fake:"{firstname}"` Type string `firestore:"type,omitempty" json:"type,omitempty"` Value string `firestore:"value,omitempty" json:"value,omitempty" fake:"{email}"` }
func (EmailAddress) MapToDto ¶
func (email EmailAddress) MapToDto() (dto *models.EmailAddress)
type Gender ¶
type GoogleContact ¶
type GoogleContact struct { ID ContactID `firestore:"id" json:"id"` // person id from google person Names []*UserNames `firestore:"names" json:"names"` Nicknames []Nickname `firestore:"nicknames" json:"nicknames" fakesize:"1"` Addresses []Address `firestore:"addresses" json:"addresses" fakesize:"1"` Birthdays []Birthday `firestore:"birthdays" json:"birthdays" fakesize:"1"` EmailAddresses []EmailAddress `firestore:"email_addresses" json:"email_addresses" fakesize:"1"` Genders []Gender `firestore:"genders" json:"genders" fakesize:"1"` Occupations []Occupation `firestore:"occupations" json:"occupations" fakesize:"1"` PhoneNumbers []PhoneNumber `firestore:"phone_numbers" json:"phone_numbers" fakesize:"1"` Photos []Photo `firestore:"photos" json:"photos" fakesize:"1"` Relations []Relation `firestore:"relations" json:"relations" fakesize:"1"` Urls []Url `firestore:"urls" json:"urls" fakesize:"1"` Organizations []Organization `firestore:"organizations" json:"organizations" fakesize:"1"` CreatedAt time.Time `firestore:"created_at" json:"created_at"` UpdatedAt time.Time `firestore:"updated_at" json:"updated_at"` ResourceName string `firestore:"resource_name" json:"resource_name,omitempty"` Metadata *people.PersonMetadata `firestore:"metadata" json:"metadata,omitempty"` }
func (*GoogleContact) FromGooglePerson ¶
func (contact *GoogleContact) FromGooglePerson(person *people.Person)
func (GoogleContact) IsContactDataUpdated ¶
func (c GoogleContact) IsContactDataUpdated(update GoogleContact) bool
func (GoogleContact) MapToDomain ¶
func (user GoogleContact) MapToDomain() (dto Contact)
type LinkMatch ¶
type LinkSuggestion ¶
type LinkSuggestion struct { ID LinkSuggestionID `firestore:"id" json:"id"` Key LinkSuggestionKey `firestore:"key" json:"key"` Value string `firestore:"value" json:"value"` Matches []LinkMatch `firestore:"matches" json:"matches"` }
func (LinkSuggestion) MapToDto ¶
func (suggestion LinkSuggestion) MapToDto() (dto *models.LinkSuggestion)
type LinkSuggestionID ¶
type LinkSuggestionID string
func (LinkSuggestionID) String ¶
func (c LinkSuggestionID) String() string
type LinkSuggestionKey ¶
type LinkSuggestionKey string
const KeyEmail LinkSuggestionKey = "email"
const KeyName LinkSuggestionKey = "name"
const KeyPhone LinkSuggestionKey = "phone"
func (LinkSuggestionKey) String ¶
func (c LinkSuggestionKey) String() string
type LinkSuggestions ¶
type LinkSuggestions []LinkSuggestion
func (LinkSuggestions) MapToDto ¶
func (suggestions LinkSuggestions) MapToDto() (dto []*models.LinkSuggestion)
type Nickname ¶
type Nickname struct {
Value string `firestore:"value,omitempty" json:"value,omitempty" fake:"{firstname}"`
}
type Note ¶
type Note struct { // created at CreatedAt time.Time `firestore:"created_at" json:"created_at,omitempty"` // id ID NoteID `firestore:"id" json:"id,omitempty"` // is updated IsUpdated bool `firestore:"is_updated" json:"is_updated,omitempty"` // note Note string `firestore:"note" json:"note,omitempty" fake:"{sentence:5}"` }
type Occupation ¶
type Occupation struct {
Value string `firestore:"value,omitempty" json:"value,omitempty" fake:"{jobtitle}"`
}
func (Occupation) MapToDto ¶
func (occupation Occupation) MapToDto() (dto *models.Occupation)
type Organization ¶
type Organization struct { Department string `firestore:"department,omitempty" json:"department,omitempty"` Domain string `firestore:"domain,omitempty" json:"domain,omitempty"` EndDate string `firestore:"end_date,omitempty" json:"end_date,omitempty" fake:"{year}-{month}-{day}"` JobDescription string `firestore:"job_description,omitempty" json:"job_description,omitempty" fake:"{sentence:3}"` Location string `firestore:"location,omitempty" json:"location,omitempty"` Name string `firestore:"name,omitempty" json:"name,omitempty" fake:"{company}"` PhoneticName string `firestore:"phonetic_name,omitempty" json:"phonetic_name,omitempty" fake:"{company}"` StartDate string `firestore:"start_date,omitempty" json:"start_date,omitempty" fake:"{year}-{month}-{day}"` Symbol string `firestore:"symbol,omitempty" json:"symbol,omitempty"` Title string `firestore:"title,omitempty" json:"title,omitempty" fake:"{jobtitle}"` Type string `firestore:"type,omitempty" json:"type,omitempty"` IsCurrent bool `firestore:"is_current,omitempty" json:"is_current,omitempty"` }
func (Organization) MapToDto ¶
func (organization Organization) MapToDto() (dto *models.Organization)
type PhoneNumber ¶
type PhoneNumber struct { Type string `firestore:"type,omitempty" json:"type,omitempty"` Value string `firestore:"value,omitempty" json:"value,omitempty" fake:"{phone}"` }
func (PhoneNumber) MapToDto ¶
func (phone PhoneNumber) MapToDto() (dto *models.PhoneNumber)
type Photo ¶
type Quota ¶
type Quota struct { // counter to track total number of contacts added TotalContacts int64 `firestore:"total_contacts" json:"total_contacts"` // counter to track total number of contacts with category assigned TotalCategoryAssigned int64 `firestore:"total_category_assigned" json:"total_category_assigned"` // total contact sources TotalContactSources int64 `firestore:"total_contact_sources" json:"total_contact_sources"` }
active subscription/role can be queried from /customers/userId/subscriptions collection where status is active firebase token includes stripeRole
func (*Quota) CategoryAssigned ¶
func (*Quota) ContactSources ¶
type Relation ¶
type Role ¶
type Role string
const Role1000 Role = "1000"
const Role1500 Role = "1500"
const Role2000 Role = "2000"
const Role2500 Role = "2500"
const Role3000 Role = "3000"
const RoleContactSync Role = "contactSync"
const RoleFree Role = "Free"
func (*Role) MaxCategoryAssignable ¶
func (*Role) MaxContactSources ¶
func (*Role) MaxContacts ¶
type SearchFilterField ¶
type SearchFilterField string
var BirthdayField SearchFilterField = "birthday"
var CategoryField SearchFilterField = "category"
var ContactField SearchFilterField = "next_contact"
var GenderField SearchFilterField = "genders"
var LastContactField SearchFilterField = "last_contact"
var ScoreField SearchFilterField = "score"
func (SearchFilterField) String ¶
func (c SearchFilterField) String() string
type SearchOperator ¶
type SearchOperator string
var Equal SearchOperator = "="
var GreaterThan SearchOperator = ">"
var LessThan SearchOperator = "<"
var NotEqual SearchOperator = "!="
func (SearchOperator) String ¶
func (c SearchOperator) String() string
type SearchParams ¶
type SearchParams struct { Filters []ContactSearchFilter Query string Sort []Sort Page int PerPage int }
func (*SearchParams) FromModel ¶
func (params *SearchParams) FromModel(model *models.SearchContactDto)
type Sort ¶
func MapSearchSorts ¶
func MapSearchSorts(sorts []*models.SearchSort) (mapped []Sort)
type Tag ¶
type Unified ¶
type Unified struct { ID UnifiedId `firestore:"id" json:"id"` DisplayName string `firestore:"display_name" json:"display_name"` Names []*UserNames `firestore:"names" json:"names"` Nicknames []Nickname `firestore:"nicknames" json:"nicknames" fakesize:"1"` Addresses []Address `firestore:"addresses" json:"addresses" fakesize:"1"` Birthdays []Birthday `firestore:"birthdays" json:"birthdays" fakesize:"1"` EmailAddresses []EmailAddress `firestore:"email_addresses" json:"email_addresses" fakesize:"1"` Genders []Gender `firestore:"genders" json:"genders" fakesize:"1"` Occupations []Occupation `firestore:"occupations" json:"occupations" fakesize:"1"` PhoneNumbers []PhoneNumber `firestore:"phone_numbers" json:"phone_numbers" fakesize:"1"` Photos []Photo `firestore:"photos" json:"photos" fakesize:"1"` Relations []Relation `firestore:"relations" json:"relations" fakesize:"1"` Urls []Url `firestore:"urls" json:"urls" fakesize:"1"` Organizations []Organization `firestore:"organizations" json:"organizations" fakesize:"1"` CreatedAt time.Time `firestore:"created_at" json:"created_at"` UpdatedAt time.Time `firestore:"updated_at" json:"updated_at"` NextContact *time.Time `firestore:"next_contact" json:"next_contact"` LastContact *time.Time `firestore:"last_contact" json:"last_contact"` Score int `firestore:"score" json:"score"` Category ContactCatgeory `firestore:"category" json:"category"` // Fields unique to unified // contact sources from which this unified contact is created/linked Origins map[string]bool `firestore:"origins" json:"origins"` SearchTerms []string `firestore:"search_terms" json:"search_terms"` }
func (*Unified) ComputeDisplayName ¶
https://simplycubed.slack.com/archives/C03404BM7CK/p1661501428468729
func (Unified) ComputeSearchTerms ¶
func (*Unified) FromContact ¶
func (contact *Unified) FromContact(dto Contact, sourceId ContactOrigin)
func (*Unified) FromUpdateDto ¶
func (contact *Unified) FromUpdateDto(dto *models.UpdateUnifiedDto)
func (Unified) GetDisplayName ¶
func (*Unified) MergeAddresses ¶
func (*Unified) MergeBirthDays ¶
func (*Unified) MergeEmails ¶
func (u *Unified) MergeEmails(duplicate []EmailAddress)
func (*Unified) MergeGenders ¶
func (*Unified) MergeNicknames ¶
func (*Unified) MergeOccupations ¶
func (u *Unified) MergeOccupations(duplicate []Occupation)
func (*Unified) MergeOrganizations ¶
func (u *Unified) MergeOrganizations(duplicate []Organization)
func (*Unified) MergePhones ¶
func (u *Unified) MergePhones(duplicate []PhoneNumber)
func (*Unified) MergePhotos ¶
func (*Unified) MergeRelations ¶
type UnifiedContacts ¶
type UnifiedContacts []Unified
func (UnifiedContacts) FilterByEmail ¶
func (contacts UnifiedContacts) FilterByEmail(emailFilter string) (filtered []Unified)
func (UnifiedContacts) FilterByFamilyName ¶
func (contacts UnifiedContacts) FilterByFamilyName(nameFilter string) (filtered []Unified)
func (UnifiedContacts) FilterByGivenName ¶
func (contacts UnifiedContacts) FilterByGivenName(nameFilter string) (filtered []Unified)
func (UnifiedContacts) FilterByMiddleName ¶
func (contacts UnifiedContacts) FilterByMiddleName(nameFilter string) (filtered []Unified)
func (UnifiedContacts) FilterByPhone ¶
func (contacts UnifiedContacts) FilterByPhone(phoneFilter string) (filtered []Unified)
func (UnifiedContacts) MapToDto ¶
func (contacts UnifiedContacts) MapToDto() (dto []*models.Unified)
type UnifiedIds ¶
type UnifiedIds []UnifiedId
func (*UnifiedIds) FromArray ¶
func (c *UnifiedIds) FromArray(ids []string)
type UnifiedSearch ¶
type UnifiedSearch struct { ID UnifiedSearchId `json:"id"` UnifiedId UnifiedId `json:"unified_id"` UserId UserID `json:"user_id"` DisplayName string `json:"display_name"` Names []string `json:"names"` Nicknames []string `json:"nicknames"` EmailAddresses []string `json:"email_addresses" fakesize:"1"` Addresses []string `json:"addresses"` Genders []string `json:"genders"` Occupations []string `json:"occupations"` Organizations []string `json:"organizations"` PhoneNumbers []string `json:"phone_numbers"` Birthday *int64 `json:"birthday"` NextContact *int64 `json:"next_contact"` // unix timestamp LastContact *int64 `json:"last_contact"` // unix timestamp Score int `json:"score"` Category ContactCatgeory `json:"category"` BirthdayNumber *int `json:"birthday_number"` }
type UnifiedSearchId ¶
type UnifiedSearchId string
type UnifiedSearchResults ¶
type UnifiedSearchResults []UnifiedSearch
func (UnifiedSearchResults) MapToUnifiedIds ¶
func (results UnifiedSearchResults) MapToUnifiedIds() (ids []UnifiedId)
type Url ¶
type User ¶
type User struct { ID UserID `firestore:"id" json:"id"` Names []UserNames `firestore:"names" json:"names"` Nicknames []Nickname `firestore:"nicknames" json:"nicknames" fakesize:"1"` Addresses []Address `firestore:"addresses" json:"addresses" fakesize:"1"` Birthdays []Birthday `firestore:"birthdays" json:"birthdays" fakesize:"1"` EmailAddresses []EmailAddress `firestore:"email_addresses" json:"email_addresses" fakesize:"1"` Genders []Gender `firestore:"genders" json:"genders" fakesize:"1"` Occupations []Occupation `firestore:"occupations" json:"occupations" fakesize:"1"` PhoneNumbers []PhoneNumber `firestore:"phone_numbers" json:"phone_numbers" fakesize:"1"` Photos []Photo `firestore:"photos" json:"photos" fakesize:"1"` Relations []Relation `firestore:"relations" json:"relations" fakesize:"1"` Urls []Url `firestore:"urls" json:"urls" fakesize:"1"` Organizations []Organization `firestore:"organizations" json:"organizations" fakesize:"1"` CreatedAt time.Time `firestore:"created_at" json:"created_at"` UpdatedAt time.Time `firestore:"updated_at" json:"updated_at"` Quota *Quota `firestore:"quota" json:"quota"` }
func (*User) AddToTotalCategoryAssigned ¶
func (*User) AddToTotalContactSources ¶
func (*User) AddToTotalContacts ¶
type UserNames ¶
type UserNames struct { DisplayName string `firestore:"display_name,omitempty" json:"display_name,omitempty" fake:"{firstname}"` DisplayNameLastFirst string `firestore:"display_name_last_first,omitempty" json:"display_name_last_first,omitempty" fake:"{firstname} {lastname}"` FamilyName string `firestore:"family_name,omitempty" json:"family_name,omitempty" fake:"{lastname}"` GivenName string `firestore:"given_name,omitempty" json:"given_name,omitempty" fake:"{lastname}"` HonorificPrefix string `firestore:"honorific_prefix,omitempty" json:"honorific_prefix,omitempty"` HonorificSuffix string `firestore:"honorific_suffix,omitempty" json:"honorific_suffix,omitempty"` MiddleName string `firestore:"middle_name,omitempty" json:"middle_name,omitempty" fake:"{lastname}"` PhoneticFamilyName string `firestore:"phonetic_family_name,omitempty" json:"phonetic_family_name,omitempty" fake:"{lastname}"` PhoneticFullName string `firestore:"phonetic_full_name,omitempty" json:"phonetic_full_name,omitempty" fake:"{firstname} {lastname}"` PhoneticGivenName string `firestore:"phonetic_given_name,omitempty" json:"phonetic_given_name,omitempty" fake:"{firstname}"` PhoneticHonorificPrefix string `firestore:"phonetic_honorific_prefix,omitempty" json:"phonetic_honorific_prefix,omitempty"` PhoneticHonorificSuffix string `firestore:"phonetic_honorific_suffix,omitempty" json:"phonetic_honorific_suffix,omitempty"` PhoneticMiddleName string `firestore:"phonetic_middle_name,omitempty" json:"phonetic_middle_name,omitempty" fake:"{lastname}"` UnstructuredName string `firestore:"unstructured_name,omitempty" json:"unstructured_name,omitempty" fake:"{firstname} {lastname}"` }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.