You've already forked email-api-client
30 lines
744 B
Go
Executable File
30 lines
744 B
Go
Executable File
package client
|
|
|
|
import "time"
|
|
|
|
type Email struct {
|
|
Uuid string `json:"uuid"`
|
|
IsSent uint8 `json:"is_sent"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
SentTime time.Time `json:"sent_time"`
|
|
To string `json:"to"`
|
|
From string `json:"from"`
|
|
Subject string `json:"subject"`
|
|
Body string `json:"body,omitempty"`
|
|
}
|
|
|
|
type EmailResponse struct {
|
|
Emails []Email `json:"emails"`
|
|
Page uint16 `json:"page"`
|
|
AvailablePages uint16 `json:"availablePages"`
|
|
Total uint16 `json:"total"`
|
|
}
|
|
|
|
type Response[T any] struct {
|
|
Payload T `json:"payload"`
|
|
Time uint32 `json:"time"`
|
|
Version string `json:"version"`
|
|
Status string `json:"status"`
|
|
Md5 string `json:"md5"`
|
|
}
|