Documentation ¶
Index ¶
- func AddHeader(header *http.Header, name string, value interface{})
- func AddValue(query *url.Values, name string, value interface{})
- func CopyQuery(query url.Values) url.Values
- func CopyValues(values []string) []string
- func NewDecoder(source interface{}) (decoder *json.Decoder, err error)
- func NewEncoder(target interface{}) (encoder *json.Encoder, err error)
- func ParseBoolean(query url.Values, parameterName string) (*bool, error)
- func ParseDate(query url.Values, parameterName string) (*time.Time, error)
- func ParseFloat(query url.Values, parameterName string) (*float64, error)
- func ParseInteger(query url.Values, parameterName string) (*int, error)
- func ParseString(query url.Values, parameterName string) (*string, error)
- func Segments(path string) []string
- func SetHeader(header http.Header, metric string) http.Header
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddHeader ¶
AddHeader creates the given set of headers if needed, and then adds the given header:
func AddValue ¶
AddValue creates the given set of query parameters if needed, an then adds the given parameter.
func NewDecoder ¶ added in v0.1.30
NewDecoder creates a new JSON decoder from the given source. The source can be a slice of bytes, a string, a reader or a JSON decoder.
func NewEncoder ¶ added in v0.1.30
NewEncoder creates a new JSON encoder from the given target. The target can be a a writer or a JSON encoder.
func ParseBoolean ¶
ParseBoolean reads a string and parses it to boolean, if an error occurred it returns a non-nil error.
func ParseDate ¶
ParseDate reads a string and parses it to a time.Time, if an error occurred it returns a non-nil error.
func ParseFloat ¶
ParseFloat reads a string and parses it to float, if an error occurred it returns a non-nil error.
func ParseInteger ¶
ParseInteger reads a string and parses it to integer, if an error occurred it returns a non-nil error.
func ParseString ¶
ParseString returns a pointer to the string and nil error.
Types ¶
This section is empty.