proxy

package
v0.0.0-...-acb24f0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GinRouterClientProxy

func GinRouterClientProxy(action Action, options *seanet.SeanetClientOptions) func(*gin.Context)

Types

type Action

type Action string
const (
	GetDevice    Action = "GetDevice"
	UpdateDevice Action = "UpdateDevice"
	ListDevice   Action = "ListDevice"

	// gateway
	SwitchDevice            Action = "SwitchDevice"
	ControlGateway          Action = "ControlGateway"
	GetDeviceLog            Action = "GetDeviceLog"
	ListGatewayDevice       Action = "ListGatewayDevice"
	ListGatewayRule         Action = "ListGatewayRule"
	ListGatewayRuleDevices  Action = "ListGatewayRuleDevices"
	ListGatewaySubDevice    Action = "ListGatewaySubDevice"
	CreateGatewayRuleDevice Action = "CreateGatewayRuleDevice"
	DeleteGatewayRuleDevice Action = "DeleteGatewayRuleDevice"
)

type ActionFuncMap

type ActionFuncMap[KEY Action, VALUE NormalProxyFunc] map[KEY]VALUE
var ActionFunc ActionFuncMap[Action, NormalProxyFunc] = map[Action]NormalProxyFunc{
	GetDevice:               ginGetDevice,
	UpdateDevice:            ginUpdateDevice,
	ListDevice:              ginListDevice,
	SwitchDevice:            ginSwitchDevice,
	ControlGateway:          ginControlGateway,
	GetDeviceLog:            ginGetDeviceLog,
	ListGatewayRule:         ginListGatewayRule,
	ListGatewayRuleDevices:  ginListGatewayRuleDevices,
	ListGatewaySubDevice:    ginListGatewaySubDevice,
	CreateGatewayRuleDevice: ginCreateGatewayRuleDevice,
	DeleteGatewayRuleDevice: ginDeleteGatewayRuleDevice,
}

type NormalProxyFunc

type NormalProxyFunc func(c *gin.Context, cli *seanet.SeanetClient)

Jump to

Keyboard shortcuts

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