Documentation
¶
Index ¶
- Constants
- func ClientChannelName(clientID string) string
- func GetUploadQueryString(fileName string, expireStr string) string
- func GetUploadSignature(queryString string) string
- func GetUploadUrl(fileName string, expiresInSeconds int) string
- func NewMessageData(id string, action string, payload interface{}) []byte
- func RunBackgroundTasks(ctx context.Context)
- type AddPageControlsPayload
- type AppBecomeActivePayload
- type AppBecomeInactivePayload
- type AppendControlPropsPayload
- type CleanControlPayload
- type Client
- type ClientRole
- type InactiveAppRequestPayload
- type InvokeMethodPayload
- 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 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" // 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" AppBecomeActiveAction = "appBecomeActive" AppBecomeInactiveAction = "appBecomeInactive" SessionCrashedAction = "sessionCrashed" InvokeMethodAction = "invokeMethod" )
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 ClientChannelName ¶
func GetUploadQueryString ¶
func GetUploadSignature ¶
func GetUploadUrl ¶
func NewMessageData ¶
func RunBackgroundTasks ¶
Types ¶
type AddPageControlsPayload ¶
type AppBecomeActivePayload ¶
type AppBecomeActivePayload struct { }
type AppBecomeInactivePayload ¶
type AppBecomeInactivePayload struct {
Message string `json:"message"`
}
type CleanControlPayload ¶
type CleanControlPayload struct {
IDs []string `json:"ids"`
}
type ClientRole ¶
type ClientRole string
const ( None ClientRole = "None" WebClient ClientRole = "Web" HostClient ClientRole = "Host" )
type InactiveAppRequestPayload ¶
type InactiveAppRequestPayload struct {
PageName string `json:"pageName"`
}
type InvokeMethodPayload ¶
type Message ¶
type Message struct { ID string `json:"id"` Action string `json:"action"` Payload json.RawMessage `json:"payload"` }
func NewMessage ¶
type PageEventPayload ¶
type RegisterWebClientRequestPayload ¶
type RegisterWebClientRequestPayload struct { PageName string `json:"pageName"` PageRoute string `json:"pageRoute"` PageWidth string `json:"pageWidth"` PageHeight string `json:"pageHeight"` WindowWidth string `json:"windowWidth"` WindowHeight string `json:"windowHeight"` WindowTop string `json:"windowTop"` WindowLeft string `json:"windowLeft"` IsPWA string `json:"isPWA"` IsWeb string `json:"isWeb"` IsDebug string `json:"isDebug"` Platform string `json:"platform"` PlatformBrightness string `json:"platformBrightness"` Media string `json:"media"` SessionID string `json:"sessionID"` }
type RegisterWebClientResponsePayload ¶
type RegisterWebClientResponsePayload struct { Session *SessionPayload `json:"session"` AppInactive bool `json:"appInactive"` Error string `json:"error"` }
type RemoveControlPayload ¶
type RemoveControlPayload struct {
IDs []string `json:"ids"`
}
type SessionCrashedPayload ¶
type SessionCrashedPayload struct {
Message string `json:"message"`
}
type SessionCreatedPayload ¶
type SessionPayload ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.