We Had To Use Dark Magic To Make This Work

This commit is contained in:
2023-11-01 10:56:22 -04:00
commit 24a142c6a6
11 changed files with 416 additions and 0 deletions

29
client/types.go Executable file
View 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"`
}