Documentation
¶
Index ¶
- Variables
- func AddQueryParamsToRequest(requestParams interface{}, req *http.Request, skipEmpty bool) error
- func AddURLValuesToRequest(params url.Values, req *http.Request, skipEmpty bool) error
- func Fields(obj interface{}) ([]string, error)
- func HasValidType(obj interface{}, types []reflect.Kind) bool
- func IsExportableField(field reflect.StructField) bool
- func NewSchemaEncoder() *schema.Encoder
- func ReflectValue(obj interface{}) reflect.Value
- type JsonTester
- type SchemaMarshaler
- type ToURLValues
- type URL
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // register custom encoders EncodeSchemaMarshaler = func(v reflect.Value) string { marshaler, ok := v.Interface().(SchemaMarshaler) if ok == true { return marshaler.MarshalSchema() } stringer, ok := v.Interface().(fmt.Stringer) if ok == true { return stringer.String() } return "" } )
Functions ¶
func AddQueryParamsToRequest ¶
func AddURLValuesToRequest ¶
func HasValidType ¶
func IsExportableField ¶
func IsExportableField(field reflect.StructField) bool
func NewSchemaEncoder ¶
func ReflectValue ¶
Types ¶
type JsonTester ¶
type JsonTester struct {
json.RawMessage
}
func (JsonTester) IsArray ¶
func (j JsonTester) IsArray() bool
func (JsonTester) IsObject ¶
func (j JsonTester) IsObject() bool
func (JsonTester) String ¶
func (j JsonTester) String() string
type SchemaMarshaler ¶
type SchemaMarshaler interface {
MarshalSchema() string
}
type ToURLValues ¶
Click to show internal directories.
Click to hide internal directories.