Documentation
¶
Index ¶
Constants ¶
View Source
const (
// Email represents the notification type of email
Email = "email"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct { Line1 string `json:"line1" validate:"required"` Line2 string `json:"line2,omitempty"` City string `json:"city" validate:"required"` State string `json:"state" validate:"required"` PostalCode string `json:"postalCode" validate:"required"` }
Address represents an customers address
type Customer ¶
type Customer struct { FirstName string `json:"firstName" validate:"required"` LastName string `json:"lastName" validate:"required"` EmailAddress string `json:"emailAddress" validate:"required"` ShippingAddress Address `json:"shippingAddress" validate:"required,dive"` }
Customer represents information about the customer placing the order
type Health ¶
type Health struct {
Status string `json:"status"`
}
Health struct to describe health object.
type Notification ¶
type Notification struct { Type NotificationType `json:"type"` Recipient string `json:"recipient"` From string `json:"from"` Subject string `json:"subject"` Body string `json:"body"` }
Notification represent a notification to be sent
type NotificationType ¶
type NotificationType string
NotificationType the supported types of notifications
func (NotificationType) IsValid ¶
func (nt NotificationType) IsValid() error
IsValid returns true if the notification type is valid
func (*NotificationType) UnmarshalJSON ¶
func (nt *NotificationType) UnmarshalJSON(b []byte) error
UnmarshalJSON will unmarshall the notification type
type Order ¶
type Order struct { ID uuid.UUID `json:"id,omitempty" validate:"required,uuid"` Products []Product `json:"products" validate:"required,dive"` Customer Customer `json:"customer" validate:"required,dive"` }
Order represents a collection of products that should be shipped to the specified shipping address
Click to show internal directories.
Click to hide internal directories.