Documentation ¶
Index ¶
- Constants
- type Label
- type LabelsDoc
- type Message
- type MessageResponse
- type MessageSearch
- type RawMessageSearch
- type Service
- func (s *Service) FindLabelId(labelName string) (string, error)
- func (s *Service) GetLabels(userOnly bool) ([]*Label, error)
- func (s *Service) GetMessage(id string) (Message, error)
- func (s *Service) GetMessages(req *elastic.SearchService) ([]*Message, error)
- func (s *Service) GetStats() (Stats, error)
- func (s *Service) NewRawMessageSearch(q string) RawMessageSearch
- func (s *Service) NewStructuredMessageSearch() StructuredMessageSearch
- func (s *Service) SaveLabels(labels []*Label) error
- func (s *Service) SaveMessage(data Message, responses chan<- *MessageResponse) error
- type Stats
- type StructuredMessageSearch
- func (s StructuredMessageSearch) BodyOrSubject(term string) StructuredMessageSearch
- func (s StructuredMessageSearch) DateRange(d1, d2, tz string) StructuredMessageSearch
- func (s StructuredMessageSearch) Do() ([]*Message, error)
- func (s StructuredMessageSearch) Label(labelName string) StructuredMessageSearch
- func (s StructuredMessageSearch) Participants(participants string) StructuredMessageSearch
- func (s StructuredMessageSearch) QueryString() string
- func (s StructuredMessageSearch) Size(size int) StructuredMessageSearch
- func (s StructuredMessageSearch) Sort(field string, asc bool) StructuredMessageSearch
- func (s StructuredMessageSearch) Starred(starred bool) StructuredMessageSearch
Constants ¶
View Source
const LabelsIndex = "labels"
View Source
const MailIndex = "mail"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MessageResponse ¶
type MessageResponse struct { Message Message Response *elastic.IndexResponse }
type MessageSearch ¶
type RawMessageSearch ¶
type RawMessageSearch struct {
// contains filtered or unexported fields
}
func (RawMessageSearch) Do ¶
func (r RawMessageSearch) Do() ([]*Message, error)
func (RawMessageSearch) QueryString ¶
func (r RawMessageSearch) QueryString() string
type Service ¶
type Service struct { Client *elastic.Client Ctx context.Context MailIndex string LabelsIndex string }
func (*Service) GetMessages ¶
func (s *Service) GetMessages(req *elastic.SearchService) ([]*Message, error)
func (*Service) NewRawMessageSearch ¶
func (s *Service) NewRawMessageSearch(q string) RawMessageSearch
func (*Service) NewStructuredMessageSearch ¶
func (s *Service) NewStructuredMessageSearch() StructuredMessageSearch
func (*Service) SaveLabels ¶
func (*Service) SaveMessage ¶
func (s *Service) SaveMessage(data Message, responses chan<- *MessageResponse) error
type StructuredMessageSearch ¶
type StructuredMessageSearch struct {
// contains filtered or unexported fields
}
func (StructuredMessageSearch) BodyOrSubject ¶
func (s StructuredMessageSearch) BodyOrSubject(term string) StructuredMessageSearch
func (StructuredMessageSearch) DateRange ¶
func (s StructuredMessageSearch) DateRange(d1, d2, tz string) StructuredMessageSearch
func (StructuredMessageSearch) Do ¶
func (s StructuredMessageSearch) Do() ([]*Message, error)
func (StructuredMessageSearch) Label ¶
func (s StructuredMessageSearch) Label(labelName string) StructuredMessageSearch
func (StructuredMessageSearch) Participants ¶
func (s StructuredMessageSearch) Participants(participants string) StructuredMessageSearch
func (StructuredMessageSearch) QueryString ¶
func (s StructuredMessageSearch) QueryString() string
func (StructuredMessageSearch) Size ¶
func (s StructuredMessageSearch) Size(size int) StructuredMessageSearch
func (StructuredMessageSearch) Sort ¶
func (s StructuredMessageSearch) Sort(field string, asc bool) StructuredMessageSearch
func (StructuredMessageSearch) Starred ¶
func (s StructuredMessageSearch) Starred(starred bool) StructuredMessageSearch
Click to show internal directories.
Click to hide internal directories.