Documentation ¶
Index ¶
- Constants
- func NewMessageData(id string, action string, payload interface{}) []byte
- func RunBackgroundTasks(ctx context.Context)
- type AddPageControlsPayload
- type AppBecomeInactivePayload
- type AppendControlPropsPayload
- type CleanControlPayload
- type Client
- type ClientRole
- type InactiveAppRequestPayload
- type Message
- type PageCommandRequestPayload
- type PageCommandResponsePayload
- type PageCommandsBatchRequestPayload
- type PageCommandsBatchResponsePayload
- type PageEventPayload
- type RegisterHostClientRequestPayload
- type RegisterHostClientResponsePayload
- type RegisterWebClientRequestPayload
- type RegisterWebClientResponsePayload
- type RemoveControlPayload
- type ReplacePageControlsPayload
- type SessionCrashedPayload
- type SessionCreatedPayload
- type SessionPayload
- type SignoutPayload
- type UpdateControlPropsPayload
Constants ¶
View Source
const ( // RegisterWebClientAction registers WS client as web (browser) client RegisterWebClientAction = "registerWebClient" // RegisterHostClientAction registers WS client as host (script) client RegisterHostClientAction = "registerHostClient" // SessionCreatedAction notifies host clients about new sessions SessionCreatedAction = "sessionCreated" // PageCommandFromHostAction adds, sets, gets, disconnects or performs other page-related command from host PageCommandFromHostAction = "pageCommandFromHost" InactiveAppFromHostAction = "inactiveAppFromHost" // PageCommandFromHostAction adds, sets, gets, disconnects or performs other page-related command from host PageCommandsBatchFromHostAction = "pageCommandsBatchFromHost" // PageEventFromWebAction receives click, change, expand/collapse and other events from browser PageEventFromWebAction = "pageEventFromWeb" // PageEventToHostAction redirects events from web to host clients PageEventToHostAction = "pageEventToHost" AddPageControlsAction = "addPageControls" ReplacePageControlsAction = "replacePageControls" UpdateControlPropsAction = "updateControlProps" AppendControlPropsAction = "appendControlProps" RemoveControlAction = "removeControl" CleanControlAction = "cleanControl" PageControlsBatchAction = "pageControlsBatch" AppBecomeInactiveAction = "appBecomeInactive" SessionCrashedAction = "sessionCrashed" SignoutAction = "signout" )
View Source
const ( // ZeroSession is ID of zero session ZeroSession string = "0" // ControlAutoIDPrefix is a prefix for auto-generated control IDs ControlAutoIDPrefix = "_" // ControlIDSeparator is a symbol between parts of control ID ControlIDSeparator = ":" // ReservedPageID is a reserved page ID ReservedPageID = "page" )
Variables ¶
This section is empty.
Functions ¶
func NewMessageData ¶ added in v0.3.0
func RunBackgroundTasks ¶ added in v0.1.12
Types ¶
type AddPageControlsPayload ¶
type AppBecomeInactivePayload ¶ added in v0.3.0
type AppBecomeInactivePayload struct {
Message string `json:"message"`
}
type AppendControlPropsPayload ¶ added in v0.1.9
type CleanControlPayload ¶
type CleanControlPayload struct {
IDs []string `json:"ids"`
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(conn connection.Conn, clientIP string, principal *auth.SecurityPrincipal) *Client
type ClientRole ¶
type ClientRole string
const ( None ClientRole = "None" WebClient ClientRole = "Web" HostClient ClientRole = "Host" )
type InactiveAppRequestPayload ¶ added in v0.3.0
type InactiveAppRequestPayload struct {
PageName string `json:"pageName"`
}
type Message ¶
type Message struct { ID string `json:"id"` Action string `json:"action"` Payload json.RawMessage `json:"payload"` }
func NewMessage ¶
type PageCommandsBatchRequestPayload ¶ added in v0.3.0
type PageCommandsBatchResponsePayload ¶ added in v0.3.0
type PageEventPayload ¶
type RegisterWebClientResponsePayload ¶
type RegisterWebClientResponsePayload struct { Session *SessionPayload `json:"session"` Error string `json:"error"` SigninOptions *auth.SigninOptions `json:"signinOptions"` }
type RemoveControlPayload ¶
type RemoveControlPayload struct {
IDs []string `json:"ids"`
}
type ReplacePageControlsPayload ¶ added in v0.2.0
type SessionCrashedPayload ¶ added in v0.3.1
type SessionCrashedPayload struct {
Message string `json:"message"`
}
type SessionCreatedPayload ¶
type SessionPayload ¶ added in v0.1.12
type SignoutPayload ¶ added in v0.4.0
type SignoutPayload struct { }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.