models

package
v0.0.0-...-7077701 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2020 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Overview

Licensed under the Apache License, Version 2.0 (the "License"); you may not use p file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use p file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use p file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	DeploymentStatusCreated = "created"
	DeploymentStatusRunning = "running"
	DeploymentStatusStopped = "stopped"
	DeploymentStatusUnknown = "unknown"
)

Deployment status

View Source
const (
	KDeviceStatusConnected    = "CONNECTED"
	KDeviceStatusDisconnected = "DISCONNECTED"
	KDeviceStatusUnknown      = "UNKNOWN"
)
View Source
const (
	KEndpointDirectionIn  = "in"
	KEndpointDirectionOut = "out"
)
View Source
const (
	MetadataDeviceType = "deviceType"
	MetadataDeviceName = "deviceName"
	MetadataRequestID  = "requestId"
	MetadataUserName   = "userName"
	MetadataUserID     = "userId"
	MetadataTimestamp  = "timestamp"
)

Predefined metadata key

View Source
const (
	MessageTypePostAttributesRequest = "Post attributes"
	MessageTypePostTelemetryRequest  = "Post telemetry"
	MessageTypeActivityEvent         = "Activity event"
	MessageTypeInactivityEvent       = "Inactivity event"
	MessageTypeConnectEvent          = "Connect event"
	MessageTypeDisconnectEvent       = "Disconnect event"
)

Predefined message types

View Source
const (
	JSONType = "json"
	YamlType = "yaml"
)

parser type

View Source
const (
	ProjectStatusActive   = "active"
	ProjectStatusInactive = "inactive"
)

ProjectStatus

View Source
const (
	RULE_STATUS_CREATED = "created"
	RULE_STATUS_STARTED = "started"
	RULE_STATUS_STOPPED = "stopped"
	RULE_STATUS_UNKNOWN = "unknown"
)

RuleStatus ...

View Source
const (
	OBJECT_PATH_MESSAGES = "/pandas/messages"
)
View Source
const (
	OBJECT_PATH_RULECHAIN = "/pandas/rulechains"
)

Variables

View Source
var (
	InvalidModelError      = newModelError("invalid model '%s'")
	InvalidBundleKindError = newModelError("invalid model bundle '%s'")
	InvalidBundleError     = newModelError("invalid bundle '%s'")
	InvalidParameterError  = newModelError("invalid parameter '%s'")
)

model errors

Functions

This section is empty.

Types

type AddProjectNotify

type AddProjectNotify struct {
	ProjectID string
}

AddProjectNotify ...

type AddTrackpointNotify

type AddTrackpointNotify struct {
	Trackpoint lbsproxy.TrackPoint
	ProjectID  string
	DeviceID   string
	DeviceName string
}

AddTrackpointNotify ...

type Bundle

type Bundle interface {
	Scheme() BundleScheme
	Content() []byte
	Kind() BundleKind
	Name() string
}

Bundle Bundle factory

func NewBundle

func NewBundle(name string, kind BundleKind, data []byte, scheme BundleScheme) Bundle

NewBundle ...

type BundleKind

type BundleKind string

BundleKind Bundle Kind

const (
	BundleKindPresentation BundleKind = "ModelPresentation"
	BundleKindDefinition   BundleKind = "ModelDefinition"
)

BundleKind

type BundleScheme

type BundleScheme string

BundleScheme Bundle Scheme

const (
	BundleSchemeYaml    BundleScheme = "yaml"
	BundleSchemeJSON    BundleScheme = "json"
	BundleSchemeInvalid BundleScheme = "invalid"
)

BundleScheme

func BundleSchemeWithNameSuffix

func BundleSchemeWithNameSuffix(name string) BundleScheme

BundleSchemeWithNameSuffix ...

type Dashboard

type Dashboard struct {
	ID                      string `json:"id"`
	ProjectNumber           string `json:"projectNumber"`
	ProjectActiveNumber     string `json:"projectActivieNumber"`
	DeviceModelNumber       string `json:"modelNumber"`
	DeviceModelActiveNumber string `json:"deviceModelActiveNumber"`
	DeviceNumber            string `json:"deviceNumber"`
	DeviceActiveNumber      string `json:"deviceActiveNumber"`
	WorkshopNumber          string `json:"workshopNumber"`
	WorkshopActiveNumber    string `json:"workshopActiveNumber"`
}

Dashboard Dashboard swagger:model Dashboard

