Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyAPIHeader ¶
ApplyAPIHeader adds some headers for API response.
func ApplyCORSHeader ¶
ApplyCORSHeader adds the Access-Control-Allow-Origin to the header of response.
func UpgradeToWebSocket ¶
UpgradeToWebSocket upgrades the current HTTP connection to WebSocket connection and sets it as the parameter WebSocket in the context. If it cannot upgrade to WebSocket connection, a failure response will be sent to client.
func VerifyUserToken ¶
VerifyUserToken finds the token in incoming request and validates it. If there is a valid token, it will set the token's id as a parameter UID in the context;
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.