models

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessItem

type AccessItem struct {
	Actions     []string `json:"actions"`
	Method      string   `json:"method"`
	Description string   `json:"description"`
	RoleName    string   `json:"role_name"`
}

type AccessLevels

type AccessLevels map[string]AccessItem

type AccessList

type AccessList map[string]AccessLevels

swagger:model

type AccessListDiff

type AccessListDiff map[string]map[string]bool

swagger:model

type AuthSignInResponse

type AuthSignInResponse struct {
	CurrentUser *CurrentUser `json:"current_user"`
	AccessToken string       `json:"access_token"`
}

swagger:model

type CurrentUser

type CurrentUser struct {
	Id              int64                `json:"id"`
	Nickname        string               `json:"nickname"`
	FirstName       string               `json:"first_name"`
	LastName        string               `json:"last_name"`
	Email           string               `json:"email"`
	History         []*UserHistory       `json:"history"`
	Image           *Image               `json:"image"`
	SignInCount     int64                `json:"sign_in_count"`
	Meta            []*UserByIdModelMeta `json:"meta"`
	Role            *Role                `json:"role"`
	Lang            string               `json:"lang"`
	CreatedAt       time.Time            `json:"created_at"`
	UpdatedAt       time.Time            `json:"updated_at"`
	CurrentSignInAt *time.Time           `json:"current_sign_in_at"`
	LastSignInAt    *time.Time           `json:"last_sign_in_at"`
}

Current User represents the user for this application swagger:model

type DeleteGateMobile added in v0.0.9

type DeleteGateMobile struct {
	Token string `json:"token"`
}

swagger:model

type DevCommandConfig

type DevCommandConfig struct {
}

type DevModBusRtuConfig added in v0.0.19

type DevModBusRtuConfig struct {
	SlaveId  int    `json:"slave_id" mapstructure:"slave_id"`   // 1-32
	Baud     int    `json:"baud"`                               // 9600, 19200, ...
	DataBits int    `json:"data_bits" mapstructure:"data_bits"` // 5-9
	StopBits int    `json:"stop_bits" mapstructure:"stop_bits"` // 1, 2
	Parity   string `json:"parity"`                             // none, odd, even
	Timeout  int    `json:"timeout"`                            // milliseconds
}

type DevModBusTcpConfig added in v0.0.19

type DevModBusTcpConfig struct {
	SlaveId     int    `json:"slave_id"`
	AddressPort string `json:"address_port"`
}

type DevMqttConfig added in v0.0.19

type DevMqttConfig struct {
	Address  string `json:"address"`
	User     string `json:"user"`
	Password string `json:"password"`
}

type DevSmartBusConfig

type DevSmartBusConfig struct {
	Baud     int `json:"baud" valid:"Required"`
	Device   int `json:"device"`
	Timeout  int `json:"timeout" valid:"Required"`
	StopBits int `json:"stop_bits" valid:"Required" mapstructure:"stop_bits"`
	Sleep    int `json:"sleep"`
}

type Device

type Device struct {
	Id          int64            `json:"id"`
	Name        string           `json:"name"`
	Description string           `json:"description"`
	Node        *Node            `json:"node"`
	Properties  DeviceProperties `json:"properties"`
	Type        string           `json:"type"`
	Status      string           `json:"status"`
	IsGroup     bool             `json:"is_group"`
	CreatedAt   time.Time        `json:"created_at"`
	UpdatedAt   time.Time        `json:"updated_at"`
	Actions     []DeviceAction   `json:"actions"`
	States      []DeviceState    `json:"states"`
	Device      *ParentDevice    `json:"device"`
	DeviceId    *int64           `json:"device_id"`
}

swagger:model

type DeviceAction

type DeviceAction struct {
	Id          int64               `json:"id"`
	Name        string              `json:"name" valid:"MaxSize(254);Required"`
	Description string              `json:"description"`
	Device      *DeviceActionDevice `json:"device"`
	Script      *DeviceActionScript `json:"script"`
	CreatedAt   time.Time           `json:"created_at"`
	UpdatedAt   time.Time           `json:"updated_at"`
}

swagger:model

type DeviceActionDevice

type DeviceActionDevice struct {
	Id int64 `json:"id"`
}

type DeviceActionScript

type DeviceActionScript struct {
	Id int64 `json:"id"`
}

type DeviceProperties

type DeviceProperties struct {
	// swagger:allOf
	*DevModBusRtuConfig
	// swagger:allOf
	*DevModBusTcpConfig
	// swagger:allOf
	*DevSmartBusConfig
	// swagger:allOf
	*DevCommandConfig
	// swagger:allOf
	*DevMqttConfig
}

An AllOfModel is composed out of embedded structs but it should build an allOf property

type DeviceShort