func (*Dashboard) MarshalBinary

func (m *Dashboard) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Dashboard) UnmarshalBinary

func (m *Dashboard) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Dashboard) Validate

func (m *Dashboard) Validate(formats strfmt.Registry) error

Validate validates this deployment

type DataModel

type DataModel struct {
	Name        string            `json:"name"`
	DataModelID string            `json:"datamodelid"`
	Domain      string            `json:"domain"`
	Fields      []*DataModelField `json:"fields"`
}

DataModel ...

func NewDataModel

func NewDataModel() *DataModel

NewDataModel ...

func (*DataModel) AddField

func (m *DataModel) AddField(field *DataModelField)

AddField ...

func (*DataModel) WithDomain

func (m *DataModel) WithDomain(domain string) *DataModel

WithDomain ...

func (*DataModel) WithName

func (m *DataModel) WithName(name string) *DataModel

WithName ...

type DataModelField

type DataModelField struct {
	Key          string `json:"key"`
	Value        string `json:"value"`
	Type         string `json:"type"`
	DefaultValue string `json:"defaultValue"`
}

DataModelField ...

func NewDataModelField

func NewDataModelField(key string, tp string, defaultValue string) *DataModelField

NewDataModelField ...

type DataSource

type DataSource struct {
	Name         string `json:"name"`
	Protocol     string `json:"protocol"`
	IsProvider   bool   `json:"isProvider"`
	ServicePort  string `json:"servicePort"`
	IsTLSEnabled bool   `json:"isTlsEnabled"`
	ConnectURL   string `json:"connectURL"`
	CertFile     []byte `json:"certFile"`
	KeyFile      []byte `json:"keyFile"`
}

type DeleteProjectNotify

type DeleteProjectNotify struct {
	ProjectID string
}

DeleteProjectNotify ...

type Deployment

type Deployment struct {
	ModelTypeInfo
	gorm.Model
	UserID        string            `json:"userId" yaml:"userId" gorm:"size:255"`
	Name          string            `json:"name" yaml:"name" gorm:"size:255"`
	RuleChainID   string            `json:"ruleChainId" yaml:"ruleChainId" gorm:"type:vchar(100)"`
	Reader        string            `json:"reader" yaml:"reader"`
	ReaderConfigs map[string]string `json:"readerConfigs" yaml:"readerConfigs"`
	Status        string            `json:"status" yaml:"status"`
	CreatedAt     *time.Time        `json:"createdAt,omitempty" yaml:"createdAt"`
	ID            string            `json:"id,omitempty" yaml:"id" gorm:"type:vchar(100),unique_index"`
}

Deployment Deployment swagger:model Deployment

func (*Deployment) MarshalBinary

func (m *Deployment) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Deployment) UnmarshalBinary

func (m *Deployment) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Deployment) Validate

func (m *Deployment) Validate(formats strfmt.Registry) error

Validate validates this deployment

type DeploymentControl

type DeploymentControl struct {
	Action string `json:"action"`
}

DeploymentControl DeploymentControl swagger:model DeploymentControl

func (*DeploymentControl) MarshalBinary

func (m *DeploymentControl) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*DeploymentControl) UnmarshalBinary

func (m *DeploymentControl) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*DeploymentControl) Validate

func (m *DeploymentControl) Validate(formats strfmt.Registry) error

Validate validates this deployment

type Device

type Device struct {
	ModelTypeInfo
	gorm.Model
	ID            string      `json:"id"`
	Name          string      `json:"name"`
	Description   string      `json:"description"`
	Status        string      `json:"status"`
	UserID        string      `json:"userID"`
	ProjectID     string      `json:"projectID"`
	ModelID       string      `json:"modelID"`
	CreatedAt     time.Time   `json:"createdAt"`
	LastUpdatedAt time.Time   `json:"lastUpdatedAt"`
	Values        []DataModel `json:"dataModels"`
}

Device Device swagger:model Device

func (*Device) MarshalBinary

func (m *Device) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Device) UnmarshalBinary

func (m *Device) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Device) Validate

func (m *Device) Validate(formats strfmt.Registry) error

Validate validates this deployment

type DeviceData

type DeviceData struct {
	ID string `json:"id"`
}

DeviceData DeviceData swagger:model DeviceData

func (*DeviceData) MarshalBinary

func (m *DeviceData) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*DeviceData) UnmarshalBinary

func (m *DeviceData) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*DeviceData) Validate

