You've already forked email-api-client
refactor: restructure EmailRequest and related types for improved clarity and maintainability
All checks were successful
🚀 Publish Release Package / publish (push) Successful in 22s
All checks were successful
🚀 Publish Release Package / publish (push) Successful in 22s
This commit is contained in:
@@ -2,6 +2,34 @@ package client
|
||||
|
||||
import "time"
|
||||
|
||||
type Body struct {
|
||||
Html Data `json:"Html,omitempty"`
|
||||
Text Data `json:"Text,omitempty"`
|
||||
}
|
||||
|
||||
type Data struct {
|
||||
Data string `json:"Data"`
|
||||
}
|
||||
|
||||
type Addresses []string
|
||||
|
||||
type Message struct {
|
||||
Body Body `json:"Body"`
|
||||
Subject Data `json:"Subject"`
|
||||
}
|
||||
|
||||
type EmailRequest struct {
|
||||
Source string `json:"Source"`
|
||||
Destination struct {
|
||||
ToAddresses Addresses `json:"ToAddresses"`
|
||||
CcAddresses Addresses `json:"CcAddresses"`
|
||||
BccAddresses Addresses `json:"BccAddresses"`
|
||||
} `json:"Destination"`
|
||||
Message Message `json:"Message"`
|
||||
ScheduledTime time.Time `json:"ScheduledTime,omitempty"`
|
||||
Catch bool `json:"Catch,omitempty"`
|
||||
}
|
||||
|
||||
type Email struct {
|
||||
Uuid string `json:"uuid"`
|
||||
IsSent uint8 `json:"is_sent"`
|
||||
|
||||
Reference in New Issue
Block a user