type DeviceShort struct {
	Id          int64  `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	Status      string `json:"status"`
	Type        string `json:"type"`
}

swagger:model

type DeviceState

type DeviceState struct {
	Id          int64              `json:"id"`
	Description string             `json:"description"`
	SystemName  string             `json:"system_name" valid:"MaxSize(254);Required"`
	Device      *DeviceStateDevice `json:"device" valid:"Required"`
	CreatedAt   time.Time          `json:"created_at"`
	UpdatedAt   time.Time          `json:"updated_at"`
}

swagger:model

type DeviceStateDevice

type DeviceStateDevice struct {
	Id int64 `json:"id"`
}

type Error

type Error struct {

	// code
	Code ResponseType `json:"code,omitempty"`

	// errors
	Errors ErrorErrors `json:"errors"`

	// описание ошибки
	Message string `json:"message,omitempty"`
}

swagger:model

type ErrorErrors

type ErrorErrors []*ErrorErrorsItems

type ErrorErrorsItems

type ErrorErrorsItems struct {

	// тип ишибки
	Code string `json:"code,omitempty"`

	// поле вызвавшее ошибку
	Field string `json:"field,omitempty"`

	// описание
	Message string `json:"message,omitempty"`
}

type ExecScript

type ExecScript struct {
	Lang        string `json:"lang"`
	Name        string `json:"name"`
	Source      string `json:"source"`
	Description string `json:"description"`
}

swagger:model

type Flow

type Flow struct {
	Id                 int64             `json:"id"`
	Name               string            `json:"name" valid:"MaxSize(254);Required"`
	Description        string            `json:"description" valid:"MaxSize(254)"`
	Status             string            `json:"status" valid:"Required"`
	Workflow           *FlowWorkflow     `json:"workflow"`
	WorkflowId         int64             `json:"workflow_id" valid:"Required"`
	WorkflowScenarioId int64             `json:"workflow_scenario_id" valid:"Required"`
	Connections        []*FlowConnection `json:"connections"`
	FlowElements       []*FlowElement    `json:"flow_elements"`
	Workers            []*FlowWorker     `json:"workers"`
	CreatedAt          time.Time         `json:"created_at"`
	UpdatedAt          time.Time         `json:"updated_at"`
}

swagger:model

type FlowConnection

type FlowConnection struct {
	Uuid          string    `json:"uuid"`
	Name          string    `json:"name" valid:"MaxSize(254);Required"`
	ElementFrom   string    `json:"element_from" valid:"Required"`
	ElementTo     string    `json:"element_to" valid:"Required"`
	PointFrom     int64     `json:"point_from" valid:"Required"`
	PointTo       int64     `json:"point_to" valid:"Required"`
	FlowId        int64     `json:"flow_id" valid:"Required"`
	Direction     string    `json:"direction"`
	GraphSettings string    `json:"graph_settings"`
	CreatedAt     time.Time `json:"created_at"`
	UpdatedAt     time.Time `json:"updated_at"`
}

swagger:model

type FlowElement

type FlowElement struct {
	Uuid          string    `json:"uuid"`
	Name          string    `json:"name" valid:"MaxSize(254);Required"`
	Description   string    `json:"description"`
	FlowId        int64     `json:"flow_id" valid:"Required"`
	Script        *Script   `json:"script"`
	ScriptId      *int64    `json:"script_id"`
	Status        string    `json:"status" valid:"Required"`
	FlowLink      *int64    `json:"flow_link"`
	PrototypeType string    `json:"prototype_type" valid:"Required"`
	GraphSettings string    `json:"graph_settings"`
	CreatedAt     time.Time `json:"created_at"`
	UpdatedAt     time.Time `json:"updated_at"`
}

swagger:model

type FlowShort

type FlowShort struct {
	Id          int64  `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	Status      string `json:"status"`
	Workflow    struct {
		Id       int64  `json:"id"`
		Name     string `json:"name"`
		Scenario struct {
			Id   int    `json:"id"`
			Name string `json:"name"`
		} `json:"scenario,omitempty"`
	} `json:"workflow"`
	Workers []struct {
		Id int64 `json:"id"`
	} `json:"workers"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type FlowWorker

type FlowWorker struct {
	Id             int64         `json:"id"`
	Name           string        `json:"name" valid:"MaxSize(254);Required"`
	Time           string        `json:"time" valid:"Required"`
	Status         string        `json:"status" valid:"Required"`
	Workflow       *FlowWorkflow `json:"workflow"`
	WorkflowId     int64         `json:"workflow_id" valid:"Required"`
	FlowId         int64         `json:"flow_id" valid:"Required"`
	DeviceAction   *DeviceAction `json:"device_action"`
	DeviceActionId int64         `json:"device_action_id" valid:"Required"`
	CreatedAt      time.Time     `json:"created_at"`
	UpdatedAt      time.Time     `json:"updated_at"`
}

type FlowWorkflow

type FlowWorkflow struct {
	Id          int64     `json:"id"`
	Name        string    `json:"name"`
	Description string    `json:"description"`
	Status      string    `json:"status"`
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
}

type GateMobileList added in v0.0.9

type GateMobileList struct {
	Total     int64    `json:"total"`
	TokenList []string `json:"token_list"`
}

swagger:model

type GateSettings added in v0.0.9

type GateSettings struct {
	GateServerToken string `json:"gate_server_token"`
	Address         string `json:"address"`
	Enabled         bool   `json:"enabled"`
}

swagger:model

type Image

type Image struct {
	Id        int64     `json:"id"`
	Thumb     string    `json:"thumb"`
	Url       string    `json:"url"`
	Image     string    `json:"image"`
	MimeType  string    `json:"mime_type"`
	Title     string    `json:"title"`
	Size      int64     `json:"size"`
	Name      string    `json:"name"`
	CreatedAt time.Time `json:"created_at"`
}

swagger:model

type Log

type Log struct {
	Id        int64     `json:"id"`
	Body      string    `json:"body"`
	Level     string    `json:"level"`
	CreatedAt time.Time `json:"created_at"`
}

swagger:model

type Map

type Map struct {
	Id          int64      `json:"id"`
	Name        string     `json:"name"`
	Description string     `json:"description"`
	Options     MapOptions `json:"options"`
	CreatedAt   time.Time  `json:"created_at"`
	UpdatedAt   time.Time  `json:"updated_at"`
}

swagger:model

type MapDevice

type MapDevice struct {
	Id         int64              `json:"id"`
	SystemName string             `json:"system_name" valid:"Required"`
	Device     *Device            `json:"device"`
	DeviceId   int64              `json:"device_id" valid:"Required"`
	Image      *Image             `json:"image"`
	ImageId    int64              `json:"image_id"`
	Actions    []*MapDeviceAction `json:"actions"`
	States     []*MapDeviceState  `json:"states"`
	CreatedAt  time.Time          `json:"created_at"`
	UpdatedAt  time.Time          `json:"updated_at"`
}

type MapDeviceAction

type MapDeviceAction struct {
	Id             int64         `json:"id"`
	DeviceAction   *DeviceAction `json:"device_action"`
	DeviceActionId int64         `json:"device_action_id" valid:"Required"`
	MapDeviceId    int64         `json:"map_device_id" valid:"Required"`
	Image          *Image        `json:"image"`
	ImageId        int64         `json:"image_id" valid:"Required"`
	Type           string        `json:"type"`
	CreatedAt      time.Time     `json:"created_at"`
	UpdatedAt      time.Time     `json:"updated_at"`
}

type MapDeviceState

type MapDeviceState struct {
	Id            int64        `json:"id"`
	DeviceState   *DeviceState `json:"device_state"`
	DeviceStateId int64        `json:"device_state_id" valid:"Required"`
	MapDeviceId   int64        `json:"map_device_id" valid:"Required"`
	Image         *Image       `json:"image"`
	ImageId       int64        `json:"image_id" valid:"Required"`
	Style         string       `json:"style"`
	CreatedAt     time.Time    `json:"created_at"`
	UpdatedAt     time.Time    `json:"updated_at"`
}

type MapElement

type MapElement struct {
	Id            int64                   `json:"id"`
	Name          string                  `json:"name"`
	Description   string                  `json:"description"`
	PrototypeId   int64                   `json:"prototype_id"`
	PrototypeType string                  `json:"prototype_type"`
	Prototype     Prototype               `json:"prototype"`
	MapId         int64                   `json:"map_id"`
	LayerId       int64                   `json:"layer_id"`
	GraphSettings MapElementGraphSettings `json:"graph_settings"`
	Status        string                  `json:"status"`
	Weight        int                     `json:"weight"`
	Zone          *MapZone                `json:"zone"`
	CreatedAt     time.Time               `json:"created_at"`
	UpdatedAt     time.Time               `json:"updated_at"`
}

swagger:model

type MapElementGraphSettings

type MapElementGraphSettings struct {
	Width    *int64                          `json:"width"`
	Height   *int64                          `json:"height"`
	Position MapElementGraphSettingsPosition `json:"position"`
}

type MapElementGraphSettingsPosition

type MapElementGraphSettingsPosition struct {
	Top  int64 `json:"top"`
	Left int64 `json:"left"`
}

type MapFull

type MapFull struct {
	Id          int64       `json:"id"`
	Name        string      `json:"name"`
	Description string      `json:"description"`
	Options     MapOptions  `json:"options"`
	Layers      []*MapLayer `json:"layers"`
	CreatedAt   time.Time   `json:"created_at"`
	UpdatedAt   time.Time   `json:"updated_at"`
}

swagger:model

type MapImage

type MapImage struct {
	Id      int64  `json:"id,omitempty"`
	Image   *Image `json:"image"`
	ImageId int64  `json:"image_id"`
	Style   string `json:"style"`
}

type MapLayer

type MapLayer struct {
	Id          int64         `json:"id"`
	Name        string        `json:"name"`
	Description string        `json:"description"`
	Map         *Map          `json:"map"`
	MapId       int64         `json:"map_id"`
	Status      string        `json:"status"`
	Weight      int64         `json:"weight"`
	Elements    []*MapElement `json:"elements"`
	CreatedAt   time.Time     `json:"created_at"`
	UpdatedAt   time.Time     `json:"updated_at"`
}

swagger:model

type MapOptions

type MapOptions struct {
	Zoom              float64 `json:"zoom"`
	ElementStateText  bool    `json:"element_state_text"`
	ElementOptionText bool    `json:"element_option_text"`
}

type MapText

type MapText struct {
	Id    int64  `json:"id"`
	Text  string `json:"text"`
	Style string `json:"style"`
}

type MapZone added in v0.0.14

type MapZone struct {
	Id   int64  `json:"id"`
	Name string `json:"name"`
}

swagger:model

type Message added in v0.0.17

type Message struct {
	Id           int64     `json:"id"`
	Type         string    `json:"type"`
	EmailFrom    *string   `json:"email_from"`
	EmailSubject *string   `json:"email_subject"`
	EmailBody    *string   `json:"email_body"`
	SmsText      *string   `json:"sms_text"`
	UiText       *string   `json:"ui_text"`
	SlackText    *string   `json:"slack_text"`
	TelegramText *string   `json:"telegram_text"`
	CreatedAt    time.Time `json:"created_at"`
	UpdatedAt    time.Time `json:"updated_at"`
}

swagger:model

type MessageDelivery added in v0.0.17

type MessageDelivery struct {
	Id                 int64     `json:"id"`
	Message            *Message  `json:"message"`
	MessageId          int64     `json:"message_id"`
	Address            string    `json:"address"`
	Status             string    `json:"status"`
	ErrorMessageStatus *string   `json:"error_message_status"`
	ErrorMessageBody   *string   `json:"error_message_body"`
	CreatedAt          time.Time `json:"created_at"`
	UpdatedAt          time.Time `json:"updated_at"`
}

swagger:model

type MqttClient added in v0.0.20

type MqttClient struct {
	ClientID       string    `json:"client_id"`
	Username       string    `json:"username"`
	Password       string    `json:"password"`
	KeepAlive      uint16    `json:"keep_alive"`
	CleanSession   bool      `json:"clean_session"`
	WillFlag       bool      `json:"will_flag"`
	WillRetain     bool      `json:"will_retain"`
	WillQos        uint8     `json:"will_qos"`
	WillTopic      string    `json:"will_topic"`
	WillPayload    string    `json:"will_payload"`
	RemoteAddr     string    `json:"remote_addr"`
	LocalAddr      string    `json:"local_addr"`
	ConnectedAt    time.Time `json:"connected_at"`
	DisconnectedAt time.Time `json:"disconnected_at"`
}

swagger:model

type MqttSession added in v0.0.20

type MqttSession struct {
	ClientID          string    `json:"client_id"`
	Status            string    `json:"status"`
	CleanSession      bool      `json:"clean_session"`
	Subscriptions     int64     `json:"subscriptions"`
	MaxInflight       int       `json:"max_inflight"`
	InflightLen       int64     `json:"inflight_len"`
	MaxMsgQueue       int       `json:"max_msg_queue"`
	MsgQueueLen       int64     `json:"msg_queue_len"`
	MaxAwaitRel       int       `json:"max_await_rel"`
	AwaitRelLen       int64     `json:"await_rel_len"`
	MsgDroppedTotal   int64     `json:"msg_dropped_total"`
	MsgDeliveredTotal int64     `json:"msg_delivered_total"`
	ConnectedAt       time.Time `json:"connected_at"`
	DisconnectedAt    time.Time `json:"disconnected_at"`
}

swagger:model

type MqttSubscription added in v0.0.20

type MqttSubscription struct {
	ClientID string    `json:"client_id"`
	Qos      uint8     `json:"qos"`
	Name     string    `json:"name"`
	At       time.Time `json:"at"`
}

swagger:model

type NewDevice

type NewDevice struct {
	Name        string           `json:"name"`
	Description string           `json:"description"`
	Status      string           `json:"status"`
	Device      *ParentDevice    `json:"device"`
	Type        string           `json:"type"`
	Node        *NewDeviceNode   `json:"node"`
	Properties  DeviceProperties `json:"properties"`
}

swagger:model

type NewDeviceAction

type NewDeviceAction struct {
	Name        string              `json:"name" valid:"MaxSize(254);Required"`
	Description string              `json:"description"`
	Device      *DeviceActionDevice `json:"device"`
	Script      *DeviceActionScript `json:"script"`
}

swagger:model

type NewDeviceNode

type NewDeviceNode struct {
	Id int64 `json:"id"`
}

type NewDeviceState

type NewDeviceState struct {
	Description string             `json:"description"`
	SystemName  string             `json:"system_name" valid:"MaxSize(254);Required"`
	Device      *DeviceStateDevice `json:"device" valid:"Required"`
}

swagger:model

type NewFlow

type NewFlow struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Status      string `json:"status"`
	Workflow    struct {
		Id int64 `json:"id"`
	} `json:"workflow"`
	Scenario struct {
		Id int64 `json:"id"`
	} `json:"scenario"`
}

swagger:model

type NewImage

type NewImage struct {
	Thumb    string `json:"thumb"`
	Image    string `json:"image"`
	MimeType string `json:"mime_type"`
	Title    string `json:"title"`
	Size     int64  `json:"size"`
	Name     string `json:"name"`
}

swagger:model

type NewLog

type NewLog struct {
	Body  string `json:"body"`
	Level string `json:""`
}

swagger:model

type NewMap

type NewMap struct {
	Name        string     `json:"name"`
	Description string     `json:"description"`
	Options     MapOptions `json:"options"`
}

swagger:model

type NewMapElement

type NewMapElement struct {
	Name          string                  `json:"name"`
	Description   string                  `json:"description"`
	PrototypeId   int64                   `json:"prototype_id"`
	PrototypeType string                  `json:"prototype_type"`
	Prototype     Prototype               `json:"prototype"`
	Map           *Map                    `json:"map"`
	Layer         *MapLayer               `json:"layer"`
	MapId         int64                   `json:"map_id"`
	LayerId       int64                   `json:"layer_id"`
	GraphSettings MapElementGraphSettings `json:"graph_settings"`
	Status        string                  `json:"status"`
	Weight        int                     `json:"weight"`
	Zone          *MapZone                `json:"zone"`
}

swagger:model

type NewMapLayer

type NewMapLayer struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Map         *Map   `json:"map"`
	Status      string `json:"status"`
}

swagger:model

type NewMapZone added in v0.0.14

type NewMapZone struct {
	Name string `json:"name"`
}

swagger:model

type NewMqttPublish added in v0.0.20

type NewMqttPublish struct {
	Topic   string `json:"topic"`
	Qos     int    `json:"qos"`
	Payload []byte `json:"payload"`
	Retain  bool   `json:"retain"`
}

swagger:model

type NewNode

type NewNode struct {
	Port           int64  `json:"port"`
	Status         string `json:"status"`
	Name           string `json:"name"`
	IP             string `json:"ip"`
	Description    string `json:"description"`
	Login          string `json:"login"`
	Password       string `json:"password"`
	PasswordRepeat string `json:"password_repeat"`
}

swagger:model

type NewNotifrMessage added in v0.0.17

type NewNotifrMessage struct {
	Type         string            `json:"type"`
	BodyType     string            `json:"body_type"`
	EmailFrom    *string           `json:"email_from"`
	EmailSubject *string           `json:"email_subject"`
	EmailBody    *string           `json:"email_body"`
	Template     *string           `json:"template"`
	SmsText      *string           `json:"sms_text"`
	SlackText    *string           `json:"slack_text"`
	Params       map[string]string `json:"params"`
	Address      string            `json:"address"`
}

swagger:model

type NewObjectSuccess

type NewObjectSuccess struct {
	Id int64 `json:"id"`
}

type NewRole

type NewRole struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Parent      struct {
		Name string `json:"name"`
	} `json:"parent"`
}

swagger:model

type NewScript

type NewScript struct {
	Lang        string `json:"lang"`
	Name        string `json:"name"`
	Source      string `json:"source"`
	Description string `json:"description"`
}

swagger:model

type NewTemplate added in v0.0.17

type NewTemplate struct {
	Name        string  `json:"name"`
	Description string  `json:"description"`
	Content     string  `json:"content"`
	Status      string  `json:"status"`
	Type        string  `json:"type"`
	ParentName  *string `json:"parent"`
}

swagger:model

type NewTemplateItem added in v0.0.17

type NewTemplateItem struct {
	Name        string  `json:"name"`
	Description string  `json:"description"`
	Content     string  `json:"content"`
	Status      string  `json:"status"`
	Type        string  `json:"type"`
	ParentName  *string `json:"parent"`
}

swagger:model

type NewUser

type NewUser struct {
	Nickname       string         `json:"nickname" valid:"Required;MinSize(3);MaxSize(255)"`
	FirstName      string         `json:"first_name"`
	LastName       string         `json:"last_name"`
	Password       string         `json:"password" valid:"Required;MinSize(6);MaxSize(255)"`
	PasswordRepeat string         `json:"password_repeat" valid:"Required;MinSize(6);MaxSize(255)"`
	Email          string         `json:"email" valid:"Required;Email"`
	Status         string         `json:"status"`
	Lang           string         `json:"lang"`
	Image          *NewUserImage  `json:"image"`
	Role           *NewUserRole   `json:"role"`
	Meta           []*NewUserMeta `json:"meta"`
}

swagger:model

func (*NewUser) Valid

func (d *NewUser) Valid() (ok bool, errs []*validation.Error)

type NewUserImage

type NewUserImage struct {
	Id int64 `json:"id"`
}

type NewUserMeta

type NewUserMeta struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type NewUserRole

type NewUserRole struct {
	Name string `json:"name"`
}

type NewWorkflow

type NewWorkflow struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Status      string `json:"status"`
}

swagger:model

type NewWorkflowScenario

type NewWorkflowScenario struct {
	Name       string `json:"name"`
	SystemName string `json:"system_name"`
	WorkflowId int64  `json:"workflow_id"`
}

swagger:model

type Node

type Node struct {
	Id          int64     `json:"id"`
	Name        string    `json:"name"`
	Ip          string    `json:"ip"`
	Port        int       `json:"port"`
	Status      string    `json:"status"`
	Description string    `json:"description"`
	Login       string    `json:"login"`
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
}

swagger:model

type NotifrConfig added in v0.0.17

type NotifrConfig struct {
	MbAccessKey    string `json:"mb_access_key"`
	MbName         string `json:"mb_name"`
	TWFrom         string `json:"tw_from"`
	TWSid          string `json:"tw_sid"`
	TWAuthToken    string `json:"tw_auth_token"`
	TelegramToken  string `json:"telegram_token"`
	TelegramChatId int64  `json:"telegram_chat_id"`
	EmailAuth      string `json:"email_auth"`
	EmailPass      string `json:"email_pass"`
	EmailSmtp      string `json:"email_smtp"`
	EmailPort      int    `json:"email_port"`
	EmailSender    string `json:"email_sender"`
	SlackToken     string `json:"slack_token"`
	SlackUserName  string `json:"slack_user_name"`
}

swagger:model

type ParentDevice

type ParentDevice struct {
	Id int64 `json:"id"`
}

type Permission

type Permission struct {
	Id          int64  `json:"id"`
	PackageName string `json:"package_name"`
	LevelName   string `json:"level_name"`
}

type Permissions

type Permissions []*Permission

type Prototype

type Prototype struct {
	*MapImage
	*MapText
	*MapDevice
}

swagger:model

func (Prototype) MarshalJSON

func (n Prototype) MarshalJSON() (b []byte, err error)

func (*Prototype) UnmarshalJSON

func (n *Prototype) UnmarshalJSON(data []byte) (err error)

type RedactorConnector

type RedactorConnector struct {
	Id    string `json:"id"`
	Start struct {
		Object string `json:"object"`
		Point  int64  `json:"point"`
	} `json:"start"`
	End struct {
		Object string `json:"object"`
		Point  int64  `json:"point"`
	} `json:"end"`
	FlowType  string `json:"flow_type"`
	Title     string `json:"title"`
	Direction string `json:"direction"`
}

type RedactorFlow

type RedactorFlow struct {
	Id          int64                  `json:"id"`
	Name        string                 `json:"name"`
	Description string                 `json:"description"`
	Status      string                 `json:"status"`
	Objects     []*RedactorObject      `json:"objects"`
	Connectors  []*RedactorConnector   `json:"connectors"`
	CreatedAt   time.Time              `json:"created_at"`
	UpdatedAt   time.Time              `json:"update_at"`
	Workflow    *RedactorWorkflowModel `json:"workflow"`
	Scenario    *WorkflowScenario      `json:"scenario"`
	Workers     []*Worker              `json:"workers"`
}

swagger:model

type RedactorObject

type RedactorObject struct {
	Id   string `json:"id"`
	Type struct {
		Name   string      `json:"name"`
		Start  interface{} `json:"start"`
		End    interface{} `json:"end"`
		Status string      `json:"status"`
		Action string      `json:"action"`
	} `json:"type"`
	Position struct {
		Top  int64 `json:"top"`
		Left int64 `json:"left"`
	} `json:"position"`
	Status        string  `json:"status"`
	Error         string  `json:"error"`
	Title         string  `json:"title"`
	Description   string  `json:"description"`
	PrototypeType string  `json:"prototype_type"`
	Script        *Script `json:"script"`
	FlowLink      *Flow   `json:"flow_link"`
}

type RedactorWorkflowModel

type RedactorWorkflowModel struct {
	Id          int64     `json:"id"`
	Name        string    `json:"name"`
	Description string    `json:"description"`
	Status      string    `json:"status"`
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
}

type ResponseSuccess

type ResponseSuccess struct{}

type ResponseType

type ResponseType string
const (
	// ResponseTypeSuccess captures enum value "success"
	ResponseTypeSuccess ResponseType = "success"
	// ResponseTypeBusinessConflict captures enum value "business_conflict"
	ResponseTypeBusinessConflict ResponseType = "business_conflict"
	// ResponseTypeUnprocessableEntity captures enum value "unprocessable_entity"
	ResponseTypeUnprocessableEntity ResponseType = "unprocessable_entity"
	// ResponseTypeBadParameters captures enum value "bad_parameters"
	ResponseTypeBadParameters ResponseType = "bad_parameters"
	// ResponseTypeInternalError captures enum value "internal_error"
	ResponseTypeInternalError ResponseType = "internal_error"
	// ResponseTypeNotFound captures enum value "not_found"
	ResponseTypeNotFound ResponseType = "not_found"
	// ResponseTypeSecurityError captures enum value "security_error"
	ResponseTypeSecurityError ResponseType = "security_error"
	// ResponseTypePermissionError captures enum value "permission_error"
	ResponseTypePermissionError ResponseType = "permission_error"
)

type Role

type Role struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Parent      struct {
		Name string `json:"name"`
	} `json:"parent"`
	Children   []*Role             `json:"children"`
	AccessList map[string][]string `json:"access_list"`
	CreatedAt  time.Time           `json:"created_at"`
	UpdatedAt  time.Time           `json:"updated_at"`
}

swagger:model

type Script

type Script struct {
	Id          int64     `json:"id"`
	Lang        string    `json:"lang"`
	Name        string    `json:"name"`
	Source      string    `json:"source"`
	Description string    `json:"description"`
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
}

swagger:model

type SortMapElement

type SortMapElement struct {
	Id     int64 `json:"id"`
	Weight int64 `json:"weight"`
}

swagger:model

type SortMapLayer

type SortMapLayer struct {
	Id     int64 `json:"id"`
	Weight int64 `json:"weight"`
}

swagger:model

type Template added in v0.0.17

type Template struct {
	Name        string    `json:"name"`
	Description string    `json:"description"`
	Content     string    `json:"content"`
	Status      string    `json:"status"`
	Type        string    `json:"type"`
	ParentName  *string   `json:"parent"`
	Markers     []string  `json:"markers"`
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
}

swagger:model

type TemplateContent added in v0.0.17

type TemplateContent struct {
	Items  []string         `json:"items"`
	Title  string           `json:"title"`
	Fields []*TemplateField `json:"fields"`
}

swagger:model

type TemplateField added in v0.0.17

type TemplateField struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type TemplateItem added in v0.0.17

type TemplateItem struct {
	Name        string    `json:"name"`
	Description string    `json:"description"`
	Content     string    `json:"content"`
	Status      string    `json:"status"`
	Type        string    `json:"type"`
	ParentName  *string   `json:"parent"`
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
}

swagger:model

type TemplateTree added in v0.0.17

type TemplateTree []*TemplateTreeBranch

swagger:model

type TemplateTreeBranch added in v0.0.17

type TemplateTreeBranch struct {
	Name        string                `json:"name"`
	Description string                `json:"description"`
	Status      string                `json:"status"`
	Nodes       []*TemplateTreeBranch `json:"nodes"`
}

swagger:model

type UpdateDevice

type UpdateDevice struct {
	Name        string           `json:"name"`
	Description string           `json:"description"`
	Status      string           `json:"status"`
	Device      *ParentDevice    `json:"device"`
	Type        string           `json:"type"`
	Node        *NewDeviceNode   `json:"node"`
	Properties  DeviceProperties `json:"properties"`
}

swagger:model

type UpdateDeviceAction

type UpdateDeviceAction struct {
	Id          int64               `json:"id"`
	Name        string              `json:"name" valid:"MaxSize(254);Required"`
	Description string              `json:"description"`
	Device      *DeviceActionDevice `json:"device"`
	Script      *DeviceActionScript `json:"script"`
}

swagger:model

type UpdateDeviceState

type UpdateDeviceState struct {
	Description string             `json:"description"`
	SystemName  string             `json:"system_name" valid:"MaxSize(254);Required"`
	Device      *DeviceStateDevice `json:"device" valid:"Required"`
}

swagger:model

type UpdateFlow

type UpdateFlow struct {
	Id          int64  `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	Status      string `json:"status"`
	Workflow    struct {
		Id int64 `json:"id"`
	} `json:"workflow"`
	Scenario struct {
		Id int64 `json:"id"`
	} `json:"scenario"`
}

