mirror of
https://github.com/aykhans/slash-e.git
synced 2025-04-16 12:23:12 +00:00
22 lines
535 B
Go
22 lines
535 B
Go
package store
|
|
|
|
import (
|
|
storepb "github.com/yourselfhosted/slash/proto/gen/store"
|
|
)
|
|
|
|
func ConvertRowStatusStringToStorepb(status string) storepb.RowStatus {
|
|
if status == "NORMAL" {
|
|
return storepb.RowStatus_NORMAL
|
|
}
|
|
// Otherwise, fallback to archived status.
|
|
return storepb.RowStatus_ARCHIVED
|
|
}
|
|
|
|
func ConvertVisibilityStringToStorepb(visibility string) storepb.Visibility {
|
|
if visibility == "PUBLIC" {
|
|
return storepb.Visibility_PUBLIC
|
|
}
|
|
// Otherwise, fallback to workspace visibility.
|
|
return storepb.Visibility_WORKSPACE
|
|
}
|