utils

package
v0.0.0-...-e782904 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddQueryParamsToRequest

func AddQueryParamsToRequest(requestParams interface{}, req *http.Request, skipEmpty bool) error

func AddURLValuesToRequest

func AddURLValuesToRequest(params url.Values, req *http.Request, skipEmpty bool) error

func Fields

func Fields(obj interface{}) ([]string, error)

func HasValidType

func HasValidType(obj interface{}, types []reflect.Kind) bool

func IsExportableField

func IsExportableField(field reflect.StructField) bool

func NewSchemaEncoder

func NewSchemaEncoder() *schema.Encoder

func ReflectValue

func ReflectValue(obj interface{}) reflect.Value

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

type ToURLValues interface {
	ToURLValues() (url.Values, error)
}

type URL

type URL struct {
	nativeurl.URL
}

func (*URL) MarshalText

func (u *URL) MarshalText() ([]byte, error)

MarshalText just calls String()

func (*URL) UnmarshalText

func (u *URL) UnmarshalText(p []byte) error

UnmarshalText calls url.Parse

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL