Documentation
¶
Index ¶
- func DecodeBool(key string, values []string) (bool, error)
- func DecodeBoolPtr(key string, values []string) (*bool, error)
- func DecodeBytes(key string, values []string) ([]byte, error)
- func DecodeFloat[T ~float64 | ~float32](key string, values []string) (T, error)
- func DecodeFloatPtr[T ~float64 | ~float32](key string, values []string) (*T, error)
- func DecodeInt[T ~int64 | ~int32 | ~int16 | ~int8 | ~int](key string, values []string) (T, error)
- func DecodeIntPtr[T ~int64 | ~int32 | ~int16 | ~int8 | ~int](key string, values []string) (*T, error)
- func DecodeJSON[T any](key string, values []string) (T, error)
- func DecodeList[T any](key string, values []string, fn Decoder[T]) ([]T, error)
- func DecodeString(key string, values []string) (string, error)
- func DecodeStringPtr(key string, values []string) (*string, error)
- func DecodeUint[T ~uint64 | ~uint32 | ~uint16 | ~uint8 | ~uint](key string, values []string) (T, error)
- func DecodeUintPtr[T ~uint64 | ~uint32 | ~uint16 | ~uint8 | ~uint](key string, values []string) (*T, error)
- func EncodeBool(m url.Values, key string, val bool) error
- func EncodeBoolPtr(m url.Values, key string, val *bool) error
- func EncodeBytes(m url.Values, key string, val []byte) error
- func EncodeFloat[T ~float64 | ~float32](m url.Values, key string, val T) error
- func EncodeFloatPtr[T ~float64 | ~float32](m url.Values, key string, val *T) error
- func EncodeInt[T ~int64 | ~int32 | ~int16 | ~int8 | ~int](m url.Values, key string, val T) error
- func EncodeIntPtr[T ~int64 | ~int32 | ~int16 | ~int8 | ~int](m url.Values, key string, val *T) error
- func EncodeJSON[T any](m url.Values, key string, val T) error
- func EncodeList[T any](m url.Values, key string, values []T, fn Encoder[T]) error
- func EncodeString(m url.Values, key string, val string) error
- func EncodeStringPtr(m url.Values, key string, val *string) error
- func EncodeUint[T ~uint64 | ~uint32 | ~uint16 | ~uint8 | ~uint](m url.Values, key string, val T) error
- func EncodeUintPtr[T ~uint64 | ~uint32 | ~uint16 | ~uint8 | ~uint](m url.Values, key string, val *T) error
- type Decoder
- type Encoder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeBool ¶
DecodeBool decodes a boolean value from form values.
func DecodeBoolPtr ¶
DecodeBoolPtr decodes a boolean value and returns a pointer to it.
func DecodeBytes ¶
DecodeBytes decodes a base64-encoded string into a byte slice.
func DecodeFloat ¶
DecodeFloat decodes a floating-point value from form values.
func DecodeFloatPtr ¶
DecodeFloatPtr decodes a floating-point value and returns a pointer to it.
func DecodeIntPtr ¶
func DecodeIntPtr[T ~int64 | ~int32 | ~int16 | ~int8 | ~int](key string, values []string) (*T, error)
DecodeIntPtr decodes a signed integer value and returns a pointer to it.
func DecodeJSON ¶
DecodeJSON decodes a JSON-encoded value into the target type.
func DecodeList ¶
DecodeList decodes multiple form values into a slice using the provided decoder.
func DecodeString ¶
DecodeString decodes a string value from form values.
func DecodeStringPtr ¶
DecodeStringPtr decodes a string value and returns a pointer to it.
func DecodeUint ¶
func DecodeUint[T ~uint64 | ~uint32 | ~uint16 | ~uint8 | ~uint](key string, values []string) (T, error)
DecodeUint decodes an unsigned integer value from form values.
func DecodeUintPtr ¶
func DecodeUintPtr[T ~uint64 | ~uint32 | ~uint16 | ~uint8 | ~uint](key string, values []string) (*T, error)
DecodeUintPtr decodes an unsigned integer value and returns a pointer to it.
func EncodeBool ¶
EncodeBool encodes a boolean value into url.Values.
func EncodeBoolPtr ¶
EncodeBoolPtr encodes a boolean pointer value into url.Values. If the pointer is nil, the field is omitted.
func EncodeBytes ¶
EncodeBytes encodes a byte slice into url.Values using base64 encoding.
func EncodeFloat ¶
EncodeFloat encodes a floating-point value into url.Values.
func EncodeFloatPtr ¶
EncodeFloatPtr encodes a floating-point pointer value into url.Values. If the pointer is nil, the field is omitted.
func EncodeIntPtr ¶
func EncodeIntPtr[T ~int64 | ~int32 | ~int16 | ~int8 | ~int](m url.Values, key string, val *T) error
EncodeIntPtr encodes a signed integer pointer value into url.Values. If the pointer is nil, the field is omitted.
func EncodeJSON ¶
EncodeJSON encodes a value into JSON and stores it in url.Values.
func EncodeList ¶
EncodeList encodes a list of values into url.Values using the provided encoder function. Each element in the slice is encoded independently.
func EncodeString ¶
EncodeString encodes a string value into url.Values.
func EncodeStringPtr ¶
EncodeStringPtr encodes a string pointer value into url.Values. If the pointer is nil, the field is omitted.