func (m *DeviceData) Validate(formats strfmt.Registry) error

Validate validates this deployment

type DeviceInProject

type DeviceInProject struct {
	ModelTypeInfo
	DeviceID      string    `json:"deviceID"`
	DeviceName    string    `json:"deviceName"`
	ProjectID     string    `json:"projectID"`
	UserID        string    `json:"userDd"`
	CreatedAt     time.Time `json:"createdAt"`
	LastUpdatedAt time.Time `json:"lastUpdatedAt"`
	Status        string    `json:"status"`
}

DeviceInProject represent a device in project

func NewDeviceInProject

func NewDeviceInProject() *DeviceInProject

NewDeviceInProject ...

func (*DeviceInProject) MarshalBinary

func (m *DeviceInProject) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*DeviceInProject) UnmarshalBinary

func (m *DeviceInProject) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*DeviceInProject) Validate

func (m *DeviceInProject) Validate(formats strfmt.Registry) error

Validate validates this deployment

type DeviceLog

type DeviceLog struct {
	ID string `json:"id"`
}

DeviceLog DeviceLog swagger:model DeviceLog

func (*DeviceLog) MarshalBinary

func (m *DeviceLog) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*DeviceLog) UnmarshalBinary

func (m *DeviceLog) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*DeviceLog) Validate

func (m *DeviceLog) Validate(formats strfmt.Registry) error

Validate validates this deployment

type DeviceMessage

type DeviceMessage struct {
	ID        string    `json:"id"`
	Endpoint  string    `json:"endpoint"`
	Payload   []byte    `json:"payload"`
	CreatedAt time.Time `json:"createdAt"`
}

DeviceMessage DeviceMessage

func NewDeviceMessage

func NewDeviceMessage() *DeviceMessage

NewDeviceMessage ...

func (*DeviceMessage) MarshalBinary

func (m *DeviceMessage) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*DeviceMessage) UnmarshalBinary

func (m *DeviceMessage) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*DeviceMessage) Validate

func (m *DeviceMessage) Validate(formats strfmt.Registry) error

Validate validates this deployment

type DeviceMetrics

type DeviceMetrics struct {
	DeviceID              string    `json:"deviceID"`
	CreatedAt             time.Time `json:"createdAt"`
	LastUpdatedAt         time.Time `json:"lastUpdatedAt"`
	ConnectCount          int32     `json:"connectCount"`
	DisconnectCount       int32     `json:"disconnectCount"`
	LastConnectedAt       time.Time `json:"lastConnectedAt"`
	LastDisconnectedAt    time.Time `json:"lastDisconnectedAt"`
	MessageCount          int32     `json:"messageCount"`
	LastMessageReceivedAt time.Time `json:"lastMessageReceivedAt"`
}

DeviceMetrics DeviceMetrics

func NewDeviceMetrics

func NewDeviceMetrics() *DeviceMetrics

NewDeviceMetrics ...

func (*DeviceMetrics) MarshalBinary

func (m *DeviceMetrics) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*DeviceMetrics) UnmarshalBinary

func (m *DeviceMetrics) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*DeviceMetrics) Validate

func (m *DeviceMetrics) Validate(formats strfmt.Registry) error

Validate validates this deployment

type DeviceModel

type DeviceModel struct {
	ModelTypeInfo
	gorm.Model
	Name          string       `json:"name"`
	ID            string       `json:"id"`
	Description   string       `json:"description"`
	Domain        string       `json:"domain"`
	Version       string       `json:"version"`
	Endpoints     []*Endpoint  `json:"endpoints"`
	DataModels    []*DataModel `json:"dataModel"`
	IsLogical     bool         `json:"isLogical"`
	IsCompound    bool         `json:"isCompound"`
	ChildModels   []string     `json:"childModels" gorm:"type:string[]"`
	IsPreset      bool         `json:"isPreset"`
	UserID        string       `json:"userId"`
	CreatedAt     time.Time    `json:"createdAt"`
	LastUpdatedAt time.Time    `json:"updatedAt"`
	Icon          string       `json:"icon"`
}

DeviceModel DeviceModel swagger:model DeviceModel

func NewDeviceModel

func NewDeviceModel() *DeviceModel

NewDeviceModel ...

func (*DeviceModel) AddDataModel

func (m *DeviceModel) AddDataModel(dataModel *DataModel)

AddDataModel ...

