Documentation ¶
Index ¶
Constants ¶
View Source
const ( CredentialsFileName = "client_secret.json" TokenFileName = "request.token" )
Variables ¶
View Source
var GMailDomainNames = []string{"googlemail.com", "gmail.com"}
Functions ¶
Types ¶
type GmailService ¶
type GmailService struct {
// contains filtered or unexported fields
}
func NewGmailService ¶
func NewGmailService(credentialsPath string) *GmailService
func (*GmailService) GetAllUnreadMail ¶
func (service *GmailService) GetAllUnreadMail(context context.Context) ([]Mail, error)
func (*GmailService) MarkMailAsRead ¶
func (service *GmailService) MarkMailAsRead(context context.Context, mail Mail) error
type MailClientService ¶
type MailClientService interface { GetAllUnreadMail(context context.Context) ([]Mail, error) MarkMailAsRead(context context.Context, mail Mail) error }
func NewMailClientService ¶
func NewMailClientService(mailClientConfig *config.MailClientConfig) (MailClientService, error)
type MailClientServiceMock ¶
func (MailClientServiceMock) GetAllUnreadMail ¶
func (service MailClientServiceMock) GetAllUnreadMail(context context.Context) ([]Mail, error)
func (MailClientServiceMock) MarkMailAsRead ¶
func (service MailClientServiceMock) MarkMailAsRead(context context.Context, mail Mail) error
Click to show internal directories.
Click to hide internal directories.