helpers

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const HassioServer = "hassio"

HassioServer uri to connect to hass.io with

Variables

View Source
var DebugEnabled = false

DebugEnabled set by global --debug (-d) flag

Functions

func ByteArrayToMap

func ByteArrayToMap(data []byte) map[string]interface{}

func CreateJSONData

func CreateJSONData(data string) map[string]string

func DisplayOutput

func DisplayOutput(data []byte, rawjson bool)

func ExecCommand

func ExecCommand(basepath string, endpoint string, serverOverride string, get bool, Options string, Filter string, RawJSON bool)

ExecCommand Used to execute the remote calls for each of the managing commands

func FilterProperties

func FilterProperties(data []byte, filter []string) []byte

func GenerateURI

func GenerateURI(basepath string, endpoint string, serverOverride string) string

GenerateURI Creates the API URI from the server and the endpoint

func RestCall

func RestCall(uri string, bGet bool, payload string) []byte

RestCall Makes the Call to the API

Types

This section is empty.

Jump to

Keyboard shortcuts

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