func (*DeviceModel) AddEndpoint

func (m *DeviceModel) AddEndpoint(ep *Endpoint)

AddEndpoint ...

func (*DeviceModel) MarshalBinary

func (m *DeviceModel) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*DeviceModel) UnmarshalBinary

func (m *DeviceModel) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*DeviceModel) Validate

func (m *DeviceModel) Validate(formats strfmt.Registry) error

Validate validates this deployment

func (*DeviceModel) WithChildModels

func (m *DeviceModel) WithChildModels(models []string) *DeviceModel

WithChildModels ...

func (*DeviceModel) WithCompound

func (m *DeviceModel) WithCompound(compound bool) *DeviceModel

WithCompound ...

func (*DeviceModel) WithDescription

func (m *DeviceModel) WithDescription(description string) *DeviceModel

WithDescription ...

func (*DeviceModel) WithDomain

func (m *DeviceModel) WithDomain(domain string) *DeviceModel

WithDomain ...

func (*DeviceModel) WithIcon

func (m *DeviceModel) WithIcon(icon string) *DeviceModel

WithIcon ...

func (*DeviceModel) WithLogical

func (m *DeviceModel) WithLogical(logical bool) *DeviceModel

WithLogical ...

func (*DeviceModel) WithName

func (m *DeviceModel) WithName(name string) *DeviceModel

WithName ...

func (*DeviceModel) WithVersion

func (m *DeviceModel) WithVersion(version string) *DeviceModel

WithVersion ...

type Direction

type Direction int
const (
	DirectionUp   Direction = 0
	DirectionDown Direction = 1
	DirectionAll  Direction = 2
)

type Endpoint

type Endpoint struct {
	Path   string            `json:"path"`
	Format string            `json:"format"`
	Models map[string]string `json:"models"`
}

Endpoint Endpoint swagger:model Endpoint

func NewEndpoint

func NewEndpoint() *Endpoint

NewEndpoint ...

func (*Endpoint) MarshalBinary

func (m *Endpoint) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Endpoint) UnmarshalBinary

func (m *Endpoint) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Endpoint) Validate

func (m *Endpoint) Validate(formats strfmt.Registry) error

Validate validates this deployment

func (*Endpoint) WithDataModel

func (m *Endpoint) WithDataModel(modelName string, direction string) *Endpoint

WithDataModel ...

func (*Endpoint) WithFormat

func (m *Endpoint) WithFormat(format string) *Endpoint

WithFormat ...

func (*Endpoint) WithPath

func (m *Endpoint) WithPath(path string) *Endpoint

WithPath ...

type Error

type Error struct {
	Code        int32  `json:"code"`
	Description string `json:"description"`
}

Error Error swagger:model Error

func (*Error) MarshalBinary

func (m *Error) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Error) UnmarshalBinary

func (m *Error) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Error) Validate

func (m *Error) Validate(formats strfmt.Registry) error

Validate validates this deployment

type LogData

type LogData struct {
	Meta    LogMetaInfo `json:"meta"`
	Line    string      `json:"line"`
	Payload []byte      `json:"payload"`
	Result  string      `json:"result"`
}

swagger:model LogData

func (*LogData) MarshalBinary

func (m *LogData) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*LogData) UnmarshalBinary

func (m *LogData) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*LogData) Validate

func (m *LogData) Validate(formats strfmt.Registry) error

Validate validates this deployment

type LogMetaInfo

type LogMetaInfo struct {
	ProjectId  string     `json:"projectId"`
	DeviceId   string     `json:"deviceId"`
	DeviceName string     `json:"deviceName"`
	MessageId  string     `json:"messageId"`
	Type       string     `json:"type"`
	Direction  int        `json:"direction"`
	Time       *time.Time `json:"time"`
	RIndex     int64      `json:"rindex"`
}

swagger:model LogMetaInfo

func (*LogMetaInfo) MarshalBinary

func (m *LogMetaInfo) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*LogMetaInfo) UnmarshalBinary

func (m *LogMetaInfo) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*LogMetaInfo) Validate

func (m *LogMetaInfo) Validate(formats strfmt.Registry) error

Validate validates this deployment

type LoginToken

type LoginToken struct {

	// access token
	AccessToken string `json:"access_token,omitempty"`

	// token type
	TokenType string `json:"token_type,omitempty"`
}

LoginToken login token swagger:model LoginToken

func (*LoginToken) MarshalBinary

