requester

package
v0.0.0-...-4aeb316 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2020 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package requester defines everything that is common to all requesters, such as the Fn function. It also defines the Values type that is used by the clients and servers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fn

type Fn func(input *Values) (output *Values, err error)

Fn defines the function that executes a request. It receives the *Values input, and returns the *Values output.

type Values

type Values map[string]interface{}

Values defines a map of values.

func NewValues

func NewValues() *Values

NewValues creates an empty set of values.

func NewValuesFromMap

func NewValuesFromMap(sourceMap map[string]interface{}) *Values

NewValuesFromMap creates a set of values based on the provided map.

func (Values) Get

func (v Values) Get(key string) interface{}

Get retrieves the specified key from the values.

func (Values) GetString

func (v Values) GetString(key string) string

GetString retrieves the specified key from the values and forces the result to be a string.

func (Values) Set

func (v Values) Set(key string, value interface{})

Set assigns the value to the specified key.

Jump to

Keyboard shortcuts

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