swagger:model

type UpdateGateSettings added in v0.0.9

type UpdateGateSettings struct {
	GateServerToken string `json:"gate_server_token"`
	Address         string `json:"address"`
	Enabled         bool   `json:"enabled"`
}

swagger:model

type UpdateImage

type UpdateImage struct {
	Id       int64  `json:"id"`
	Thumb    string `json:"thumb"`
	Url      string `json:"url"`
	Image    string `json:"image"`
	MimeType string `json:"mime_type"`
	Title    string `json:"title"`
	Size     int64  `json:"size"`
	Name     string `json:"name"`
}

swagger:model

type UpdateMap

type UpdateMap struct {
	Id          int64      `json:"id"`
	Name        string     `json:"name"`
	Description string     `json:"description"`
	Options     MapOptions `json:"options"`
}

swagger:model

type UpdateMapElement

type UpdateMapElement struct {
	Id            int64                   `json:"id"`
	Name          string                  `json:"name"`
	Description   string                  `json:"description"`
	PrototypeId   int64                   `json:"prototype_id"`
	PrototypeType string                  `json:"prototype_type"`
	Prototype     Prototype               `json:"prototype"`
	MapId         int64                   `json:"map_id"`
	LayerId       int64                   `json:"layer_id"`
	GraphSettings MapElementGraphSettings `json:"graph_settings"`
	Status        string                  `json:"status"`
	Weight        int                     `json:"weight"`
	Zone          *MapZone                `json:"zone"`
}

