Documentation ¶
Index ¶
- Variables
- func Date(date string) string
- func DateTime(t time.Time) string
- func ExtractTypeYearMonth(s string) (emailType string, yearMonth string, err error)
- func RFC3399(t time.Time) string
- func RejoinDate(ym string, dt string) string
- func TypeYearMonth(emailType string, t time.Time) (string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidFormatForTypeYearMonth = errors.New("invalid format: expecting type#year-month") ErrInvalidEmailType = errors.New("invalid email type: expecting inbox or sent") ErrInvalidEmailYear = errors.New("invalid email year: expecting 4 digit integer string") ErrInvalidEmailMonth = errors.New("invalid email type: expecting 2 digit integer string") )
Errors
Functions ¶
func Date ¶ added in v1.10.0
Date formats Date from SMTP headers to RFC3399, as it's used by DynamoDB.
TODO: date from Gmail produce an error
func ExtractTypeYearMonth ¶
ExtractTypeYearMonth parses type-year-month string and returns EmailType and year-month
func RejoinDate ¶
RejoinDate converts year-month and date-time to RFC3399
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.