func (m *LoginToken) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*LoginToken) UnmarshalBinary

func (m *LoginToken) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*LoginToken) Validate

func (m *LoginToken) Validate(formats strfmt.Registry) error

Validate validates this login token

type Message

type Message interface {
	GetID() string
	GetOriginator() string
	GetType() string
	GetPayload() []byte
	GetMetadata() Metadata
	SetType(string)
	SetPayload([]byte)
	SetMetadata(Metadata)
	SetOriginator(string)
	Validate(formats strfmt.Registry) error
	MarshalBinary() ([]byte, error)
	UnmarshalBinary(b []byte) error
}

Message ...

func NewMessage

func NewMessage() Message

NewMessage ...

func NewMessageWithDetail

func NewMessageWithDetail(id string, originator string, messageType string, payload []byte, metadata Metadata) Message

NewMessageWithDetail ...

type Metadata

type Metadata interface {
	Keys() []string
	GetKeyValue(key string) interface{}
	SetKeyValue(key string, val interface{})
}

Metadata ...

func NewMetadata

func NewMetadata() Metadata

NewMetadata ...

type Model

type Model interface {
	Validate(formats strfmt.Registry) error
	MarshalBinary() ([]byte, error)
	UnmarshalBinary(b []byte) error
}

func UnmarshalBinary

func UnmarshalBinary(val []byte) (Model, error)

Unmarshal return real model in val buffer

type ModelError

type ModelError struct {
	// contains filtered or unexported fields
}

ModelError model error

func (ModelError) Error

func (m ModelError) Error() string

func (*ModelError) With

func (m *ModelError) With(v ...interface{}) error

With ...

type ModelTypeInfo

type ModelTypeInfo struct {
	ModelTypeName string `json:"modelTypeName"`
}

ModelTypeInfo is added to model which should be saved into factory

type Principal

type Principal struct {
	ID    string   `json:"id"`
	Name  string   `json:"name"`
	Roles []string `json:"roles"`
}

Principal Principal swagger:model Principal

func (*Principal) MarshalBinary

func (m *Principal) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Principal) UnmarshalBinary

func (m *Principal) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Principal) Validate

func (m *Principal) Validate(formats strfmt.Registry) error

Validate validates this deployment

type Project

type Project struct {
	ModelTypeInfo
	gorm.Model
	ProjectID        string    `json:"id"`
	Name             string    `json:"name"`
	UserID           string    `json:"user_id"`
	Description      string    `json:"description"`
	ProjectCreatedAt time.Time `json:"created_at"`
	LastUpdatedAt    time.Time `json:"last_updated_at"`
	Status           string    `json:"status"`
}

Project Project swagger:model Project

func (*Project) MarshalBinary

func (m *Project) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Project) UnmarshalBinary

func (m *Project) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Project) Validate

func (m *Project) Validate(formats strfmt.Registry) error

Validate validates this deployment

type ProjectSummary

type ProjectSummary struct{}

ProjectSummary ProjectSummary swagger:model ProjectSummary

func (*ProjectSummary) MarshalBinary

func (m *ProjectSummary) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ProjectSummary) UnmarshalBinary

func (m *ProjectSummary) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ProjectSummary) Validate

func (m *ProjectSummary) Validate(formats strfmt.Registry) error

Validate validates this deployment

type Query

type Query struct {
	Offset int32
	Limit  int32
	Querys map[string]string
}

Query ...

func NewQuery

func NewQuery() *Query

NewQuery ...

func (*Query) WithLimit

func (q *Query) WithLimit(limit int32) *Query

WithLimit ...

func (*Query) WithOffset

func (q *Query) WithOffset(offset int32) *Query

WithOffset ...

func (*Query) WithQuery

func (q *Query) WithQuery(key, val string) *Query

WithQuery ...

type RuleChain

type RuleChain struct {
	ModelTypeInfo
	gorm.Model
	Name          string     `json:"name" gorm:"size:255"`
	ID            string     `json:"chainId" gorm:"size:100,unique_index"`
	Description   string     `json:"description"gorm:"size:255"`
	DebugMode     bool       `json:"debugMode" `
	UserID        string     `json:"userId" gorm:"size:255"`
	Type          string     `json:"type" gorm:"type:char(100)"`
	Domain        string     `json:"domain"`
	Status        string     `json:"status""`
	Payload       []byte     `json:"payload"`
	Root          bool       `json:"bool"`
	CreatedAt     time.Time  `json:"createdAt"`
	LastUpdatedAt time.Time  `json:"lastUpdatedAt"`
	DataSource    DataSource `json:"dataSource"`
}