swagger:model

type UpdateMapLayer

type UpdateMapLayer struct {
	Id          int64  `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	Map         *Map   `json:"map"`
	Status      string `json:"status"`
}

swagger:model

type UpdateNode

type UpdateNode struct {
	Id             int64  `json:"id"`
	Name           string `json:"name"`
	Port           int64  `json:"port"`
	Status         string `json:"status"`
	IP             string `json:"ip"`
	Description    string `json:"description"`
	Login          string `json:"login"`
	Password       string `json:"password"`
	PasswordRepeat string `json:"password_repeat"`
}

swagger:model

type UpdateNotifrConfig added in v0.0.17

type UpdateNotifrConfig struct {
	MbAccessKey    string `json:"mb_access_key"`
	MbName         string `json:"mb_name"`
	TWFrom         string `json:"tw_from"`
	TWSid          string `json:"tw_sid"`
	TWAuthToken    string `json:"tw_auth_token"`
	TelegramToken  string `json:"telegram_token"`
	TelegramChatId int64  `json:"telegram_chat_id"`
	EmailAuth      string `json:"email_auth"`
	EmailPass      string `json:"email_pass"`
	EmailSmtp      string `json:"email_smtp"`
	EmailPort      int    `json:"email_port"`
	EmailSender    string `json:"email_sender"`
	SlackToken     string `json:"slack_token"`
	SlackUserName  string `json:"slack_user_name"`
}

swagger:model

type UpdateRole

type UpdateRole struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Parent      struct {
		Name string `json:"name"`
	} `json:"parent"`
}

swagger:model

type UpdateScript

type UpdateScript struct {
	Id          int64  `json:"id"`
	Lang        string `json:"lang"`
	Name        string `json:"name"`
	Source      string `json:"source"`
	Description string `json:"description"`
}

swagger:model

type UpdateTemplate added in v0.0.17

type UpdateTemplate struct {
	Name        string  `json:"name"`
	Description string  `json:"description"`
	Content     string  `json:"content"`
	Status      string  `json:"status"`
	Type        string  `json:"type"`
	ParentName  *string `json:"parent"`
}

swagger:model

type UpdateTemplateItem added in v0.0.17

type UpdateTemplateItem struct {
	Name        string  `json:"name"`
	Description string  `json:"description"`
	Content     string  `json:"content"`
	Status      string  `json:"status"`
	Type        string  `json:"type"`
	ParentName  *string `json:"parent"`
}

swagger:model

type UpdateTemplateItemStatus added in v0.0.17

type UpdateTemplateItemStatus struct {
	Name   string `json:"name"`
	Status string `json:"status"`
}

swagger:model

type UpdateTemplateTree added in v0.0.17

type UpdateTemplateTree []*TemplateTreeBranch

swagger:model

type UpdateUser

type UpdateUser struct {
	Id             int64          `json:"id"`
	Nickname       string         `json:"nickname" valid:"Required;MinSize(3);MaxSize(255)"`
	FirstName      string         `json:"first_name"`
	LastName       string         `json:"last_name"`
	Password       string         `json:"password"`
	PasswordRepeat string         `json:"password_repeat"`
	Email          string         `json:"email" valid:"Required;Email"`
	Status         string         `json:"status"`
	Lang           string         `json:"lang"`
	Image          *NewUserImage  `json:"image"`
	Role           *NewUserRole   `json:"role"`
	Meta           []*NewUserMeta `json:"meta"`
}

swagger:model

func (*UpdateUser) Valid

func (d *UpdateUser) Valid() (ok bool, errs []*validation.Error)

type UpdateWorkflow

type UpdateWorkflow struct {
	Id          int64  `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	Status      string `json:"status"`
}

