Spaces:
Paused
Paused
File size: 529 Bytes
83a59ca | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | package repositories
import (
"time"
"github.com/NdoleStudio/stacktrace"
)
// IndexParams parameters for indexing a database table
type IndexParams struct {
Skip int `json:"skip"`
SortBy string `json:"sort"`
SortDescending bool `json:"sort_descending"`
Query string `json:"query"`
Limit int `json:"take"`
}
const (
// ErrCodeNotFound is thrown when an entity does not exist in storage
ErrCodeNotFound = stacktrace.ErrorCode(1000)
dbOperationDuration = 5 * time.Second
)
|