mirror of
https://github.com/aykhans/slash-e.git
synced 2025-07-03 20:21:40 +00:00
feat: migrate part of shortcut store to v1
This commit is contained in:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user