Documentation ¶
Overview ¶
Package uri implements OpenAPI path/query parameter encoding.
Index ¶
- func Acquire() *url.URL
- func Clone(u *url.URL) *url.URL
- func Put(u *url.URL)
- type Decoder
- type Encoder
- type Field
- type HeaderDecoder
- type HeaderDecoderConfig
- type HeaderEncoder
- type HeaderEncoderConfig
- type PathDecoder
- type PathDecoderConfig
- type PathEncoder
- type PathEncoderConfig
- type PathStyle
- type QueryDecoder
- type QueryEncoder
- type QueryParameterDecodingConfig
- type QueryParameterEncodingConfig
- type QueryParameterObjectField
- type QueryStyle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HeaderDecoder ¶
type HeaderDecoder struct {
// contains filtered or unexported fields
}
func NewHeaderDecoder ¶
func NewHeaderDecoder(cfg HeaderDecoderConfig) *HeaderDecoder
func (*HeaderDecoder) DecodeArray ¶
func (d *HeaderDecoder) DecodeArray(f func(Decoder) error) error
func (*HeaderDecoder) DecodeFields ¶
func (d *HeaderDecoder) DecodeFields(f func(field string, d Decoder) error) error
func (*HeaderDecoder) DecodeValue ¶
func (d *HeaderDecoder) DecodeValue() (string, error)
type HeaderDecoderConfig ¶
type HeaderEncoder ¶
type HeaderEncoder struct {
// contains filtered or unexported fields
}
func NewHeaderEncoder ¶
func NewHeaderEncoder(cfg HeaderEncoderConfig) *HeaderEncoder
func (HeaderEncoder) EncodeArray ¶
func (HeaderEncoder) EncodeField ¶
func (HeaderEncoder) EncodeValue ¶
func (*HeaderEncoder) Result ¶
func (e *HeaderEncoder) Result() (string, bool)
type HeaderEncoderConfig ¶
type HeaderEncoderConfig struct {
Explode bool
}
type PathDecoder ¶
type PathDecoder struct {
// contains filtered or unexported fields
}
func NewPathDecoder ¶
func NewPathDecoder(cfg PathDecoderConfig) *PathDecoder
func (*PathDecoder) DecodeArray ¶
func (d *PathDecoder) DecodeArray(f func(d Decoder) error) error
func (*PathDecoder) DecodeFields ¶
func (d *PathDecoder) DecodeFields(f func(name string, d Decoder) error) error
func (*PathDecoder) DecodeValue ¶
func (d *PathDecoder) DecodeValue() (string, error)
type PathDecoderConfig ¶
type PathEncoder ¶
type PathEncoder struct {
// contains filtered or unexported fields
}
func NewPathEncoder ¶
func NewPathEncoder(cfg PathEncoderConfig) *PathEncoder
func (PathEncoder) EncodeArray ¶
func (PathEncoder) EncodeField ¶
func (PathEncoder) EncodeValue ¶
func (*PathEncoder) Result ¶
func (e *PathEncoder) Result() string
type PathEncoderConfig ¶
type QueryDecoder ¶
type QueryDecoder struct {
// contains filtered or unexported fields
}
func NewQueryDecoder ¶
func NewQueryDecoder(values url.Values) *QueryDecoder
func (*QueryDecoder) DecodeParam ¶ added in v0.30.2
func (d *QueryDecoder) DecodeParam(cfg QueryParameterDecodingConfig, f func(Decoder) error) error
func (*QueryDecoder) HasParam ¶ added in v0.30.2
func (d *QueryDecoder) HasParam(cfg QueryParameterDecodingConfig) error
type QueryEncoder ¶
type QueryEncoder struct {
// contains filtered or unexported fields
}
func NewQueryEncoder ¶
func NewQueryEncoder() *QueryEncoder
func (*QueryEncoder) EncodeParam ¶ added in v0.30.2
func (e *QueryEncoder) EncodeParam(cfg QueryParameterEncodingConfig, f func(Encoder) error) error
func (*QueryEncoder) Values ¶ added in v0.30.2
func (e *QueryEncoder) Values() url.Values
type QueryParameterDecodingConfig ¶ added in v0.30.2
type QueryParameterDecodingConfig struct { Name string Style QueryStyle Explode bool Fields []QueryParameterObjectField // Only for object param. }
type QueryParameterEncodingConfig ¶ added in v0.30.2
type QueryParameterEncodingConfig struct { Name string Style QueryStyle Explode bool }
type QueryParameterObjectField ¶ added in v0.30.2
type QueryStyle ¶
type QueryStyle string
const ( QueryStyleForm QueryStyle = "form" QueryStyleSpaceDelimited QueryStyle = "spaceDelimited" QueryStylePipeDelimited QueryStyle = "pipeDelimited" QueryStyleDeepObject QueryStyle = "deepObject" )
Click to show internal directories.
Click to hide internal directories.