Documentation ¶
Index ¶
- func ParseGetAllObjectsRequestQueryString(r *http.Request, minOffset int, maxOffset int, minLimit int, maxLimit int) (offset int, limit int, labels []string, err errors.EdgeX)
- func ParseQueryStringToInt(r *http.Request, queryStringKey string, defaultValue int, min int, max int) (int, errors.EdgeX)
- func ParseQueryStringToStrings(r *http.Request, queryStringKey string, separator string) (stringArray []string)
- func WriteHttpHeader(w http.ResponseWriter, ctx context.Context, statusCode int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseQueryStringToInt ¶
func ParseQueryStringToInt(r *http.Request, queryStringKey string, defaultValue int, min int, max int) (int, errors.EdgeX)
Parse the specified query string key to an integer. If specified query string key is found more than once in the http request, only the first specified query string will be parsed and converted to an integer. If no specified query string key could be found in the http request, specified default value will be returned. EdgeX error will be returned if any parsing error occurs.
func ParseQueryStringToStrings ¶
func ParseQueryStringToStrings(r *http.Request, queryStringKey string, separator string) (stringArray []string)
Parse the specified query string key to an array of string. If specified query string key is found more than once in the http request, only the first specified query string will be parsed and converted to an array of string. The value of query string will be split into an array of string by the passing separator. If separator is passed in as an empty string, comma separator will be used.
func WriteHttpHeader ¶
func WriteHttpHeader(w http.ResponseWriter, ctx context.Context, statusCode int)
Types ¶
This section is empty.