Documentation
¶
Index ¶
- func AppendContextField(ctx context.Context, fields []any) []any
- func HTTPConnReused(ctx context.Context) (reused bool, ok bool)
- func MaskAPIKey(value string) string
- func ReadBodyForLog(body io.Reader) string
- func SanitizeHeaders(header http.Header) http.Header
- func SanitizeURL(raw string, hiddenParams ...string) string
- func StartRequestSpan(ctx context.Context, instrumentationName, spanName string) (context.Context, trace.Span)
- func ToInt(digit interface{}) (i int, err error)
- func ToInt64(digit interface{}) (i int64, err error)
- func ToJSONList(v []byte) []byte
- func WithHTTPConnTrace(ctx context.Context) context.Context
- type APIError
- type PriceLevel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendContextField ¶ added in v0.3.46
func HTTPConnReused ¶ added in v0.3.46
func MaskAPIKey ¶ added in v0.3.46
func ReadBodyForLog ¶ added in v0.3.46
func SanitizeURL ¶ added in v0.3.46
func StartRequestSpan ¶ added in v0.3.46
Types ¶
type APIError ¶
APIError define API error when response status is 4xx or 5xx
func (APIError) MarshalEasyJSON ¶ added in v0.3.46
MarshalEasyJSON supports easyjson.Marshaler interface
func (APIError) MarshalJSON ¶ added in v0.3.46
MarshalJSON supports json.Marshaler interface
func (*APIError) UnmarshalEasyJSON ¶ added in v0.3.46
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*APIError) UnmarshalJSON ¶ added in v0.3.46
UnmarshalJSON supports json.Unmarshaler interface
type PriceLevel ¶
PriceLevel is a common structure for bids and asks in the order book.
func (PriceLevel) MarshalEasyJSON ¶ added in v0.3.46
func (v PriceLevel) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (PriceLevel) MarshalJSON ¶ added in v0.3.46
func (v PriceLevel) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*PriceLevel) Parse ¶
func (p *PriceLevel) Parse() (float64, float64, error)
Parse parses this PriceLevel's Price and Quantity and returns them both. It also returns an error if either fails to parse.
func (*PriceLevel) UnmarshalEasyJSON ¶ added in v0.3.46
func (v *PriceLevel) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*PriceLevel) UnmarshalJSON ¶ added in v0.3.46
func (v *PriceLevel) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface