helpers

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2016 License: Apache-2.0 Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHealth

func GetHealth(address string) (fusion.Health, error)

GetHealth checks a number of status items for each box and returns a JSON object representing the test restults

func IsRoomAvailable

func IsRoomAvailable(room fusion.Room) (bool, error)

IsRoomAvailable checks room availability by consulting with the EMS API and examining the "POWER_ON" signal in Fusion

func SoapDecode

func SoapDecode(data []byte, contents interface{}) error

SoapDecode decodes a response returned by a SOAP request

func SoapEncode

func SoapEncode(contents interface{}) ([]byte, error)

SoapEncode encodes a request to be sent in a SOAP request

func SoapRequest

func SoapRequest(url string, payload []byte) ([]byte, error)

SoapRequest sends a SOAP request and returns the response

Types

type Error

type Error struct {
	Message string
}

Error represents the API's method of returning errors to the user

func GenericError

func GenericError() Error

GenericError returns a generic error to the user

func ReturnError

func ReturnError(err error) Error

ReturnError returns JSON sharing the error message with the user

type SoapBody

type SoapBody struct {
	XMLName  struct{} `xml:"Body"`
	Contents []byte   `xml:",innerxml"`
}

SoapBody is where The XML body goes

type SoapEnvelope

type SoapEnvelope struct {
	XMLName struct{} `xml:"http://schemas.xmlsoap.org/soap/envelope/ Envelope"`
	Body    SoapBody
}

SoapEnvelope wraps XML SOAP requests

Jump to

Keyboard shortcuts

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