Documentation ¶
Index ¶
- Constants
- Variables
- func OrderWorkflow(ctx workflow.Context) error
- func RegisterEmail(ctx context.Context, email string) error
- func ScheduleDelivery(ctx context.Context, order TShirtOrder) (time.Time, error)
- func SendDeliveryEmail(ctx context.Context, order TShirtOrder, deliveryDate time.Time) error
- func ShippingWorkflow(ctx workflow.Context, order TShirtOrder) error
- func ValidateColor(ctx context.Context, color string) error
- func ValidateSize(ctx context.Context, size string) error
- type OrderStatus
- type TShirtOrder
Constants ¶
View Source
const ( RegisterStage = "register" SizeStage = "size" ColorStage = "color" ShippingStage = "shipping" )
Variables ¶
View Source
var ( TShirtSizes = []string{ "small", "medium", "large", } TShirtColors = []string{ "red", "blue", "black", } )
Functions ¶
func OrderWorkflow ¶
Workflow is a workflow driven by interaction from a UI.
func ScheduleDelivery ¶
func SendDeliveryEmail ¶
func ShippingWorkflow ¶
func ShippingWorkflow(ctx workflow.Context, order TShirtOrder) error
Types ¶
type OrderStatus ¶
func UpdateOrderWorkflow ¶
type TShirtOrder ¶
Click to show internal directories.
Click to hide internal directories.