feat(clientcache): add sort parameters to SearchParams

llb-desktop-client-sort-backup
Sepehr 4 months ago
parent a68efbfe97
commit 572b5af4b9

@ -25,6 +25,15 @@ const (
SortByCreatedAt SortBy = "created_at"
)
// Valid returns true if the SortBy value is a known good value
func (s SortBy) Valid() bool {
switch s {
case SortByDefault, SortByName, SortByCreatedAt:
return true
}
return false
}
type SortDirection string
const (
@ -33,6 +42,15 @@ const (
Descending SortDirection = "desc"
)
// Valid returns true if the SortDirection value is a known good value
func (d SortDirection) Valid() bool {
switch d {
case SortDirectionDefault, Ascending, Descending:
return true
}
return false
}
type SearchableResource string
const (

Loading…
Cancel
Save