feat: migrate part of shortcut store to v1

This commit is contained in:
Steven
2023-08-02 21:07:38 +08:00
parent 977ac76928
commit fcf5981b97
14 changed files with 957 additions and 26 deletions

View File

@ -1,5 +1,9 @@
package store
import (
storepb "github.com/boojack/slash/proto/gen/store"
)
// RowStatus is the status for a row.
type RowStatus string
@ -19,3 +23,13 @@ func (e RowStatus) String() string {
}
return ""
}
func convertStorepbRowStatus(status string) storepb.RowStatus {
switch status {
case "NORMAL":
return storepb.RowStatus_NORMAL
case "ARCHIVED":
return storepb.RowStatus_ARCHIVED
}
return storepb.RowStatus_ROW_STATUS_UNSPECIFIED
}