api

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2023 License: Apache-2.0 Imports: 7 Imported by: ? modules, 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

View Source
const (
	API_LOGIN   = "/api/user/login"
	API_VERSION = "/api/version"
	API_STATUS  = "/api/status"

	API_GATEWAY_LIST    = "/api/gateway"
	API_GATEWAY_ENABLE  = "/api/gateway/enable"
	API_GATEWAY_DISABLE = "/api/gateway/disable"
	API_GATEWAY_RELOAD  = "/api/gateway/reload"
	API_GATEWAY_DELETE  = "/api/gateway"

	API_NODE_LIST   = "/api/node"
	API_NODE_DELETE = "/api/node"

	API_ACTION      = "/api/action"
	API_ACTION_NODE = "/api/action/node"

	API_FIELD_LIST   = "/api/field"
	API_FIELD_DELETE = "/api/field"

	API_SOURCE_LIST   = "/api/source"
	API_SOURCE_DELETE = "/api/source"

	API_FIRMWARE_LIST   = "/api/firmware"
	API_FIRMWARE_DELETE = "/api/firmware"

	API_DATA_REPOSITORY_LIST   = "/api/datarepository"
	API_DATA_REPOSITORY_DELETE = "/api/datarepository"

	API_VIRTUAL_DEVICE_LIST    = "/api/virtualdevice"
	API_VIRTUAL_DEVICE_ENABLE  = "/api/virtualdevice/enable"
	API_VIRTUAL_DEVICE_DISABLE = "/api/virtualdevice/disable"
	API_VIRTUAL_DEVICE_DELETE  = "/api/virtualdevice"

	API_VIRTUAL_ASSISTANT_LIST    = "/api/virtualassistant"
	API_VIRTUAL_ASSISTANT_ENABLE  = "/api/virtualassistant/enable"
	API_VIRTUAL_ASSISTANT_DISABLE = "/api/virtualassistant/disable"
	API_VIRTUAL_ASSISTANT_RELOAD  = "/api/virtualassistant/reload"
	API_VIRTUAL_ASSISTANT_DELETE  = "/api/virtualassistant"

	API_TASK_LIST    = "/api/task"
	API_TASK_ENABLE  = "/api/task/enable"
	API_TASK_DISABLE = "/api/task/disable"
	API_TASK_DELETE  = "/api/task"

	API_SCHEDULE_LIST    = "/api/schedule"
	API_SCHEDULE_ENABLE  = "/api/schedule/enable"
	API_SCHEDULE_DISABLE = "/api/schedule/disable"
	API_SCHEDULE_DELETE  = "/api/schedule"

	API_HANDLER_LIST    = "/api/handler"
	API_HANDLER_ENABLE  = "/api/handler/enable"
	API_HANDLER_DISABLE = "/api/handler/disable"
	API_HANDLER_DELETE  = "/api/handler"

	API_FORWARD_PAYLOAD_LIST   = "/api/forwardpayload"
	API_FORWARD_PAYLOAD_DELETE = "/api/forwardpayload"

	API_BACKUP_LIST   = "/api/backup"
	API_BACKUP_DELETE = "/api/backup"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	ServerAddress string
	Token         string
	Insecure      bool
	Timeout       string
}

func NewClient

func NewClient(serverAddress string, token string, insecure bool) *Client

func (*Client) DeleteBackup

func (c *Client) DeleteBackup(items ...string) error

func (*Client) DeleteDataRepository

func (c *Client) DeleteDataRepository(nodes ...string) error

func (*Client) DeleteField

func (c *Client) DeleteField(nodes ...string) error

func (*Client) DeleteFirmware

func (c *Client) DeleteFirmware(nodes ...string) error

func (*Client) DeleteForwardPayload

func (c *Client) DeleteForwardPayload(items ...string) error

func (*Client) DeleteGateway

func (c *Client) DeleteGateway(items ...string) error

func (*Client) DeleteHandler

func (c *Client) DeleteHandler(items ...string) error

func (*Client) DeleteNode

func (c *Client) DeleteNode(nodes ...string) error

func (*Client) DeleteSchedule

func (c *Client) DeleteSchedule(items ...string) error

func (*Client) DeleteSource

func (c *Client) DeleteSource(nodes ...string) error

func (*Client) DeleteTask

func (c *Client) DeleteTask(items ...string) error

func (*Client) DeleteVirtualAssistant

func (c *Client) DeleteVirtualAssistant(items ...string) error

func (*Client) DeleteVirtualDevice

func (c *Client) DeleteVirtualDevice(items ...string) error

func (*Client) DisableGateway

func (c *Client) DisableGateway(items ...string) error

func (*Client) DisableHandler

func (c *Client) DisableHandler(items ...string) error

func (*Client) DisableSchedule

func (c *Client) DisableSchedule(items ...string) error

func (*Client) DisableTask

func (c *Client) DisableTask(items ...string) error

func (*Client) DisableVirtualAssistant

func (c *Client) DisableVirtualAssistant(items ...string) error

func (*Client) DisableVirtualDevice

func (c *Client) DisableVirtualDevice(items ...string) error

func (*Client) EnableGateway

func (c *Client) EnableGateway(items ...string) error

func (*Client) EnableHandler

func (c *Client) EnableHandler(items ...string) error

func (*Client) EnableSchedule

func (c *Client) EnableSchedule(items ...string) error

func (*Client) EnableTask

func (c *Client) EnableTask(items ...string) error

func (*Client) EnableVirtualAssistant

func (c *Client) EnableVirtualAssistant(items ...string) error

func (*Client) EnableVirtualDevice

func (c *Client) EnableVirtualDevice(items ...string) error

func (*Client) ExecuteAction

func (c *Client) ExecuteAction(actions []webHandlerTY.ActionConfig) error

func (*Client) ExecuteNodeAction

func (c *Client) ExecuteNodeAction(action string, nodeIDs []string) error

func (*Client) GetServerVersion

func (c *Client) GetServerVersion() (*version.Version, error)

func (*Client) ListBackup

func (c *Client) ListBackup(queryParams map[string]interface{}) (*storageTY.Result, error)

func (*Client) ListDataRepository

func (c *Client) ListDataRepository(queryParams map[string]interface{}) (*storageTY.Result, error)

func (*Client) ListField

func (c *Client) ListField(queryParams map[string]interface{}) (*storageTY.Result, error)

func (*Client) ListFirmware

func (c *Client) ListFirmware(queryParams map[string]interface{}) (*storageTY.Result, error)

func (*Client) ListForwardPayload

func (c *Client) ListForwardPayload(queryParams map[string]interface{}) (*storageTY.Result, error)

func (*Client) ListGateway

func (c *Client) ListGateway(queryParams map[string]interface{}) (*storageTY.Result, error)

func (*Client) ListHandler

func (c *Client) ListHandler(queryParams map[string]interface{}) (*storageTY.Result, error)

func (*Client) ListNode

func (c *Client) ListNode(queryParams map[string]interface{}) (*storageTY.Result, error)

func (*Client) ListSchedule

func (c *Client) ListSchedule(queryParams map[string]interface{}) (*storageTY.Result, error)

func (*Client) ListSource

func (c *Client) ListSource(queryParams map[string]interface{}) (*storageTY.Result, error)

func (*Client) ListTask

func (c *Client) ListTask(queryParams map[string]interface{}) (*storageTY.Result, error)

func (*Client) ListVirtualAssistant

func (c *Client) ListVirtualAssistant(queryParams map[string]interface{}) (*storageTY.Result, error)

func (*Client) ListVirtualDevice

func (c *Client) ListVirtualDevice(queryParams map[string]interface{}) (*storageTY.Result, error)

func (*Client) Login

func (c *Client) Login(username, password, token, expiresIn string) (*handlerTY.JwtTokenResponse, error)

func (*Client) ReloadGateway

func (c *Client) ReloadGateway(items ...string) error

func (*Client) ReloadVirtualAssistant

func (c *Client) ReloadVirtualAssistant(items ...string) error

Jump to

Keyboard shortcuts

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