adminarea

package
v0.0.0-...-e633676 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminArea

type AdminArea struct {
}

AdminArea is used to group devices, provide control, and limit user access.

func (AdminArea) CreateAndMoveAdminArea

func (a AdminArea) CreateAndMoveAdminArea(adr QueryRequirements) string

CreateAndMoveAdminArea is creates a new admin area and the given devices perform the assigned admin area.

func (AdminArea) GetAdminArea

func (a AdminArea) GetAdminArea(adminAreaName string) ResponseGetAdminAreaJSON

GetAdminArea returns information for a given admin domain given a name.

func (AdminArea) GetAllAdminArea

func (a AdminArea) GetAllAdminArea() ResponseGetAllAdminAreaJSON

GetAllAdminArea returns information for all existing admin area.

func (AdminArea) MoveAdminArea

func (a AdminArea) MoveAdminArea(adr QueryRequirements) string

MoveAdminArea is performs an action to assign the specified devices to an existing admin area.

type CodeJSON

type CodeJSON struct {
	Code string `json:"code"`
}

CodeJSON was created to assist in passing arrays to the Devices field in QueryBodyJSON.

type QueryBodyJSON

type QueryBodyJSON struct {
	Code    string `json:"code"`
	Devices []struct {
		Code string `json:"code"`
	} `json:"devices"`
	Name string `json:"name"`
}

QueryBodyJSON is contains the parameters required to perform the query.

type QueryRequirements

type QueryRequirements struct {
	AdminAreaName            string
	AddToAdminAreaDeviceCode []string
}

QueryRequirements specifies the parameters that the functions receive when querying

type ResponseGetAdminAreaJSON

type ResponseGetAdminAreaJSON struct {
	Code         string        `json:"code"`
	Name         string        `json:"name"`
	DefaultState bool          `json:"defaultState"`
	Children     []interface{} `json:"children"`
	Devices      []interface{} `json:"devices"`
	Links        []struct {
		Rel  string `json:"rel"`
		Href string `json:"href"`
	} `json:"links"`
}

ResponseGetAdminAreaJSON query result is used to parse and use return values.

type ResponseGetAllAdminAreaJSON

type ResponseGetAllAdminAreaJSON []struct {
	Code         string        `json:"code"`
	Name         string        `json:"name"`
	DefaultState bool          `json:"defaultState"`
	Children     []interface{} `json:"children"`
	Devices      []interface{} `json:"devices"`
	Links        []struct {
		Rel  string `json:"rel"`
		Href string `json:"href"`
	} `json:"links"`
}

ResponseGetAllAdminAreaJSON query result is used to parse and use return values.

Jump to

Keyboard shortcuts

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