Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var VoicemailCollection = "voicemails"
VoicemailCollection is the mongodb collection name.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database interface { Create(ctx context.Context, record *v1alpha.VoiceMailRecord) error Search(ctx context.Context, opt *SearchOptions) ([]v1alpha.VoiceMailRecord, error) UpdateSeenFlag(ctx context.Context, id string, seen bool) error ByID(ctx context.Context, id string) (*v1alpha.VoiceMailRecord, error) }
Database defines the interface to create and search for voicemail records.
type SearchOptions ¶
type SearchOptions struct {
dbutils.SimpleQueryBuilder
}
SearchOptions defines the criteria when searching for voicemail records.
func (*SearchOptions) ByCustomer ¶
func (opts *SearchOptions) ByCustomer(source, id string) *SearchOptions
ByCustomer searches for voicemail records from the given customer.
func (*SearchOptions) ByDate ¶
func (opts *SearchOptions) ByDate(d time.Time) *SearchOptions
ByDate only searches for voicemail records from the given date.
func (*SearchOptions) BySeen ¶
func (opts *SearchOptions) BySeen(seen bool) *SearchOptions
BySeen only searches for voicemail records that match seen.
func (*SearchOptions) ByVoiceMail ¶
func (opts *SearchOptions) ByVoiceMail(name string) *SearchOptions
ByVoiceMail searches for voicemail records that are stored in the specified voicemail.
type VoicemailEvent ¶
type VoicemailEvent struct { VoiceMail string `json:"voiceMail,omitempty" bson:"voiceMail,omitempty"` From string `json:"from,omitempty" bson:"from,omitempty"` CustomerID string `json:"customerID,omitempty" bson:"customerID,omitempty"` CustomerSource string `json:"customerSource,omitempty" bson:"customerSource,omitempty"` Read bool `json:"read,omitempty" bson:"read,omitempty"` ID primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"` CountUnread int `json:"countUnread" bson:"countUnread"` }
VoiceMailEvent is fired when a voicemail message is read or unread.
Click to show internal directories.
Click to hide internal directories.