Documentation ¶
Index ¶
- func GetTime() int64
- func GetUUID() string
- type Config
- type CoreClient
- func (c *CoreClient) CreatEntityToken(entityType, id, owner string, token string) (string, error)
- func (c *CoreClient) Delete(url string) ([]byte, error)
- func (c *CoreClient) Get(url string) ([]byte, error)
- func (c *CoreClient) GetCoreUrl(midUrl string, mapUrl map[string]string, entityType string) string
- func (c *CoreClient) GetTokenMap(ctx context.Context) (map[string]string, error)
- func (c *CoreClient) ParseResp(resp *http.Response, err error) ([]byte, error)
- func (c *CoreClient) Patch(url string, data []byte) ([]byte, error)
- func (c *CoreClient) Post(url string, data []byte) ([]byte, error)
- func (c *CoreClient) Put(url string, data []byte) ([]byte, error)
- type CorePatch
- type DeviceService
- func (s *DeviceService) AddDeviceExt(ctx context.Context, req *pb.AddDeviceExtRequest) (*emptypb.Empty, error)
- func (s *DeviceService) CorePatchMethod(ctx context.Context, entityId string, kv map[string]interface{}, path string, ...) (*emptypb.Empty, error)
- func (s *DeviceService) CreateDevice(ctx context.Context, req *pb.CreateDeviceRequest) (*pb.CreateDeviceResponse, error)
- func (s *DeviceService) DeleteDevice(ctx context.Context, req *pb.DeleteDeviceRequest) (*emptypb.Empty, error)
- func (s *DeviceService) DeleteDeviceExt(ctx context.Context, req *pb.DeleteDeviceExtRequest) (*emptypb.Empty, error)
- func (s *DeviceService) EnableDevice(ctx context.Context, req *pb.EnableDeviceRequest) (*emptypb.Empty, error)
- func (s *DeviceService) GetDevice(ctx context.Context, req *pb.GetDeviceRequest) (*pb.GetDeviceResponse, error)
- func (s *DeviceService) ListDevice(ctx context.Context, req *pb.ListDeviceRequest) (*pb.ListDeviceResponse, error)
- func (s *DeviceService) UpdateDevice(ctx context.Context, req *pb.UpdateDeviceRequest) (*pb.UpdateDeviceResponse, error)
- func (s *DeviceService) UpdateDeviceExt(ctx context.Context, req *pb.UpdateDeviceExtRequest) (*emptypb.Empty, error)
- type GroupService
- func (s *GroupService) AddGroupExt(ctx context.Context, req *pb.AddGroupExtRequest) (*emptypb.Empty, error)
- func (s *GroupService) AddGroupItems(ctx context.Context, req *pb.AddGroupItemsRequest) (*emptypb.Empty, error)
- func (s *GroupService) CorePatchMethod(ctx context.Context, entityId string, kv map[string]interface{}, path string, ...) (*emptypb.Empty, error)
- func (s *GroupService) CreateGroup(ctx context.Context, req *pb.CreateGroupRequest) (*pb.CreateGroupResponse, error)
- func (s *GroupService) DelGroupExt(ctx context.Context, req *pb.DelGroupExtRequest) (*emptypb.Empty, error)
- func (s *GroupService) DelGroupItems(ctx context.Context, req *pb.DelGroupItemsRequest) (*emptypb.Empty, error)
- func (s *GroupService) DeleteGroup(ctx context.Context, req *pb.DeleteGroupRequest) (*emptypb.Empty, error)
- func (s *GroupService) GetGroup(ctx context.Context, req *pb.GetGroupRequest) (*pb.GetGroupResponse, error)
- func (s *GroupService) ListGroup(ctx context.Context, req *pb.ListGroupRequest) (*pb.ListGroupResponse, error)
- func (s *GroupService) ListGroupItems(ctx context.Context, req *pb.ListGroupItemsRequest) (*pb.ListGroupItemsResponse, error)
- func (s *GroupService) UpdateGroup(ctx context.Context, req *pb.UpdateGroupRequest) (*pb.UpdateGroupResponse, error)
- func (s *GroupService) UpdateGroupExt(ctx context.Context, req *pb.UpdateGroupExtRequest) (*emptypb.Empty, error)
- type OpenapiService
- func (s *OpenapiService) AddonsIdentify(ctx context.Context, in *openapi_v1.AddonsIdentifyRequest) (*openapi_v1.AddonsIdentifyResponse, error)
- func (s *OpenapiService) Identify(ctx context.Context, in *emptypb.Empty) (*openapi_v1.IdentifyResponse, error)
- func (s *OpenapiService) Status(ctx context.Context, in *emptypb.Empty) (*openapi_v1.StatusResponse, error)
- func (s *OpenapiService) TenantBind(ctx context.Context, in *openapi_v1.TenantBindRequst) (*openapi_v1.TenantBindResponse, error)
- func (s *OpenapiService) TenantUnbind(ctx context.Context, in *openapi_v1.TenantUnbindRequst) (*openapi_v1.TenantUnbindResponse, error)
- type TemplateService
- func (s *TemplateService) AddTemplateAttribute(ctx context.Context, req *pb.AddTemplateAttributeRequest) (*emptypb.Empty, error)
- func (s *TemplateService) AddTemplateCommand(ctx context.Context, req *pb.AddTemplateCommandRequest) (*emptypb.Empty, error)
- func (s *TemplateService) AddTemplateTelemetry(ctx context.Context, req *pb.AddTemplateTelemetryRequest) (*emptypb.Empty, error)
- func (s *TemplateService) AddTemplateTelemetryExt(ctx context.Context, req *pb.AddTemplateTelemetryExtRequest) (*emptypb.Empty, error)
- func (s *TemplateService) CoreConfigPatchMethod(ctx context.Context, entityId string, kv map[string]interface{}, path string, ...) (*emptypb.Empty, error)
- func (s *TemplateService) CreateTemplate(ctx context.Context, req *pb.CreateTemplateRequest) (*pb.CreateTemplateResponse, error)
- func (s *TemplateService) DeleteTemplate(ctx context.Context, req *pb.DeleteTemplateRequest) (*emptypb.Empty, error)
- func (s *TemplateService) DeleteTemplateAttribute(ctx context.Context, req *pb.DeleteTemplateAttributeRequest) (*emptypb.Empty, error)
- func (s *TemplateService) DeleteTemplateCommand(ctx context.Context, req *pb.DeleteTemplateCommandRequest) (*emptypb.Empty, error)
- func (s *TemplateService) DeleteTemplateTelemetry(ctx context.Context, req *pb.DeleteTemplateTelemetryRequest) (*emptypb.Empty, error)
- func (s *TemplateService) DeleteTemplateTelemetryExt(ctx context.Context, req *pb.DeleteTemplateTelemetryExtRequest) (*emptypb.Empty, error)
- func (s *TemplateService) GetTemplate(ctx context.Context, req *pb.GetTemplateRequest) (*pb.GetTemplateResponse, error)
- func (s *TemplateService) GetTemplateAttribute(ctx context.Context, req *pb.GetTemplateAttributeRequest) (*pb.GetTemplateAttributeResponse, error)
- func (s *TemplateService) GetTemplateCommand(ctx context.Context, req *pb.GetTemplateCommandRequest) (*pb.GetTemplateCommandResponse, error)
- func (s *TemplateService) GetTemplatePropConfig(ctx context.Context, entityId string, propId string, classify string) (*pb.EntityResponse, error)
- func (s *TemplateService) GetTemplateTelemetry(ctx context.Context, req *pb.GetTemplateTelemetryRequest) (*pb.GetTemplateTelemetryResponse, error)
- func (s *TemplateService) GetTemplateTelemetryDefine(ctx context.Context, entityId string, propConfigId string) (map[string]interface{}, error)
- func (s *TemplateService) ListTemplate(ctx context.Context, req *pb.ListTemplateRequest) (*pb.ListTemplateResponse, error)
- func (s *TemplateService) ListTemplateAttribute(ctx context.Context, req *pb.ListTemplateAttributeRequest) (*pb.ListTemplateAttributeResponse, error)
- func (s *TemplateService) ListTemplateCommand(ctx context.Context, req *pb.ListTemplateCommandRequest) (*pb.ListTemplateCommandResponse, error)
- func (s *TemplateService) ListTemplatePropConfig(ctx context.Context, entityId string, classify string) (*pb.EntityResponse, error)
- func (s *TemplateService) ListTemplateTelemetry(ctx context.Context, req *pb.ListTemplateTelemetryRequest) (*pb.ListTemplateTelemetryResponse, error)
- func (s *TemplateService) UpdateTemplate(ctx context.Context, req *pb.UpdateTemplateRequest) (*pb.UpdateTemplateResponse, error)
- func (s *TemplateService) UpdateTemplateAttribute(ctx context.Context, req *pb.UpdateTemplateAttributeRequest) (*emptypb.Empty, error)
- func (s *TemplateService) UpdateTemplateCommand(ctx context.Context, req *pb.UpdateTemplateCommandRequest) (*emptypb.Empty, error)
- func (s *TemplateService) UpdateTemplateTelemetry(ctx context.Context, req *pb.UpdateTemplateTelemetryRequest) (*emptypb.Empty, error)
- func (s *TemplateService) UpdateTemplateTelemetryExt(ctx context.Context, req *pb.UpdateTemplateTelemetryExtRequest) (*emptypb.Empty, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶ added in v0.3.0
type Config struct { ID string `json:"id" mapstructure:"id"` Type string `json:"type" mapstructure:"type"` Weight int `json:"weight" mapstructure:"weight"` Enabled bool `json:"enabled" mapstructure:"enabled"` EnabledSearch bool `json:"enabled_search" mapstructure:"enabled_search"` EnabledTimeSeries bool `json:"enabled_time_series" mapstructure:"enabled_time_series"` Description string `json:"description" mapstructure:"description"` Define map[string]interface{} `json:"define" mapstructure:"define"` LastTime int64 `json:"last_time" mapstructure:"last_time"` }
type CoreClient ¶
type CoreClient struct { }
func NewCoreClient ¶
func NewCoreClient() *CoreClient
func (*CoreClient) CreatEntityToken ¶
func (c *CoreClient) CreatEntityToken(entityType, id, owner string, token string) (string, error)
func (*CoreClient) GetCoreUrl ¶
get core url
func (*CoreClient) GetTokenMap ¶
get token
type DeviceService ¶
type DeviceService struct { pb.UnimplementedDeviceServer // contains filtered or unexported fields }
func NewDeviceService ¶
func NewDeviceService() *DeviceService
func (*DeviceService) AddDeviceExt ¶
func (s *DeviceService) AddDeviceExt(ctx context.Context, req *pb.AddDeviceExtRequest) (*emptypb.Empty, error)
func (*DeviceService) CorePatchMethod ¶ added in v0.3.0
func (*DeviceService) CreateDevice ¶
func (s *DeviceService) CreateDevice(ctx context.Context, req *pb.CreateDeviceRequest) (*pb.CreateDeviceResponse, error)
func (*DeviceService) DeleteDevice ¶
func (s *DeviceService) DeleteDevice(ctx context.Context, req *pb.DeleteDeviceRequest) (*emptypb.Empty, error)
func (*DeviceService) DeleteDeviceExt ¶
func (s *DeviceService) DeleteDeviceExt(ctx context.Context, req *pb.DeleteDeviceExtRequest) (*emptypb.Empty, error)
func (*DeviceService) EnableDevice ¶
func (s *DeviceService) EnableDevice(ctx context.Context, req *pb.EnableDeviceRequest) (*emptypb.Empty, error)
func (*DeviceService) GetDevice ¶
func (s *DeviceService) GetDevice(ctx context.Context, req *pb.GetDeviceRequest) (*pb.GetDeviceResponse, error)
func (*DeviceService) ListDevice ¶
func (s *DeviceService) ListDevice(ctx context.Context, req *pb.ListDeviceRequest) (*pb.ListDeviceResponse, error)
func (*DeviceService) UpdateDevice ¶
func (s *DeviceService) UpdateDevice(ctx context.Context, req *pb.UpdateDeviceRequest) (*pb.UpdateDeviceResponse, error)
func (*DeviceService) UpdateDeviceExt ¶
func (s *DeviceService) UpdateDeviceExt(ctx context.Context, req *pb.UpdateDeviceExtRequest) (*emptypb.Empty, error)
type GroupService ¶
type GroupService struct { pb.UnimplementedGroupServer // contains filtered or unexported fields }
func NewGroupService ¶
func NewGroupService() *GroupService
func (*GroupService) AddGroupExt ¶
func (s *GroupService) AddGroupExt(ctx context.Context, req *pb.AddGroupExtRequest) (*emptypb.Empty, error)
func (*GroupService) AddGroupItems ¶
func (s *GroupService) AddGroupItems(ctx context.Context, req *pb.AddGroupItemsRequest) (*emptypb.Empty, error)
func (*GroupService) CorePatchMethod ¶
func (*GroupService) CreateGroup ¶
func (s *GroupService) CreateGroup(ctx context.Context, req *pb.CreateGroupRequest) (*pb.CreateGroupResponse, error)
func (*GroupService) DelGroupExt ¶
func (s *GroupService) DelGroupExt(ctx context.Context, req *pb.DelGroupExtRequest) (*emptypb.Empty, error)
func (*GroupService) DelGroupItems ¶
func (s *GroupService) DelGroupItems(ctx context.Context, req *pb.DelGroupItemsRequest) (*emptypb.Empty, error)
func (*GroupService) DeleteGroup ¶
func (s *GroupService) DeleteGroup(ctx context.Context, req *pb.DeleteGroupRequest) (*emptypb.Empty, error)
func (*GroupService) GetGroup ¶
func (s *GroupService) GetGroup(ctx context.Context, req *pb.GetGroupRequest) (*pb.GetGroupResponse, error)
func (*GroupService) ListGroup ¶
func (s *GroupService) ListGroup(ctx context.Context, req *pb.ListGroupRequest) (*pb.ListGroupResponse, error)
func (*GroupService) ListGroupItems ¶
func (s *GroupService) ListGroupItems(ctx context.Context, req *pb.ListGroupItemsRequest) (*pb.ListGroupItemsResponse, error)
func (*GroupService) UpdateGroup ¶
func (s *GroupService) UpdateGroup(ctx context.Context, req *pb.UpdateGroupRequest) (*pb.UpdateGroupResponse, error)
func (*GroupService) UpdateGroupExt ¶
func (s *GroupService) UpdateGroupExt(ctx context.Context, req *pb.UpdateGroupExtRequest) (*emptypb.Empty, error)
type OpenapiService ¶
type OpenapiService struct {
v1.UnimplementedOpenapiServer
}
OpenapiService is a openapi service.
func NewOpenapiService ¶
func NewOpenapiService() *OpenapiService
NewOpenapiService new a openapi service.
func (*OpenapiService) AddonsIdentify ¶
func (s *OpenapiService) AddonsIdentify(ctx context.Context, in *openapi_v1.AddonsIdentifyRequest) (*openapi_v1.AddonsIdentifyResponse, error)
AddonsIdentify implements AddonsIdentify.OpenapiServer.
func (*OpenapiService) Identify ¶
func (s *OpenapiService) Identify(ctx context.Context, in *emptypb.Empty) (*openapi_v1.IdentifyResponse, error)
Identify implements Identify.OpenapiServer.
func (*OpenapiService) Status ¶
func (s *OpenapiService) Status(ctx context.Context, in *emptypb.Empty) (*openapi_v1.StatusResponse, error)
Status implements Status.OpenapiServer.
func (*OpenapiService) TenantBind ¶
func (s *OpenapiService) TenantBind(ctx context.Context, in *openapi_v1.TenantBindRequst) (*openapi_v1.TenantBindResponse, error)
TenantBind implements TenantBind.OpenapiServer.
func (*OpenapiService) TenantUnbind ¶
func (s *OpenapiService) TenantUnbind(ctx context.Context, in *openapi_v1.TenantUnbindRequst) (*openapi_v1.TenantUnbindResponse, error)
TenantUnbind implements TenantUnbind.OpenapiServer.
type TemplateService ¶ added in v0.3.0
type TemplateService struct { pb.UnimplementedTemplateServer // contains filtered or unexported fields }
func NewTemplateService ¶ added in v0.3.0
func NewTemplateService() *TemplateService
func (*TemplateService) AddTemplateAttribute ¶ added in v0.3.0
func (s *TemplateService) AddTemplateAttribute(ctx context.Context, req *pb.AddTemplateAttributeRequest) (*emptypb.Empty, error)
func (*TemplateService) AddTemplateCommand ¶ added in v0.3.0
func (s *TemplateService) AddTemplateCommand(ctx context.Context, req *pb.AddTemplateCommandRequest) (*emptypb.Empty, error)
func (*TemplateService) AddTemplateTelemetry ¶ added in v0.3.0
func (s *TemplateService) AddTemplateTelemetry(ctx context.Context, req *pb.AddTemplateTelemetryRequest) (*emptypb.Empty, error)
func (*TemplateService) AddTemplateTelemetryExt ¶ added in v0.3.0
func (s *TemplateService) AddTemplateTelemetryExt(ctx context.Context, req *pb.AddTemplateTelemetryExtRequest) (*emptypb.Empty, error)
func (*TemplateService) CoreConfigPatchMethod ¶ added in v0.3.0
func (s *TemplateService) CoreConfigPatchMethod(ctx context.Context, entityId string, kv map[string]interface{}, path string, operator string) (*emptypb.Empty, error)
abstraction
func (*TemplateService) CreateTemplate ¶ added in v0.3.0
func (s *TemplateService) CreateTemplate(ctx context.Context, req *pb.CreateTemplateRequest) (*pb.CreateTemplateResponse, error)
func (*TemplateService) DeleteTemplate ¶ added in v0.3.0
func (s *TemplateService) DeleteTemplate(ctx context.Context, req *pb.DeleteTemplateRequest) (*emptypb.Empty, error)
func (*TemplateService) DeleteTemplateAttribute ¶ added in v0.3.0
func (s *TemplateService) DeleteTemplateAttribute(ctx context.Context, req *pb.DeleteTemplateAttributeRequest) (*emptypb.Empty, error)
func (*TemplateService) DeleteTemplateCommand ¶ added in v0.3.0
func (s *TemplateService) DeleteTemplateCommand(ctx context.Context, req *pb.DeleteTemplateCommandRequest) (*emptypb.Empty, error)
func (*TemplateService) DeleteTemplateTelemetry ¶ added in v0.3.0
func (s *TemplateService) DeleteTemplateTelemetry(ctx context.Context, req *pb.DeleteTemplateTelemetryRequest) (*emptypb.Empty, error)
func (*TemplateService) DeleteTemplateTelemetryExt ¶ added in v0.3.0
func (s *TemplateService) DeleteTemplateTelemetryExt(ctx context.Context, req *pb.DeleteTemplateTelemetryExtRequest) (*emptypb.Empty, error)
func (*TemplateService) GetTemplate ¶ added in v0.3.0
func (s *TemplateService) GetTemplate(ctx context.Context, req *pb.GetTemplateRequest) (*pb.GetTemplateResponse, error)
func (*TemplateService) GetTemplateAttribute ¶ added in v0.3.0
func (s *TemplateService) GetTemplateAttribute(ctx context.Context, req *pb.GetTemplateAttributeRequest) (*pb.GetTemplateAttributeResponse, error)
func (*TemplateService) GetTemplateCommand ¶ added in v0.3.0
func (s *TemplateService) GetTemplateCommand(ctx context.Context, req *pb.GetTemplateCommandRequest) (*pb.GetTemplateCommandResponse, error)
func (*TemplateService) GetTemplatePropConfig ¶ added in v0.3.0
func (s *TemplateService) GetTemplatePropConfig(ctx context.Context, entityId string, propId string, classify string) (*pb.EntityResponse, error)
func (*TemplateService) GetTemplateTelemetry ¶ added in v0.3.0
func (s *TemplateService) GetTemplateTelemetry(ctx context.Context, req *pb.GetTemplateTelemetryRequest) (*pb.GetTemplateTelemetryResponse, error)
func (*TemplateService) GetTemplateTelemetryDefine ¶ added in v0.3.0
func (*TemplateService) ListTemplate ¶ added in v0.3.0
func (s *TemplateService) ListTemplate(ctx context.Context, req *pb.ListTemplateRequest) (*pb.ListTemplateResponse, error)
func (*TemplateService) ListTemplateAttribute ¶ added in v0.3.0
func (s *TemplateService) ListTemplateAttribute(ctx context.Context, req *pb.ListTemplateAttributeRequest) (*pb.ListTemplateAttributeResponse, error)
func (*TemplateService) ListTemplateCommand ¶ added in v0.3.0
func (s *TemplateService) ListTemplateCommand(ctx context.Context, req *pb.ListTemplateCommandRequest) (*pb.ListTemplateCommandResponse, error)
func (*TemplateService) ListTemplatePropConfig ¶ added in v0.3.0
func (s *TemplateService) ListTemplatePropConfig(ctx context.Context, entityId string, classify string) (*pb.EntityResponse, error)
func (*TemplateService) ListTemplateTelemetry ¶ added in v0.3.0
func (s *TemplateService) ListTemplateTelemetry(ctx context.Context, req *pb.ListTemplateTelemetryRequest) (*pb.ListTemplateTelemetryResponse, error)
func (*TemplateService) UpdateTemplate ¶ added in v0.3.0
func (s *TemplateService) UpdateTemplate(ctx context.Context, req *pb.UpdateTemplateRequest) (*pb.UpdateTemplateResponse, error)
func (*TemplateService) UpdateTemplateAttribute ¶ added in v0.3.0
func (s *TemplateService) UpdateTemplateAttribute(ctx context.Context, req *pb.UpdateTemplateAttributeRequest) (*emptypb.Empty, error)
func (*TemplateService) UpdateTemplateCommand ¶ added in v0.3.0
func (s *TemplateService) UpdateTemplateCommand(ctx context.Context, req *pb.UpdateTemplateCommandRequest) (*emptypb.Empty, error)
func (*TemplateService) UpdateTemplateTelemetry ¶ added in v0.3.0
func (s *TemplateService) UpdateTemplateTelemetry(ctx context.Context, req *pb.UpdateTemplateTelemetryRequest) (*emptypb.Empty, error)
func (*TemplateService) UpdateTemplateTelemetryExt ¶ added in v0.3.0
func (s *TemplateService) UpdateTemplateTelemetryExt(ctx context.Context, req *pb.UpdateTemplateTelemetryExtRequest) (*emptypb.Empty, error)
Click to show internal directories.
Click to hide internal directories.