Documentation ¶
Index ¶
- func GetFilters(q url.Values, safeFields []string) (bson.D, error)
- func GetLinkHeaders(totalCount int64, r *http.Request) string
- func GetOption(q url.Values, safeFields []string) (*options.FindOneOptions, []error)
- func GetOptions(q url.Values, safeFields []string) (*options.FindOptions, []error)
- func IsInvalid(e error) bool
- type ErrorObject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFilters ¶
builds the filtering query based on user url request e.g. ?filter=id>='1'
func GetLinkHeaders ¶
returns the relevant link headers for a given query
func GetOptions ¶
builds the database query parameters based on user url request e.g. ?limit=1&fields=id
Types ¶
type ErrorObject ¶
type ErrorObject struct { StatusCode int `json:"-"` CodeMajor string `json:"codeMajor"` Severity string `json:"severity"` Description string `json:"description"` CodeMinor string `json:"codeMinor"` IsInvalid bool `json:"-"` }
func (*ErrorObject) Error ¶
func (e *ErrorObject) Error() string
func (*ErrorObject) Invalid ¶
func (e *ErrorObject) Invalid() bool
func (*ErrorObject) Populate ¶
func (e *ErrorObject) Populate()
Click to show internal directories.
Click to hide internal directories.