shared.go 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // Copyright erfenjiao, 630166475@qq.com.
  2. // Copyright 2023 EMQ Technologies Co., Ltd.
  3. //
  4. // Licensed under the Apache License, Version 2.0 (the "License");
  5. // you may not use this file except in compliance with the License.
  6. // You may obtain a copy of the License at
  7. //
  8. // http://www.apache.org/licenses/LICENSE-2.0
  9. //
  10. // Unless required by applicable law or agreed to in writing, software
  11. // distributed under the License is distributed on an "AS IS" BASIS,
  12. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. // See the License for the specific language governing permissions and
  14. // limitations under the License.
  15. package runtime
  16. type Meta struct {
  17. RuleId string `json:"ruleId"`
  18. OpId string `json:"opId"`
  19. InstanceId int `json:"instanceId"`
  20. }
  21. type FuncMeta struct {
  22. Meta
  23. FuncId int `json:"funcId"`
  24. }
  25. type Control struct {
  26. SymbolName string `json:"symbolName"`
  27. Meta *Meta `json:"meta,omitempty"`
  28. PluginType string `json:"pluginType"`
  29. DataSource string `json:"dataSource,omitempty"`
  30. Config map[string]interface{} `json:"config,omitempty"`
  31. }
  32. type Command struct {
  33. Cmd string `json:"cmd"`
  34. Arg string `json:"arg"`
  35. }
  36. type FuncData struct {
  37. Func string `json:"func"`
  38. Arg interface{} `json:"arg"`
  39. }
  40. type PluginMeta struct {
  41. Name string `json:"name"`
  42. Version string `json:"version"`
  43. WasmFile string `json:"wasmFile"`
  44. WasmEngine string `json:"wasmEngine"`
  45. }