simulator

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2020 License: Apache-2.0 Imports: 33 Imported by: 32

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BadRequest added in v0.22.0

func BadRequest(w http.ResponseWriter, kind string)

BadRequest responds with http.StatusBadRequest and json encoded vAPI error of type kind.

func Decode added in v0.22.0

func Decode(r *http.Request, w http.ResponseWriter, val interface{}) bool

Decode the request Body into val. Returns true on success, otherwise false and sends the http.StatusBadRequest response.

func New

func New(u *url.URL, settings []vim.BaseOptionValue) (string, http.Handler)

New creates a vAPI simulator.

func OK added in v0.22.0

func OK(w http.ResponseWriter, val ...interface{})

OK responds with http.StatusOK and json encoded val if given.

Types

This section is empty.

Jump to

Keyboard shortcuts

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