You've already forked email-api-client
We Had To Use Dark Magic To Make This Work
This commit is contained in:
29
client/types.go
Executable file
29
client/types.go
Executable file
@@ -0,0 +1,29 @@
|
||||
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"`
|
||||
}
|
||||
Reference in New Issue
Block a user