@@ -46,6 +46,19 @@ const (
4646 StateOperationTypeUpsert OperationType = 1
4747 // StateOperationTypeDelete represents delete operation type value.
4848 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"
4962 // UndefinedType represents undefined type value.
5063 UndefinedType = "undefined"
5164)
@@ -73,8 +86,8 @@ func (s StateConcurrency) GetPBConcurrency() v1.StateOptions_StateConcurrency {
7386func (o OperationType ) String () string {
7487 names := [... ]string {
7588 UndefinedType ,
76- "upsert" ,
77- "delete" ,
89+ UpsertType ,
90+ DeleteType ,
7891 }
7992 if o < StateOperationTypeUpsert || o > StateOperationTypeDelete {
8093 return UndefinedType
@@ -87,8 +100,8 @@ func (o OperationType) String() string {
87100func (s StateConsistency ) String () string {
88101 names := [... ]string {
89102 UndefinedType ,
90- "eventual" ,
91- "strong" ,
103+ EventualType ,
104+ StrongType ,
92105 }
93106 if s < StateConsistencyEventual || s > StateConsistencyStrong {
94107 return UndefinedType
@@ -101,8 +114,8 @@ func (s StateConsistency) String() string {
101114func (s StateConcurrency ) String () string {
102115 names := [... ]string {
103116 UndefinedType ,
104- "first-write" ,
105- "last-write" ,
117+ FirstWriteType ,
118+ LastWriteType ,
106119 }
107120 if s < StateConcurrencyFirstWrite || s > StateConcurrencyLastWrite {
108121 return UndefinedType
0 commit comments