swagger:model

type UpdateWorkflowScenario

type UpdateWorkflowScenario struct {
	Id         int64     `json:"id"`
	Name       string    `json:"name"`
	SystemName string    `json:"system_name"`
	WorkflowId int64     `json:"workflow_id"`
	Scripts    []*Script `json:"scripts"`
}

swagger:model

type UserByIdModelMeta

type UserByIdModelMeta struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type UserByIdModelParent

type UserByIdModelParent struct {
	Id       int64  `json:"id"`
	Nickname string `json:"nickname"`
}

type UserFull

type UserFull struct {
	Id                  int64                `json:"id"`
	Nickname            string               `json:"nickname"`
	FirstName           string               `json:"first_name"`
	LastName            string               `json:"last_name"`
	Email               string               `json:"email"`
	Status              string               `json:"status"`
	AuthenticationToken string               `json:"authentication_token"`
	Image               *Image               `json:"image"`
	SignInCount         int64                `json:"sign_in_count"`
	CurrentSignInIp     string               `json:"current_sign_in_ip"`
	LastSignInIp        string               `json:"last_sign_in_ip"`
	Lang                string               `json:"lang"`
	User                *UserByIdModelParent `json:"user"`
	Role                *Role                `json:"role"`
	RoleName            string               `json:"role_name"`
	Meta                []*UserByIdModelMeta `json:"meta"`
	ResetPasswordSentAt *time.Time           `json:"reset_password_sent_at"`
	CurrentSignInAt     *time.Time           `json:"current_sign_in_at"`
	LastSignInAt        *time.Time           `json:"last_sign_in_at"`
	CreatedAt           time.Time            `json:"created_at"`
	UpdatedAt           time.Time            `json:"updated_at"`
	DeletedAt           *time.Time           `json:"deleted_at"`
	History             []*UserHistory       `json:"history"`
}

