Documentation ¶
Index ¶
- Constants
- func GetContactCollection() string
- func GetContactLogCollection() string
- func GetContactSourceCollection() string
- func GetContactUpdatesCollection() string
- func GetGoogleContactsCollection() string
- func GetLinkSuggestionsCollection() string
- func GetNoteCollection() string
- func GetTagCollection() string
- func GetUnifiedContactsCollection() string
- func GetUserCollection() string
- func NewFirestoreClient(projectID string, opt ...option.ClientOption) (c *firestore.Client, err error)
- type ContactLogFirestore
- func (u *ContactLogFirestore) Create(ctx context.Context, userId domain.UserID, log domain.ContactLog) (created *domain.ContactLog, err error)
- func (u *ContactLogFirestore) Delete(ctx context.Context, userId domain.UserID, id domain.ContactLogId) error
- func (u *ContactLogFirestore) Get(ctx context.Context, id domain.UserID, limit int, ...) (logs []domain.ContactLog, err error)
- func (u *ContactLogFirestore) GetById(ctx context.Context, userId domain.UserID, id domain.ContactLogId) (link domain.ContactLog, err error)
- func (u *ContactLogFirestore) GetByUnifiedId(ctx context.Context, userId domain.UserID, unifiedId domain.UnifiedId) (logs []domain.ContactLog, err error)
- func (u *ContactLogFirestore) Save(ctx context.Context, userId domain.UserID, id domain.ContactLogId, ...) (err error)
- type ContactSourceFirestore
- func (u *ContactSourceFirestore) Create(ctx context.Context, id domain.UserID, source domain.ContactSource) (created *domain.ContactSource, err error)
- func (u *ContactSourceFirestore) Delete(ctx context.Context, id domain.UserID, sourceId domain.ContactSourceID) error
- func (u *ContactSourceFirestore) Get(ctx context.Context, id domain.UserID, limit int, ...) (sources []domain.ContactSource, err error)
- func (u *ContactSourceFirestore) GetAll(ctx context.Context, id domain.UserID) (sources []domain.ContactSource, err error)
- func (u *ContactSourceFirestore) GetByEmail(ctx context.Context, id domain.UserID, email string, source domain.Source) (cs *domain.ContactSource, err error)
- func (u *ContactSourceFirestore) GetById(ctx context.Context, id domain.UserID, sourceId domain.ContactSourceID) (source domain.ContactSource, err error)
- func (u ContactSourceFirestore) GetByNextUpdateAt(ctx context.Context, before time.Time) (sources []domain.ContactSource, err error)
- func (u *ContactSourceFirestore) Save(ctx context.Context, id domain.UserID, sourceId domain.ContactSourceID, ...) (created *domain.ContactSource, err error)
- func (u ContactSourceFirestore) UpdateByMap(ctx context.Context, uID domain.UserID, sourceId domain.ContactSourceID, ...) (err error)
- type DefaultContactsFirestore
- func (store *DefaultContactsFirestore) BulkDeleteContacts(ctx context.Context, uID domain.UserID, contactIds []domain.ContactID) (err error)
- func (store DefaultContactsFirestore) DeleteAllContacts(ctx context.Context, uID domain.UserID) error
- func (u DefaultContactsFirestore) DeleteContact(ctx context.Context, uID domain.UserID, contactID domain.ContactID) error
- func (u DefaultContactsFirestore) GetAllContacts(ctx context.Context, uID domain.UserID) ([]domain.Contact, error)
- func (u DefaultContactsFirestore) GetContactByID(ctx context.Context, uID domain.UserID, cID domain.ContactID) (user *domain.Contact, err error)
- func (u DefaultContactsFirestore) GetContacts(ctx context.Context, uID domain.UserID, limit int, ...) ([]domain.Contact, error)
- func (u *DefaultContactsFirestore) GetContactsByLastContact(ctx context.Context, uID domain.UserID, after time.Time, limit int, ...) ([]domain.Contact, error)
- func (u *DefaultContactsFirestore) GetContactsByNextContact(ctx context.Context, uID domain.UserID, before time.Time, limit int, ...) ([]domain.Contact, error)
- func (u DefaultContactsFirestore) SaveContact(ctx context.Context, uID domain.UserID, user domain.Contact) (created *domain.Contact, err error)
- func (u DefaultContactsFirestore) UpdateContact(ctx context.Context, uID domain.UserID, cID domain.ContactID, ...) (err error)
- type GoogleContactsFirestore
- func (store *GoogleContactsFirestore) BulkDeleteContacts(ctx context.Context, uID domain.UserID, sourceId domain.ContactSourceID, ...) (err error)
- func (u *GoogleContactsFirestore) Create(ctx context.Context, id domain.UserID, sourceId domain.ContactSourceID, ...) (created *domain.GoogleContact, err error)
- func (u *GoogleContactsFirestore) Get(ctx context.Context, id domain.UserID, sourceId domain.ContactSourceID, ...) (contact domain.GoogleContact, err error)
- func (u *GoogleContactsFirestore) GetAll(ctx context.Context, uID domain.UserID, sourceId domain.ContactSourceID) ([]domain.GoogleContact, error)
- func (u *GoogleContactsFirestore) List(ctx context.Context, id domain.UserID, sourceId domain.ContactSourceID, ...) (contacts []domain.GoogleContact, err error)
- func (u *GoogleContactsFirestore) Update(ctx context.Context, id domain.UserID, sourceId domain.ContactSourceID, ...) (err error)
- type LinkSuggestionFirestore
- func (u *LinkSuggestionFirestore) Create(ctx context.Context, userId domain.UserID, suggestion domain.LinkSuggestion) (created *domain.LinkSuggestion, err error)
- func (u *LinkSuggestionFirestore) Delete(ctx context.Context, userId domain.UserID, id domain.LinkSuggestionID) error
- func (u *LinkSuggestionFirestore) Get(ctx context.Context, id domain.UserID, limit int, ...) (suggestions []domain.LinkSuggestion, err error)
- func (u *LinkSuggestionFirestore) GetAll(ctx context.Context, id domain.UserID) (suggestions []domain.LinkSuggestion, err error)
- func (u *LinkSuggestionFirestore) GetById(ctx context.Context, userId domain.UserID, id domain.LinkSuggestionID) (link domain.LinkSuggestion, err error)
- func (u *LinkSuggestionFirestore) GetByKeyValue(ctx context.Context, userId domain.UserID, key domain.LinkSuggestionKey, ...) (link domain.LinkSuggestion, err error)
- func (u *LinkSuggestionFirestore) Save(ctx context.Context, userId domain.UserID, id domain.LinkSuggestionID, ...) (err error)
- type NoteFirestore
- func (u NoteFirestore) DeleteAllNotes(ctx context.Context, uID domain.UserID, cID domain.UnifiedId) error
- func (u NoteFirestore) DeleteNote(ctx context.Context, uID domain.UserID, cID domain.UnifiedId, ...) error
- func (u NoteFirestore) GetAllNotes(ctx context.Context, uID domain.UserID, cID domain.UnifiedId) (notes []domain.Note, err error)
- func (u NoteFirestore) GetNoteByID(ctx context.Context, uID domain.UserID, cID domain.UnifiedId, ...) (*domain.Note, error)
- func (u NoteFirestore) GetNotes(ctx context.Context, uID domain.UserID, cID domain.UnifiedId, limit int, ...) (notes []domain.Note, err error)
- func (u NoteFirestore) SaveNote(ctx context.Context, uID domain.UserID, cID domain.UnifiedId, note domain.Note) (created *domain.Note, err error)
- func (u NoteFirestore) UpdateNote(ctx context.Context, uID domain.UserID, cID domain.UnifiedId, ...) error
- type TagFirestore
- func (u TagFirestore) DeleteAllTags(ctx context.Context, uID domain.UserID, cID domain.UnifiedId) error
- func (u TagFirestore) DeleteTag(ctx context.Context, uID domain.UserID, cID domain.UnifiedId, tID domain.TagID) error
- func (u TagFirestore) GetAllTags(ctx context.Context, uID domain.UserID, cID domain.UnifiedId) (tags []domain.Tag, err error)
- func (u TagFirestore) GetTagByID(ctx context.Context, uID domain.UserID, cID domain.UnifiedId, tID domain.TagID) (*domain.Tag, error)
- func (u TagFirestore) GetTags(ctx context.Context, uID domain.UserID, cID domain.UnifiedId, limit int, ...) (tags []domain.Tag, err error)
- func (u TagFirestore) SaveTag(ctx context.Context, uID domain.UserID, cID domain.UnifiedId, tag domain.Tag) (created *domain.Tag, err error)
- func (u TagFirestore) UpdateTag(ctx context.Context, uID domain.UserID, cID domain.UnifiedId, tID domain.TagID, ...) error
- type UnifiedContactFirestore
- func (store UnifiedContactFirestore) BulkDeleteContacts(ctx context.Context, uID domain.UserID, contactIDs []domain.UnifiedId) error
- func (store *UnifiedContactFirestore) BulkUpdateContacts(ctx context.Context, uID domain.UserID, ...) (err error)
- func (store UnifiedContactFirestore) DeleteAllContacts(ctx context.Context, uID domain.UserID) error
- func (u UnifiedContactFirestore) DeleteContact(ctx context.Context, uID domain.UserID, contactID domain.UnifiedId) error
- func (u UnifiedContactFirestore) GetAllContacts(ctx context.Context, uID domain.UserID) ([]domain.Unified, error)
- func (u UnifiedContactFirestore) GetByIDs(ctx context.Context, uID domain.UserID, unifiedIds []domain.UnifiedId) (users []domain.Unified, err error)
- func (u UnifiedContactFirestore) GetContactByID(ctx context.Context, uID domain.UserID, cID domain.UnifiedId) (user *domain.Unified, err error)
- func (u *UnifiedContactFirestore) GetContactByOrigin(ctx context.Context, uID domain.UserID, origin domain.ContactOrigin) (unified domain.Unified, err error)
- func (u *UnifiedContactFirestore) GetContactBySearchTerms(ctx context.Context, uID domain.UserID, terms []string) (contacts []domain.Unified, err error)
- func (u UnifiedContactFirestore) GetContacts(ctx context.Context, uID domain.UserID, limit int, ...) ([]domain.Unified, error)
- func (u *UnifiedContactFirestore) GetContactsByLastContact(ctx context.Context, uID domain.UserID, after time.Time, limit int, ...) ([]domain.Unified, error)
- func (u *UnifiedContactFirestore) GetContactsByNextContact(ctx context.Context, uID domain.UserID, before time.Time, limit int, ...) ([]domain.Unified, error)
- func (u UnifiedContactFirestore) SaveContact(ctx context.Context, uID domain.UserID, user domain.Unified) (created *domain.Unified, err error)
- func (u UnifiedContactFirestore) UpdateContact(ctx context.Context, uID domain.UserID, cID domain.UnifiedId, ...) (err error)
- type UserFirestore
- func (u UserFirestore) DeleteUser(ctx context.Context, uID domain.UserID) error
- func (u UserFirestore) GetUserByID(ctx context.Context, uID domain.UserID) (user *domain.User, err error)
- func (u UserFirestore) SaveUser(ctx context.Context, uID domain.UserID, user domain.User) (created *domain.User, err error)
- func (u UserFirestore) UpdateUser(ctx context.Context, uID domain.UserID, update domain.User) (err error)
Constants ¶
const DefaultContactSourceId domain.ContactSourceID = "default"
Variables ¶
This section is empty.
Functions ¶
func GetContactCollection ¶
func GetContactCollection() string
GetContactCollection returns name of contact collection in Firestore
func GetContactLogCollection ¶
func GetContactLogCollection() string
func GetContactSourceCollection ¶
func GetContactSourceCollection() string
GetContactSourceCollection returns name of tag collection in Firestore
func GetContactUpdatesCollection ¶
func GetContactUpdatesCollection() string
GetContactUpdatesCollection returns name of contact-updates collection in Firestore
func GetGoogleContactsCollection ¶
func GetGoogleContactsCollection() string
GetGoogleContactsCollection returns name of contacts collection for storing google contacts
func GetLinkSuggestionsCollection ¶
func GetLinkSuggestionsCollection() string
GetLinkSuggestionsCollection returns name of tag collection in Firestore
func GetNoteCollection ¶
func GetNoteCollection() string
GetNoteCollection returns name of note collection in Firestore
func GetTagCollection ¶
func GetTagCollection() string
GetTagCollection returns name of tag collection in Firestore
func GetUnifiedContactsCollection ¶
func GetUnifiedContactsCollection() string
GetUserCollection returns name of users collection in Firestore
func GetUserCollection ¶
func GetUserCollection() string
GetUserCollection returns name of users collection in Firestore
func NewFirestoreClient ¶
func NewFirestoreClient(projectID string, opt ...option.ClientOption) (c *firestore.Client, err error)
NewFirestoreClient returns ref to a new firestoreClient object
Types ¶
type ContactLogFirestore ¶
type ContactLogFirestore struct {
// contains filtered or unexported fields
}
func NewContactLogFirestore ¶
func NewContactLogFirestore(c *firestore.Client) *ContactLogFirestore
func (*ContactLogFirestore) Create ¶
func (u *ContactLogFirestore) Create(ctx context.Context, userId domain.UserID, log domain.ContactLog) (created *domain.ContactLog, err error)
func (*ContactLogFirestore) Delete ¶
func (u *ContactLogFirestore) Delete(ctx context.Context, userId domain.UserID, id domain.ContactLogId) error
func (*ContactLogFirestore) Get ¶
func (u *ContactLogFirestore) Get(ctx context.Context, id domain.UserID, limit int, lastDocumentId *domain.ContactLogId) (logs []domain.ContactLog, err error)
func (*ContactLogFirestore) GetById ¶
func (u *ContactLogFirestore) GetById(ctx context.Context, userId domain.UserID, id domain.ContactLogId) (link domain.ContactLog, err error)
func (*ContactLogFirestore) GetByUnifiedId ¶
func (u *ContactLogFirestore) GetByUnifiedId(ctx context.Context, userId domain.UserID, unifiedId domain.UnifiedId) (logs []domain.ContactLog, err error)
func (*ContactLogFirestore) Save ¶
func (u *ContactLogFirestore) Save(ctx context.Context, userId domain.UserID, id domain.ContactLogId, log domain.ContactLog) (err error)
type ContactSourceFirestore ¶
type ContactSourceFirestore struct {
// contains filtered or unexported fields
}
func NewContactSourceFirestore ¶
func NewContactSourceFirestore(c *firestore.Client) *ContactSourceFirestore
func (*ContactSourceFirestore) Create ¶
func (u *ContactSourceFirestore) Create(ctx context.Context, id domain.UserID, source domain.ContactSource) (created *domain.ContactSource, err error)
func (*ContactSourceFirestore) Delete ¶
func (u *ContactSourceFirestore) Delete(ctx context.Context, id domain.UserID, sourceId domain.ContactSourceID) error
func (*ContactSourceFirestore) Get ¶
func (u *ContactSourceFirestore) Get(ctx context.Context, id domain.UserID, limit int, lastDocumentId *domain.ContactSourceID) (sources []domain.ContactSource, err error)
func (*ContactSourceFirestore) GetAll ¶
func (u *ContactSourceFirestore) GetAll(ctx context.Context, id domain.UserID) (sources []domain.ContactSource, err error)
func (*ContactSourceFirestore) GetByEmail ¶
func (*ContactSourceFirestore) GetById ¶
func (u *ContactSourceFirestore) GetById(ctx context.Context, id domain.UserID, sourceId domain.ContactSourceID) (source domain.ContactSource, err error)
func (ContactSourceFirestore) GetByNextUpdateAt ¶
func (u ContactSourceFirestore) GetByNextUpdateAt(ctx context.Context, before time.Time) (sources []domain.ContactSource, err error)
func (*ContactSourceFirestore) Save ¶
func (u *ContactSourceFirestore) Save(ctx context.Context, id domain.UserID, sourceId domain.ContactSourceID, source domain.ContactSource) (created *domain.ContactSource, err error)
func (ContactSourceFirestore) UpdateByMap ¶
func (u ContactSourceFirestore) UpdateByMap(ctx context.Context, uID domain.UserID, sourceId domain.ContactSourceID, updates map[string]interface{}) (err error)
type DefaultContactsFirestore ¶
type DefaultContactsFirestore struct {
// contains filtered or unexported fields
}
func NewDefaultContactsFirestore ¶
func NewDefaultContactsFirestore(c *firestore.Client) *DefaultContactsFirestore
func (*DefaultContactsFirestore) BulkDeleteContacts ¶
func (DefaultContactsFirestore) DeleteAllContacts ¶
func (store DefaultContactsFirestore) DeleteAllContacts(ctx context.Context, uID domain.UserID) error
delete pipeline to delete all contacts and relates notes and tags
func (DefaultContactsFirestore) DeleteContact ¶
func (DefaultContactsFirestore) GetAllContacts ¶
func (DefaultContactsFirestore) GetContactByID ¶
func (DefaultContactsFirestore) GetContacts ¶
func (*DefaultContactsFirestore) GetContactsByLastContact ¶
func (*DefaultContactsFirestore) GetContactsByNextContact ¶
func (DefaultContactsFirestore) SaveContact ¶
type GoogleContactsFirestore ¶
type GoogleContactsFirestore struct {
// contains filtered or unexported fields
}
func NewGoogleContactsFirestore ¶
func NewGoogleContactsFirestore(c *firestore.Client) *GoogleContactsFirestore
func (*GoogleContactsFirestore) BulkDeleteContacts ¶
func (store *GoogleContactsFirestore) BulkDeleteContacts(ctx context.Context, uID domain.UserID, sourceId domain.ContactSourceID, contactIds []domain.ContactID) (err error)
func (*GoogleContactsFirestore) Create ¶
func (u *GoogleContactsFirestore) Create(ctx context.Context, id domain.UserID, sourceId domain.ContactSourceID, personId string, contact domain.GoogleContact) (created *domain.GoogleContact, err error)
func (*GoogleContactsFirestore) Get ¶
func (u *GoogleContactsFirestore) Get(ctx context.Context, id domain.UserID, sourceId domain.ContactSourceID, personId string) (contact domain.GoogleContact, err error)
func (*GoogleContactsFirestore) GetAll ¶
func (u *GoogleContactsFirestore) GetAll(ctx context.Context, uID domain.UserID, sourceId domain.ContactSourceID) ([]domain.GoogleContact, error)
func (*GoogleContactsFirestore) List ¶
func (u *GoogleContactsFirestore) List(ctx context.Context, id domain.UserID, sourceId domain.ContactSourceID, limit int, lastDocumentId *string) (contacts []domain.GoogleContact, err error)
func (*GoogleContactsFirestore) Update ¶
func (u *GoogleContactsFirestore) Update(ctx context.Context, id domain.UserID, sourceId domain.ContactSourceID, personId string, contact domain.GoogleContact) (err error)
type LinkSuggestionFirestore ¶
type LinkSuggestionFirestore struct {
// contains filtered or unexported fields
}
func NewLinkSuggestionFirestore ¶
func NewLinkSuggestionFirestore(c *firestore.Client) *LinkSuggestionFirestore
func (*LinkSuggestionFirestore) Create ¶
func (u *LinkSuggestionFirestore) Create(ctx context.Context, userId domain.UserID, suggestion domain.LinkSuggestion) (created *domain.LinkSuggestion, err error)
func (*LinkSuggestionFirestore) Delete ¶
func (u *LinkSuggestionFirestore) Delete(ctx context.Context, userId domain.UserID, id domain.LinkSuggestionID) error
func (*LinkSuggestionFirestore) Get ¶
func (u *LinkSuggestionFirestore) Get(ctx context.Context, id domain.UserID, limit int, lastDocumentId *domain.LinkSuggestionID) (suggestions []domain.LinkSuggestion, err error)
func (*LinkSuggestionFirestore) GetAll ¶
func (u *LinkSuggestionFirestore) GetAll(ctx context.Context, id domain.UserID) (suggestions []domain.LinkSuggestion, err error)
func (*LinkSuggestionFirestore) GetById ¶
func (u *LinkSuggestionFirestore) GetById(ctx context.Context, userId domain.UserID, id domain.LinkSuggestionID) (link domain.LinkSuggestion, err error)
func (*LinkSuggestionFirestore) GetByKeyValue ¶
func (u *LinkSuggestionFirestore) GetByKeyValue(ctx context.Context, userId domain.UserID, key domain.LinkSuggestionKey, value string) (link domain.LinkSuggestion, err error)
func (*LinkSuggestionFirestore) Save ¶
func (u *LinkSuggestionFirestore) Save(ctx context.Context, userId domain.UserID, id domain.LinkSuggestionID, suggestion domain.LinkSuggestion) (err error)
type NoteFirestore ¶
type NoteFirestore struct {
// contains filtered or unexported fields
}
func NewNoteFirestore ¶
func NewNoteFirestore(c *firestore.Client) *NoteFirestore
func (NoteFirestore) DeleteAllNotes ¶
func (NoteFirestore) DeleteNote ¶
func (NoteFirestore) GetAllNotes ¶
func (NoteFirestore) GetNoteByID ¶
type TagFirestore ¶
type TagFirestore struct {
// contains filtered or unexported fields
}
func NewTagFirestore ¶
func NewTagFirestore(c *firestore.Client) *TagFirestore
func (TagFirestore) DeleteAllTags ¶
func (TagFirestore) GetAllTags ¶
func (TagFirestore) GetTagByID ¶
type UnifiedContactFirestore ¶
type UnifiedContactFirestore struct {
// contains filtered or unexported fields
}
func NewUnifiedContactFirestore ¶
func NewUnifiedContactFirestore(c *firestore.Client) *UnifiedContactFirestore
func (UnifiedContactFirestore) BulkDeleteContacts ¶
func (store UnifiedContactFirestore) BulkDeleteContacts(ctx context.Context, uID domain.UserID, contactIDs []domain.UnifiedId) error
delete pipeline to delete all contacts and relates notes and tags
func (*UnifiedContactFirestore) BulkUpdateContacts ¶
func (UnifiedContactFirestore) DeleteAllContacts ¶
func (store UnifiedContactFirestore) DeleteAllContacts(ctx context.Context, uID domain.UserID) error
delete pipeline to delete all contacts and relates notes and tags
func (UnifiedContactFirestore) DeleteContact ¶
func (UnifiedContactFirestore) GetAllContacts ¶
func (UnifiedContactFirestore) GetContactByID ¶
func (*UnifiedContactFirestore) GetContactByOrigin ¶
func (u *UnifiedContactFirestore) GetContactByOrigin(ctx context.Context, uID domain.UserID, origin domain.ContactOrigin) (unified domain.Unified, err error)
func (*UnifiedContactFirestore) GetContactBySearchTerms ¶
func (UnifiedContactFirestore) GetContacts ¶
func (*UnifiedContactFirestore) GetContactsByLastContact ¶
func (*UnifiedContactFirestore) GetContactsByNextContact ¶
func (UnifiedContactFirestore) SaveContact ¶
type UserFirestore ¶
type UserFirestore struct {
// contains filtered or unexported fields
}
func NewUserFirestore ¶
func NewUserFirestore(c *firestore.Client) *UserFirestore
func (UserFirestore) DeleteUser ¶
func (UserFirestore) GetUserByID ¶
func (UserFirestore) UpdateUser ¶
func (u UserFirestore) UpdateUser(ctx context.Context, uID domain.UserID, update domain.User) (err error)
Patch