Documentation ¶
Index ¶
- func AddHeader(header *http.Header, name string, value interface{})
- func AddImpersonationHeader(header *http.Header, user string)
- func AddValue(query *url.Values, name string, value interface{})
- func CopyHeader(header http.Header) http.Header
- func CopyQuery(query url.Values) url.Values
- func CopyValues(values []string) []string
- func NewBoolean(value bool) *bool
- func NewDate(value time.Time) *time.Time
- func NewFloat(value float64) *float64
- func NewInteger(value int) *int
- func NewIterator(source interface{}) (iterator *jsoniter.Iterator, err error)
- func NewStream(writer io.Writer) *jsoniter.Stream
- func NewString(value string) *string
- 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 PollContext(ctx context.Context, interval time.Duration, statuses []int, ...) (result interface{}, err error)
- func Segments(path string) []string
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 AddImpersonationHeader ¶ added in v0.0.329
func AddValue ¶
AddValue creates the given set of query parameters if needed, an then adds the given parameter.
func CopyHeader ¶ added in v0.0.329
CopyHeader creates a copy of the given set of headers.
func NewBoolean ¶
NewBoolean allocates a new bool in the heap and returns a pointer to it.
func NewFloat ¶
NewFloat allocates a new floating point value in the heap and returns an pointer to it.
func NewInteger ¶
NewInteger allocates a new integer in the heap and returns a pointer to it.
func NewIterator ¶
NewIterator creates a new JSON iterator that will read to the given source, which can be a slice of bytes, a string, a reader or an existing iterator.
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.
func PollContext ¶
func PollContext( ctx context.Context, interval time.Duration, statuses []int, predicates []func(interface{}) bool, task func(context.Context) (int, interface{}, error), ) (result interface{}, err error)
PollContext repeatedly executes a task till it returns one of the given statuses and till the result satisfies all the given predicates.
Types ¶
This section is empty.