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: 0

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