Documentation
¶
Index ¶
Constants ¶
View Source
const ( //CLIENT_TYPE_CONTROL makes fff ClientTypeControl = "control" ClientTypeDisplay = "display" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangedLayout ¶
CurrentLayout make a Current Layout
type Client ¶
type Client struct {
ID string `json:"token"`
Type string `json:"type,omitempty"`
CurrentLayout string `json:"currentlayout,omitempty"`
IP string `json:"ip,omitempty"`
MAC string `json:"mac,omitempty"`
}
Client 定义
type Clients ¶
func (*Clients) IsExistClient ¶
IsExistClient 判断clientMap中是否存在该key,参数key,返回值bool
func (*Clients) IsExistDisplay ¶
func (*Clients) RemoveClient ¶
RemoveClient clientMap中移除client
type Error ¶
type Error struct {
Device string `json:"device"`
Message string `json:"message"`
DebugInfo string `json:"debuginfo"`
}
Error make server forwarding screen device debug info
type Grid ¶
type Grid struct {
ID bson.ObjectId `json:"id" bson:"_id"`
Left int `json:"left"`
Top int `json:"top"`
ZIndex int `json:"zindex"`
Width int `json:"width"`
Height int `json:"height"`
Resource *Resource `json:"resource" bson:"resource"`
}
Grid make a grid
type Layout ¶
type Layout struct {
ID string `json:"id"`
Name string `json:"name"`
Index int `json:"index"`
Grids map[string]Grid `json:"grids"`
}
Layout make a layout
func (*Layout) UpdateGrid ¶
func (r *Layout) UpdateGrid(g *UpdateLayout)
type Layouts ¶
func (*Layouts) IsExistLayout ¶
type Resource ¶
type Resource struct {
ID bson.ObjectId `json:"id" bson:"_id"`
Type resourceType `json:"stype" bson:"stype"`
URL string `json:"url" bson:"url"`
Fix bool `json:"fix" bson:"fix"`
Name string `json:"name" bson:"name"`
}
Resource defines the basic information resource
type ResourceMap ¶
ResourceMap make server's resource list
func (*ResourceMap) Load ¶
func (r *ResourceMap) Load(d *mgo.Database)
Load 方法实现从MongoDB读取资源集合(collection name: resources)填充全局变量ResourceMap
type ResponseLayout ¶
Click to show internal directories.
Click to hide internal directories.