swagger:model

type UserHistory

type UserHistory struct {
	Ip   string    `json:"ip"`
	Time time.Time `json:"time"`
}

type UserShot

type UserShot struct {
	Id        int64                `json:"id"`
	Nickname  string               `json:"nickname" valid:"Required;MinSize(3);MaxSize(255)"`
	FirstName string               `json:"first_name" valid:"MaxSize(255)"`
	LastName  string               `json:"last_name" valid:"MaxSize(255)"`
	Email     string               `json:"email" valid:"Required;Email"`
	Status    string               `json:"status" valid:"MaxSize(255)"`
	Image     *Image               `json:"image"`
	Lang      string               `json:"lang"`
	User      *UserByIdModelParent `json:"user"`
	Role      *Role                `json:"role"`
	RoleName  string               `json:"role_name"`
	CreatedAt time.Time            `json:"created_at"`
	UpdatedAt time.Time            `json:"updated_at"`
}

swagger:model

type UserUpdateStatusRequest

type UserUpdateStatusRequest struct {
	Status string `json:"status"`
}

swagger:model

type Worker

type Worker struct {
	Id             int64         `json:"id"`
	Name           string        `json:"name"`
	Time           string        `json:"time"`
	Status         string        `json:"status"`
	Workflow       *Workflow     `json:"workflow"`
	WorkflowId     int64         `json:"workflow_id"`
	Flow           *Flow         `json:"flow"`
	FlowId         int64         `json:"flow_id"`
	DeviceAction   *DeviceAction `json:"device_action"`
	DeviceActionId int64         `json:"device_action_id"`
	CreatedAt      time.Time     `json:"created_at"`
	UpdatedAt      time.Time     `json:"updated_at"`
}

