utils

package
Version: v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2020 License: Unlicense Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RequestBuilder

type RequestBuilder struct {
	// contains filtered or unexported fields
}

RequestBuilder define a basic http request params builder for Navitia.

func NewRequestBuilder

func NewRequestBuilder() RequestBuilder

NewRequestBuilder create and return a new instance of RequestBuilder

func (RequestBuilder) AddDateTime

func (rb RequestBuilder) AddDateTime(key string, date time.Time)

AddDate add a date time to the request (YYYYMMDDThhmmss)

func (RequestBuilder) AddFloat64

func (rb RequestBuilder) AddFloat64(key string, amount float64)

AddUInt add a floating point number to the request.

func (RequestBuilder) AddIDSlice

func (rb RequestBuilder) AddIDSlice(key string, ids []types.ID)

AddIDSlice add an ID slice to the request.

func (RequestBuilder) AddInt

func (rb RequestBuilder) AddInt(key string, amount int)

AddUInt add a signed integer to the request.

func (RequestBuilder) AddMode

func (rb RequestBuilder) AddMode(key string, modes []string)

AddMode add a mode list to the request

func (RequestBuilder) AddString

func (rb RequestBuilder) AddString(key string, value string)

AddString add a string to the request.

func (RequestBuilder) AddStringSlice

func (rb RequestBuilder) AddStringSlice(key string, values []string)

AddString add a string slice to the request. Add nothing if len of the given slice is equal to 0.

func (RequestBuilder) AddUInt

func (rb RequestBuilder) AddUInt(key string, amount uint)

AddUInt add an unigned integer to the request.

func (RequestBuilder) Values

func (rb RequestBuilder) Values() url.Values

Values return value of url.Values

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL