api

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: Apache-2.0 Imports: 21 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_ACTION_GATEWAY = "/api/action/gateway"

	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_FIRMWARE_UPLOAD = "/api/firmware/upload"

	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"

	API_SETTINGS        = "/api/settings"
	API_SETTINGS_SYSTEM = "/api/settings/system"

	API_USER_LIST    = "/api/user"
	API_USER_DELETE  = "/api/user"
	API_USER_PROFILE = "/api/user/profile"

	API_POLICY_LIST   = "/api/policy"
	API_POLICY_DELETE = "/api/policy"

	API_SERVICE_ACCOUNT_LIST   = "/api/serviceaccount"
	API_SERVICE_ACCOUNT_CREATE = "/api/serviceaccount/create"
	API_SERVICE_ACCOUNT_UPDATE = "/api/serviceaccount/update"
	API_SERVICE_ACCOUNT_DELETE = "/api/serviceaccount"
)

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) CreateServiceAccount added in v2.2.0

func (c *Client) CreateServiceAccount(account *svcAccountTY.ServiceAccount) (*svcAccountTY.CreateAccountResponse, error)

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) DeletePolicy added in v2.2.0

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

func (*Client) DeleteSchedule

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

func (*Client) DeleteServiceAccount added in v2.2.0

func (c *Client) DeleteServiceAccount(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) DeleteUser added in v2.2.0

func (c *Client) DeleteUser(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) DisableUser added in v2.2.0

func (c *Client) DisableUser(selectors ...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) EnableUser added in v2.2.0

func (c *Client) EnableUser(selectors ...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) ExecuteGatewayAction added in v2.2.0

func (c *Client) ExecuteGatewayAction(action string, ids []string) error

func (*Client) ExecuteNodeAction

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

func (*Client) FindDataRepository added in v2.2.0

func (c *Client) FindDataRepository(id string) (*dataRepoTY.Config, error)

func (*Client) FindField added in v2.2.0

func (c *Client) FindField(id, gatewayID, nodeID, sourceID, fieldID string) (*fieldTY.Field, error)

func (*Client) FindFirmware added in v2.2.0

func (c *Client) FindFirmware(id string) (*firmwareTY.Firmware, error)

func (*Client) FindGateway added in v2.2.0

func (c *Client) FindGateway(id string) (*gwTY.Config, error)

func (*Client) FindNode added in v2.2.0

func (c *Client) FindNode(id, gatewayID, nodeID string) (*nodeTY.Node, error)

func (*Client) FindPolicy added in v2.2.0

func (c *Client) FindPolicy(id string) (*policyTY.Policy, error)

func (*Client) FindServiceAccount added in v2.2.0

func (c *Client) FindServiceAccount(id, name, userRef string) (*svcAccountTY.ServiceAccount, error)

func (*Client) FindServiceAccounts added in v2.2.0

func (c *Client) FindServiceAccounts(name, userRef string) ([]svcAccountTY.ServiceAccount, error)

func (*Client) FindSource added in v2.2.0

func (c *Client) FindSource(id, gatewayID, nodeID, sourceID string) (*sourceTY.Source, error)

func (*Client) FindUser added in v2.2.0

func (c *Client) FindUser(id, username string) (*userTY.User, error)

func (*Client) GetField added in v2.2.0

func (c *Client) GetField(id string) (*fieldTY.Field, error)

func (*Client) GetNode added in v2.2.0

func (c *Client) GetNode(id string) (*nodeTY.Node, error)

func (*Client) GetProfile added in v2.2.0

func (c *Client) GetProfile() (*userTY.User, error)

func (*Client) GetServerVersion

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

func (*Client) GetSource added in v2.2.0

func (c *Client) GetSource(id string) (*sourceTY.Source, error)

func (*Client) GetSystemSettings added in v2.2.0

func (c *Client) GetSystemSettings() (*settingsTY.Settings, 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) ListPolicy added in v2.2.0

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

func (*Client) ListSchedule

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

func (*Client) ListServiceAccount added in v2.2.0

func (c *Client) ListServiceAccount(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) ListUser added in v2.2.0

func (c *Client) ListUser(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) MergeSystemSettings added in v2.2.0

func (c *Client) MergeSystemSettings(overlay map[string]interface{}) error

func (*Client) ReloadGateway

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

func (*Client) ReloadVirtualAssistant

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

func (*Client) ResolveGatewayIDs added in v2.2.0

func (c *Client) ResolveGatewayIDs(selectors []string, requireEnabled bool) ([]string, error)

func (*Client) ResolveNodeIDs added in v2.2.0

func (c *Client) ResolveNodeIDs(selectors []string) ([]string, error)

func (*Client) ResolveServiceAccountIDs added in v2.2.0

func (c *Client) ResolveServiceAccountIDs(selectors []string, userRef string) ([]string, error)

func (*Client) ResolveUserIDs added in v2.2.0

func (c *Client) ResolveUserIDs(selectors []string) ([]string, error)

func (*Client) SaveDataRepository added in v2.2.0

func (c *Client) SaveDataRepository(item *dataRepoTY.Config) error

func (*Client) SaveField added in v2.2.0

func (c *Client) SaveField(field *fieldTY.Field) error

func (*Client) SaveFirmware added in v2.2.0

func (c *Client) SaveFirmware(firmware *firmwareTY.Firmware) error

func (*Client) SaveGateway added in v2.2.0

func (c *Client) SaveGateway(gateway *gwTY.Config) error

func (*Client) SaveNode added in v2.2.0

func (c *Client) SaveNode(node *nodeTY.Node) error

func (*Client) SavePolicy added in v2.2.0

func (c *Client) SavePolicy(policy *policyTY.Policy) error

func (*Client) SaveSource added in v2.2.0

func (c *Client) SaveSource(source *sourceTY.Source) error

func (*Client) SaveUser added in v2.2.0

func (c *Client) SaveUser(update *userTY.UserAdminUpdate) error

func (*Client) SetResourcePath added in v2.2.0

func (c *Client) SetResourcePath(kind, selector, keyPath, value string, rawText bool) error

SetResourcePath loads a resource, sets a dotted JSON path, and saves it.

func (*Client) SetSystemSettingsPath added in v2.2.0

func (c *Client) SetSystemSettingsPath(keyPath, value string, rawText bool) error

func (*Client) UpdateServiceAccount added in v2.2.0

func (c *Client) UpdateServiceAccount(account *svcAccountTY.ServiceAccount) error

func (*Client) UpdateSettings added in v2.2.0

func (c *Client) UpdateSettings(settings *settingsTY.Settings) error

func (*Client) UploadFirmware added in v2.2.0

func (c *Client) UploadFirmware(id, filename string) error

Jump to

Keyboard shortcuts

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