@@ -46,6 +46,19 @@ const (
46
46
StateOperationTypeUpsert OperationType = 1
47
47
// StateOperationTypeDelete represents delete operation type value.
48
48
StateOperationTypeDelete OperationType = 2
49
+
50
+ // EventualType represents the eventual type value.
51
+ EventualType = "eventual"
52
+ // StrongType represents the strong type value.
53
+ StrongType = "strong"
54
+ // FirstWriteType represents the first write type value.
55
+ FirstWriteType = "first-write"
56
+ // LastWriteType represents the last write type value.
57
+ LastWriteType = "last-write"
58
+ // UpsertType represents the upsert type value.
59
+ UpsertType = "upsert"
60
+ // DeleteType represents the delete type value.
61
+ DeleteType = "delete"
49
62
// UndefinedType represents undefined type value.
50
63
UndefinedType = "undefined"
51
64
)
@@ -73,8 +86,8 @@ func (s StateConcurrency) GetPBConcurrency() v1.StateOptions_StateConcurrency {
73
86
func (o OperationType ) String () string {
74
87
names := [... ]string {
75
88
UndefinedType ,
76
- "upsert" ,
77
- "delete" ,
89
+ UpsertType ,
90
+ DeleteType ,
78
91
}
79
92
if o < StateOperationTypeUpsert || o > StateOperationTypeDelete {
80
93
return UndefinedType
@@ -87,8 +100,8 @@ func (o OperationType) String() string {
87
100
func (s StateConsistency ) String () string {
88
101
names := [... ]string {
89
102
UndefinedType ,
90
- "eventual" ,
91
- "strong" ,
103
+ EventualType ,
104
+ StrongType ,
92
105
}
93
106
if s < StateConsistencyEventual || s > StateConsistencyStrong {
94
107
return UndefinedType
@@ -101,8 +114,8 @@ func (s StateConsistency) String() string {
101
114
func (s StateConcurrency ) String () string {
102
115
names := [... ]string {
103
116
UndefinedType ,
104
- "first-write" ,
105
- "last-write" ,
117
+ FirstWriteType ,
118
+ LastWriteType ,
106
119
}
107
120
if s < StateConcurrencyFirstWrite || s > StateConcurrencyLastWrite {
108
121
return UndefinedType
0 commit comments