internal

package
v0.1.68 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddHeader

func AddHeader(header *http.Header, name string, value interface{})

AddHeader creates the given set of headers if needed, and then adds the given header:

func AddValue

func AddValue(query *url.Values, name string, value interface{})

AddValue creates the given set of query parameters if needed, an then adds the given parameter.

func CopyHeader

func CopyHeader(header http.Header) http.Header

CopyHeader creates a copy of the given set of headers.

func CopyQuery

func CopyQuery(query url.Values) url.Values

CopyQuery creates a copy of the given set of query parameters.

func CopyValues

func CopyValues(values []string) []string

CopyValues copies a slice of strings.

func SetDeadline

func SetDeadline(ctx *context.Context, cancel *context.CancelFunc, deadline time.Time)

SetDeadline creates the given context, if needed, and sets the given deadline.

func SetTimeout

func SetTimeout(ctx *context.Context, cancel *context.CancelFunc, timeout time.Duration)

SetTimeout creates the given context, if needed, and sets the given timeout.

Types

type TokenResponse

type TokenResponse struct {
	AccessToken      *string `json:"access_token,omitempty"`
	Error            *string `json:"error,omitempty"`
	ErrorDescription *string `json:"error_description,omitempty"`
	RefreshToken     *string `json:"refresh_token,omitempty"`
	TokenType        *string `json:"token_type,omitempty"`
}

TokenResponse is used to unmarshal the sub-set of properties JSON token responses that we need.

Jump to

Keyboard shortcuts

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