gensupport

package
v0.20.0-alpha11 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2016 License: BSD-3-Clause, Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package gensupport is an internal implementation detail used by code generated by the google-api-go-generator tool.

This package may be modified at any time without regard for backwards compatibility. It should not be used directly by API users.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalJSON

func MarshalJSON(schema interface{}, forceSendFields []string) ([]byte, error)

MarshalJSON returns a JSON encoding of schema containing only selected fields. A field is selected if:

  • it has a non-empty value, or
  • its field name is present in forceSendFields, and
  • it is not a nil pointer or nil interface.

The JSON key for each selected field is taken from the field's json: struct tag.

Types

type URLParams

type URLParams map[string][]string

URLParams is a simplified replacement for url.Values that safely builds up URL parameters for encoding.

func (URLParams) Encode

func (u URLParams) Encode() string

Encode encodes the values into “URL encoded” form ("bar=baz&foo=quux") sorted by key.

func (URLParams) Set

func (u URLParams) Set(key, value string)

Set sets the key to value. It replaces any existing values.

func (URLParams) SetMulti

func (u URLParams) SetMulti(key string, values []string)

SetMulti sets the key to an array of values. It replaces any existing values. Note that values must not be modified after calling SetMulti so the caller is responsible for making a copy if necessary.

Jump to

Keyboard shortcuts

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