Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var SupportedExpandParameters map[string][]string
SupportedExpandParameters contains a list of endpoints with their supported expand parameters
var SupportedSelectParameters map[string][]string
SupportedSelectParameters contains a list of endpoints with their supported select parameters
Functions ¶
func IsValidOdataQuery ¶
IsValidOdataQuery checks a querystring for containing correct keywords
Types ¶
type GoDataCollectionCountQuery ¶
type GoDataCollectionCountQuery bool
GoDataCollectionCountQuery true when addressing the count of a collection
type GoDataRefQuery ¶
type GoDataRefQuery bool
GoDataRefQuery true when $ref is requested false if not
type GoDataValueQuery ¶
type GoDataValueQuery bool
GoDataValueQuery true when $value is requested false if not
type QueryOptions ¶
type QueryOptions struct { godata.GoDataQuery Value *GoDataValueQuery Ref *GoDataRefQuery CollectionCount *GoDataCollectionCountQuery RawExpand string RawFilter string RawOrderBy string }
QueryOptions extents upon godata.GoDataQuery to implement extra odata functions not found in the godata package
func ExpandItemToQueryOptions ¶
func ExpandItemToQueryOptions(ei *godata.ExpandItem) *QueryOptions
ExpandItemToQueryOptions converts an ExpandItem into QueryOptions
func GetQueryOptions ¶
func GetQueryOptions(r *http.Request, maxEntities int) (*QueryOptions, []error)
GetQueryOptions creates QueryOptions based upon the incoming request QueryOptions = nil when no query was found, errors != nil if something went wrong with parsing the query into QueryOptions and will contain information on what went wrong
func ParseURLQuery ¶
func ParseURLQuery(query url.Values) (*QueryOptions, error)
ParseURLQuery parses an incoming url query into QueryOptions
func (*QueryOptions) ExpandParametersSupported ¶
func (q *QueryOptions) ExpandParametersSupported(endpoint, expand string) bool
ExpandParametersSupported returns if the QueryOptions expand request is supported by the endpoints
func (*QueryOptions) SelectParametersSupported ¶
func (q *QueryOptions) SelectParametersSupported(endpoint, selectString string) bool
SelectParametersSupported returns if the QueryOptions select request is supported by the endpoints