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 QueryDecoderConfig
- type QueryEncoder
- type QueryEncoderConfig
- 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(cfg QueryDecoderConfig) *QueryDecoder
func (*QueryDecoder) DecodeArray ¶
func (d *QueryDecoder) DecodeArray(f func(d Decoder) error) error
func (*QueryDecoder) DecodeFields ¶
func (d *QueryDecoder) DecodeFields(f func(name string, d Decoder) error) error
func (*QueryDecoder) DecodeValue ¶
func (d *QueryDecoder) DecodeValue() (string, error)
type QueryDecoderConfig ¶
type QueryDecoderConfig struct { Param string Values []string Style QueryStyle Explode bool }
type QueryEncoder ¶
type QueryEncoder struct {
// contains filtered or unexported fields
}
func NewQueryEncoder ¶
func NewQueryEncoder(cfg QueryEncoderConfig) *QueryEncoder
func (QueryEncoder) EncodeArray ¶
func (QueryEncoder) EncodeField ¶
func (QueryEncoder) EncodeValue ¶
func (*QueryEncoder) Result ¶
func (e *QueryEncoder) Result() []string
type QueryEncoderConfig ¶
type QueryEncoderConfig struct { Param string Style QueryStyle Explode bool }
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.