Documentation ¶
Overview ¶
application is app who will use the cloud api
device is a product instance, which is managed by our platform
product is a abstract define of same devices made by some vendor
vendor is those who make products
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct { // inner id ID int32 // App-Key for api AppKey string `sql:"type:varchar(200);not null;"` // App-Token for web hook AppToken string `sql:"type:varchar(200);not null;"` // Report Url for web hook ReportUrl string `sql:"type:varchar(200);not null;"` // name AppName string `sql:"type:varchar(200);"` // desc AppDescription string `sql:"type:text;"` // app domain which allows wildcard string like "*", "vendor/12", "product/10" AppDomain string `sql:"type:varchar(200);not null;"` CreatedAt time.Time UpdatedAt time.Time }
type Device ¶
type Device struct { // inner id ID int64 // which product the device belongs to ProductID int32 // universal device identifier, generated from vendorid-productid-deviceserial DeviceIdentifier string `sql:"type:varchar(200);not null;unique;key"` // device secret which is auto generated by the platform DeviceSecret string `sql:"type:varchar(200);not null;"` // device key is used to auth a device DeviceKey string `sql:"type:varchar(200);not null;key;"` // device name DeviceName string `sql:"type:varchar(200);not null;"` // device desc DeviceDescription string `sql:"type:text;not null;"` // device version(the agent version) DeviceVersion string `sql:"type:text;not null;"` // change history CreatedAt time.Time UpdatedAt time.Time }
type Product ¶
type Product struct { // inner id ID int32 // which vendor VendorID int32 // name ProductName string `sql:"type:varchar(200);not null;"` // desc ProductDescription string `sql:"type:text;not null;"` // product key to auth a product ProductKey string `sql:"type:varchar(200);not null;unique;key;"` // product config string (JSON) ProductConfig string `sql:"type:text"; not null;` // change history CreatedAt time.Time UpdatedAt time.Time Devices []Device }
type Vendor ¶
type Vendor struct { // inner id ID int32 // vendor name VendorName string `sql:"type:varchar(200);not null;"` // vendor key VendorKey string `sql:"type:varchar(200);not null;key;"` // vendor description VendorDescription string `sql:"type:text;not null;"` // change history CreatedAt time.Time UpdatedAt time.Time Products []Product }
Click to show internal directories.
Click to hide internal directories.