model

package
v0.2.42 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package model 是 sdk/go/model 的内部薄兼容层。领域模型的单一实现已迁到公共 SDK, internal/* 通过这里的类型别名与常量继续使用,禁止在本包复制会漂移的结构。

语义定义以 docs/architecture/capability-model.md 为准。

Index

Constants

View Source
const (
	DescriptorSchemaID   = sdkmodel.DescriptorSchemaID
	CapabilityAPIVersion = sdkmodel.CapabilityAPIVersion
	CapabilityKind       = sdkmodel.CapabilityKind
)

冻结契约中的 schema 标识与 Capability 常量。

View Source
const (
	DeviceOnline      = sdkmodel.DeviceOnline
	DeviceOffline     = sdkmodel.DeviceOffline
	DeviceUnavailable = sdkmodel.DeviceUnavailable
	DeviceDegraded    = sdkmodel.DeviceDegraded
)
View Source
const (
	EntitySensor     = sdkmodel.EntitySensor
	EntityActuator   = sdkmodel.EntityActuator
	EntityDiagnostic = sdkmodel.EntityDiagnostic
	EntityConfig     = sdkmodel.EntityConfig
)
View Source
const (
	QualityGood        = sdkmodel.QualityGood
	QualityUncertain   = sdkmodel.QualityUncertain
	QualityBad         = sdkmodel.QualityBad
	QualityUnavailable = sdkmodel.QualityUnavailable
)
View Source
const (
	CommandCreated    = sdkmodel.CommandCreated
	CommandDispatched = sdkmodel.CommandDispatched
	CommandAccepted   = sdkmodel.CommandAccepted
	CommandRunning    = sdkmodel.CommandRunning
	CommandSucceeded  = sdkmodel.CommandSucceeded
	CommandFailed     = sdkmodel.CommandFailed
	CommandTimedOut   = sdkmodel.CommandTimedOut
	CommandCancelled  = sdkmodel.CommandCancelled
)
View Source
const (
	PropertyRead      = sdkmodel.PropertyRead
	PropertyWrite     = sdkmodel.PropertyWrite
	PropertyReadWrite = sdkmodel.PropertyReadWrite
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionDecl

type ActionDecl = sdkmodel.ActionDecl

领域模型类型(与 sdk/go/model 完全一致)。

type Capability

type Capability = sdkmodel.Capability

领域模型类型(与 sdk/go/model 完全一致)。

type CapabilityMetadata

type CapabilityMetadata = sdkmodel.CapabilityMetadata

领域模型类型(与 sdk/go/model 完全一致)。

type CapabilitySpec

type CapabilitySpec = sdkmodel.CapabilitySpec

领域模型类型(与 sdk/go/model 完全一致)。

type Command

type Command = sdkmodel.Command

领域模型类型(与 sdk/go/model 完全一致)。

type CommandStatus

type CommandStatus = sdkmodel.CommandStatus

CommandStatus 是 Command 生命周期状态。

type Descriptor

type Descriptor = sdkmodel.Descriptor

领域模型类型(与 sdk/go/model 完全一致)。

type Device

type Device = sdkmodel.Device

领域模型类型(与 sdk/go/model 完全一致)。

type DeviceStatus

type DeviceStatus = sdkmodel.DeviceStatus

DeviceStatus 是设备在线状态(descriptor.schema.json status 枚举)。

type Entity

type Entity = sdkmodel.Entity

领域模型类型(与 sdk/go/model 完全一致)。

type EntityCategory

type EntityCategory = sdkmodel.EntityCategory

EntityCategory 是 Entity 的分类。

type Event

type Event = sdkmodel.Event

领域模型类型(与 sdk/go/model 完全一致)。

type EventDecl

type EventDecl = sdkmodel.EventDecl

领域模型类型(与 sdk/go/model 完全一致)。

type Observation

type Observation = sdkmodel.Observation

领域模型类型(与 sdk/go/model 完全一致)。

type Property

type Property = sdkmodel.Property

领域模型类型(与 sdk/go/model 完全一致)。

type PropertyAccess

type PropertyAccess = sdkmodel.PropertyAccess

PropertyAccess 是 Property 的读写权限。

type Quality

type Quality = sdkmodel.Quality

Quality 是观测质量等级(Observation 与 Property 共用)。

Jump to

Keyboard shortcuts

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