mirror of https://github.com/dapr/quickstarts.git
44 lines
1000 B
Go
44 lines
1000 B
Go
package main
|
|
|
|
type OrderPayload struct {
|
|
ItemName string `json:"item_name"`
|
|
TotalCost int `json:"total_cost"`
|
|
Quantity int `json:"quantity"`
|
|
}
|
|
|
|
type OrderResult struct {
|
|
Processed bool `json:"processed"`
|
|
}
|
|
|
|
type InventoryItem struct {
|
|
ItemName string `json:"item_name"`
|
|
PerItemCost int `json:"per_item_cost"`
|
|
Quantity int `json:"quantity"`
|
|
}
|
|
|
|
type InventoryRequest struct {
|
|
RequestID string `json:"request_id"`
|
|
ItemName string `json:"item_name"`
|
|
Quantity int `json:"quantity"`
|
|
}
|
|
|
|
type InventoryResult struct {
|
|
Success bool `json:"success"`
|
|
InventoryItem InventoryItem `json:"inventory_item"`
|
|
}
|
|
|
|
type PaymentRequest struct {
|
|
RequestID string `json:"request_id"`
|
|
ItemBeingPurchased string `json:"item_being_purchased"`
|
|
Amount int `json:"amount"`
|
|
Quantity int `json:"quantity"`
|
|
}
|
|
|
|
type ApprovalRequired struct {
|
|
Approval bool `json:"approval"`
|
|
}
|
|
|
|
type Notification struct {
|
|
Message string `json:"message"`
|
|
}
|