type Workflow

type Workflow struct {
	Id          int64               `json:"id"`
	Name        string              `json:"name"`
	Description string              `json:"description"`
	Status      string              `json:"status"`
	Scripts     []*Script           `json:"scripts"`
	Scenario    *WorkflowScenario   `json:"scenario"`
	Scenarios   []*WorkflowScenario `json:"scenarios"`
	CreatedAt   time.Time           `json:"created_at"`
	UpdatedAt   time.Time           `json:"updated_at"`
}

swagger:model

type WorkflowScenario

type WorkflowScenario struct {
	Id         int64     `json:"id"`
	Name       string    `json:"name"`
	SystemName string    `json:"system_name"`
	WorkflowId int64     `json:"workflow_id"`
	Scripts    []*Script `json:"scripts"`
	CreatedAt  time.Time `json:"created_at"`
	UpdatedAt  time.Time `json:"updated_at"`
}

swagger:model

type WorkflowScenarioShort added in v0.0.14

type WorkflowScenarioShort struct {
	Id         int64     `json:"id"`
	Name       string    `json:"name"`
	SystemName string    `json:"system_name"`
	CreatedAt  time.Time `json:"created_at"`
	UpdatedAt  time.Time `json:"updated_at"`
}

swagger:model

type WorkflowShort added in v0.0.14

type WorkflowShort struct {
	Id          int64                    `json:"id"`
	Name        string                   `json:"name"`
	Description string                   `json:"description"`
	Status      string                   `json:"status"`
	Scenario    *WorkflowScenarioShort   `json:"scenario"`
	Scenarios   []*WorkflowScenarioShort `json:"scenarios"`
	CreatedAt   time.Time                `json:"created_at"`
	UpdatedAt   time.Time                `json:"updated_at"`
}

swagger:model

type WorkflowUpdateWorkflowScenario

type WorkflowUpdateWorkflowScenario struct {
	WorkflowScenarioId int64 `json:"workflow_scenario_id"`
}

swagger:model

Jump to

Keyboard shortcuts

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