Mike Schwörer
62f2ce9268
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 2m56s
19 lines
274 B
Go
19 lines
274 B
Go
package cursortoken
|
|
|
|
type SortDirection string //@enum:type
|
|
|
|
const (
|
|
SortASC SortDirection = "ASC"
|
|
SortDESC SortDirection = "DESC"
|
|
)
|
|
|
|
func (sd SortDirection) ToMongo() int {
|
|
if sd == SortASC {
|
|
return 1
|
|
} else if sd == SortDESC {
|
|
return -1
|
|
} else {
|
|
return 0
|
|
}
|
|
}
|