RuleChain RuleChain swagger:model RuleChain

func (*RuleChain) MarshalBinary

func (m *RuleChain) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RuleChain) UnmarshalBinary

func (m *RuleChain) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RuleChain) Validate

func (m *RuleChain) Validate(formats strfmt.Registry) error

Validate validates this deployment

type Search struct {
	Type     SearchType  `json:"type"`
	Meta     LogMetaInfo `json:"meta"`
	Since    string      `json:"sinice"`
	PageSize int32       `json:"pageSize"`
	Pos      int32       `json:"pos"`
}

swagger:model Search

func (*Search) MarshalBinary

func (m *Search) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Search) UnmarshalBinary

func (m *Search) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Search) Validate

func (m *Search) Validate(formats strfmt.Registry) error

Validate validates this deployment

type SearchType

type SearchType int
const (
	SearchTypeTerm   SearchType = 0
	SearchTypeNested SearchType = 1
	SearchTypeAll    SearchType = 2
)

type Timedef

type Timedef struct {

	// created
	// Read Only: true
	Created string `json:"created,omitempty"`

	// updated
	// Read Only: true
	Updated string `json:"updated,omitempty"`
}

Timedef timedef swagger:model Timedef

func (*Timedef) MarshalBinary

func (m *Timedef) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Timedef) UnmarshalBinary

func (m *Timedef) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Timedef) Validate

func (m *Timedef) Validate(formats strfmt.Registry) error

Validate validates this timedef

type UpdateProjectNotify

type UpdateProjectNotify struct {
	ProjectID string
}

UpdateProjectNotify ...

type User

type User struct {
	Timedef

	// available balance of user
	Balance string `json:"balance,omitempty"`

	// email
	Email string `json:"email,omitempty"`

	// id
	ID string `json:"id,omitempty"`

	// phone
	Phone string `json:"phone,omitempty"`

	// roles
	Roles []string `json:"roles"`

	// status
	// Enum: [OFFLINE ONLINE]
	Status string `json:"status,omitempty"`

	// total fund
	TotalFund string `json:"totalFund,omitempty"`

	// username
	Username string `json:"username,omitempty"`
}

User user swagger:model User

func (*User) MarshalBinary

func (m *User) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (User) MarshalJSON

func (m User) MarshalJSON() ([]byte, error)

MarshalJSON marshals this object to a JSON structure

func (*User) UnmarshalBinary

func (m *User) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*User) UnmarshalJSON

func (m *User) UnmarshalJSON(raw []byte) error

UnmarshalJSON unmarshals this object from a JSON structure

func (*User) Validate

func (m *User) Validate(formats strfmt.Registry) error

Validate validates this user

type UserLoginRecord

type UserLoginRecord struct {

	// date
	Date string `json:"date,omitempty"`

	// number
	// Required: true
	Number *int64 `json:"number"`
}

UserLoginRecord user login record swagger:model UserLoginRecord

func (*UserLoginRecord) MarshalBinary

func (m *UserLoginRecord) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*UserLoginRecord) UnmarshalBinary

func (m *UserLoginRecord) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*UserLoginRecord) Validate

func (m *UserLoginRecord) Validate(formats strfmt.Registry) error

Validate validates this user login record

type UserOverview

type UserOverview struct {

	// day ave login num
	// Required: true
	DayAveLoginNum *int64 `json:"dayAveLoginNum"`

	// online num
	// Required: true
	OnlineNum *int64 `json:"onlineNum"`

	// today login num
	// Required: true
	TodayLoginNum *int64 `json:"todayLoginNum"`

	// total num
	// Required: true
	TotalNum *int64 `json:"totalNum"`
}

UserOverview user overview swagger:model UserOverview

func (*UserOverview) MarshalBinary

func (m *UserOverview) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*UserOverview) UnmarshalBinary

func (m *UserOverview) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*UserOverview) Validate

func (m *UserOverview) Validate(formats strfmt.Registry) error

Validate validates this user overview

type Variable

