queryparams

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2016 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 added in v1.2.0

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

Marshaler converts an object to a query parameter string representation

type Unmarshaler added in v1.2.0

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