queryparams

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package queryparams provides conversion from versioned runtime objects to URL query values

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(obj interface{}) (url.Values, error)

Convert takes an object and converts it to a url.Values object using JSON tags as parameter names. Only top-level simple values, arrays, and slices are serialized. Embedded structs, maps, etc. will not be serialized.

Types

type Marshaler

type Marshaler interface {
	MarshalQueryParameter() (string, error)
}

Marshaler converts an object to a query parameter string representation

type Unmarshaler

type Unmarshaler interface {
	UnmarshalQueryParameter(string) error
}

Unmarshaler converts a string representation to an object

Jump to

Keyboard shortcuts

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