feat: abstract database drivers

This commit is contained in:
Steven
2023-12-17 13:56:41 +08:00
parent 6350b19478
commit 9173c8f19a
39 changed files with 1707 additions and 1356 deletions

View File

@ -1,9 +1,5 @@
package store
import (
storepb "github.com/yourselfhosted/slash/proto/gen/store"
)
// RowStatus is the status for a row.
type RowStatus string
@ -24,16 +20,6 @@ func (e RowStatus) String() string {
return ""
}
func convertRowStatusStringToStorepb(status string) storepb.RowStatus {
switch status {
case "NORMAL":
return storepb.RowStatus_NORMAL
case "ARCHIVED":
return storepb.RowStatus_ARCHIVED
}
return storepb.RowStatus_ROW_STATUS_UNSPECIFIED
}
// Visibility is the type of a visibility.
type Visibility string