aboutsummaryrefslogtreecommitdiffstats
path: root/order_gen.go
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2026-05-13 10:44:57 -0400
committerSam Anthony <sam@samanthony.xyz>2026-05-13 10:45:41 -0400
commit56523fc6a304c09f252449342b10c52f7836c4aa (patch)
tree07cd85a92ba3c1393805a938fbc27b8ad18162b5 /order_gen.go
parent520f392ca5207f5364bbed501615613e3485b84b (diff)
downloadlulu-56523fc6a304c09f252449342b10c52f7836c4aa.zip
create print job
Diffstat (limited to 'order_gen.go')
-rw-r--r--order_gen.go51
1 files changed, 0 insertions, 51 deletions
diff --git a/order_gen.go b/order_gen.go
deleted file mode 100644
index 5b17f05..0000000
--- a/order_gen.go
+++ /dev/null
@@ -1,51 +0,0 @@
-// Code generated by "string-enumer -t OrderStatus --text -o ./order_gen.go ."; DO NOT EDIT.
-package lulu
-
-import (
- "fmt"
-)
-
-// validOrderStatusValues contains a map of all valid OrderStatus values for easy lookup
-var validOrderStatusValues = map[OrderStatus]struct{}{
- OrderCreated: {},
- OrderUnpaid: {},
- OrderPaymentInProgress: {},
- OrderProductionDelayed: {},
- OrderProductionReady: {},
- OrderInProduction: {},
- OrderShipped: {},
- OrderDelivered: {},
- OrderRejected: {},
- OrderCanceled: {},
-}
-
-// Valid validates if a value is a valid OrderStatus
-func (v OrderStatus) Valid() bool {
- _, ok := validOrderStatusValues[v]
- return ok
-}
-
-// OrderStatusValues returns a list of all (valid) OrderStatus values
-func OrderStatusValues() []OrderStatus {
- return []OrderStatus{
- OrderCreated,
- OrderUnpaid,
- OrderPaymentInProgress,
- OrderProductionDelayed,
- OrderProductionReady,
- OrderInProduction,
- OrderShipped,
- OrderDelivered,
- OrderRejected,
- OrderCanceled,
- }
-}
-
-// UnmarshalText takes a text, verifies that it is a correct OrderStatus and unmarshals it
-func (v *OrderStatus) UnmarshalText(text []byte) error {
- if valid := OrderStatus(text).Valid(); !valid {
- return fmt.Errorf("not valid value for OrderStatus: %s", text)
- }
- *v = OrderStatus(text)
- return nil
-}