type Variable struct {
	ModelTypeInfo
	gorm.Model
	ID             string      `json:"id"`
	Name           string      `json:"name"`
	Type           string      `json:"type"`
	Description    string      `json:"description"`
	ProjectID      string      `json:"projectID"`
	Value          interface{} `json:"value"`
	BindedDeviceID string      `json:"bindedDeviceID"`
	BindedEndpoint string      `json:"bindedEndpoint"`
	CreatedAt      time.Time   `json:"createdAt"`
	LastUpdatedAt  time.Time   `json:"lastUpdatedAt"`
}

Variable Variable swagger:model Variable

func (*Variable) MarshalBinary

func (m *Variable) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Variable) UnmarshalBinary

func (m *Variable) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Variable) Validate

func (m *Variable) Validate(formats strfmt.Registry) error

Validate validates this deployment

type View

type View struct {
	ModelTypeInfo
	gorm.Model
	ID            string    `json:"id"`
	Name          string    `json:"name"`
	ProjectID     string    `json:"projectID"`
	WorkshopID    string    `json:"workshopID"`
	CreatedAt     time.Time `json:"createdAt"`
	LastUpdatedAt time.Time `json:"lastUpdatedAt"`
	Payload       []byte    `json:"payload"`
	Status        string    `json:"status"`
	Variables     []string  `json:"variables"`
}

View View swagger:model View

func (*View) MarshalBinary

func (m *View) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*View) UnmarshalBinary

func (m *View) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*View) Validate

func (m *View) Validate(formats strfmt.Registry) error

Validate validates this deployment

type Widget

type Widget struct {
	ModelTypeInfo
	gorm.Model
	Name       string       `json:"name" bson:"name"`
	ID         string       `json:"id" bson:"id"`
	Domain     string       `json:"domain" bson:"domain"`
	Version    string       `json:"version" bson:"version"`
	Endpoints  []*Endpoint  `json:"endpoints" bson:"endpoints"`
	DataModels []*DataModel `json:"dataModel" bson:"dataModels"`
	IsLogical  bool         `json:"isLogical" bson:"isLogical"`
	IsCompound bool         `json:"isCompound" bson:"isCompound"`
	IsPreset   bool         `json:"isPreset" bson:"isPreset"`
	Icon       string       `json:"icon" bson:"icon"`
}

Widget Widget swagger:model Widget

func NewWidgetWithDeviceModel

func NewWidgetWithDeviceModel(m *DeviceModel) *Widget

NewWidgetWithDeviceModel ...

type WidgetList

type WidgetList struct {
	Widgets map[string][]*Widget `json:"widgets" bson:"widgets"`
}

WidgetList ...

func NewWidgetList

func NewWidgetList() *WidgetList

NewWidgetList ...

func (*WidgetList) Add

func (wl *WidgetList) Add(widgets ...*Widget)

Add ...

func (*WidgetList) AddUserWidget

func (wl *WidgetList) AddUserWidget(widgets ...*Widget)

AddUserWidget ...

func (*WidgetList) Count

func (wl *WidgetList) Count() int

Count ...

func (*WidgetList) CountOfDomain

func (wl *WidgetList) CountOfDomain(domain string) int

CountOfDomain ...

func (*WidgetList) Remove

func (wl *WidgetList) Remove(domain string, widgetName string)

Remove ...

func (*WidgetList) RemoveUserWidget

func (wl *WidgetList) RemoveUserWidget(widgetName string)

RemoveUserWidget ...

type Workshop

type Workshop struct {
	ModelTypeInfo
	gorm.Model
	ID            string    `json:"id"`
	Name          string    `json:"name"`
	Description   string    `json:"description"`
	UserID        string    `json:"userID"`
	ProjectID     string    `json:"projectId"`
	CreatedAt     time.Time `json:"createdAt"`
	LastUpdatedAt time.Time `json:"lastUpdatedAt"`
	Status        string    `json:"status"`
	ViewIDs       []string  `json:"views"`
}

Workshop Workshop swagger:model Workshop

func (*Workshop) MarshalBinary

func (m *Workshop) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Workshop) UnmarshalBinary

func (m *Workshop) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Workshop) Validate

func (m *Workshop) Validate(formats strfmt.Registry) error

Validate validates this deployment

Directories

Path Synopsis
Licensed under the Apache License, Version 2.0 (the "License"); you may not use p file except in compliance with the License.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use p file except in compliance with the License.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use p file except in compliance with the License.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use p file except in compliance with the License.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use p file except in compliance with the License.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use p file except in compliance with the License.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use p file except in compliance with the License.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use p file except in compliance with the License.

Jump to

Keyboard shortcuts

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