Documentation ¶
Index ¶
- Constants
- type PermissionProvider
- type Server
- func (server *Server) ClientConnected(client *wsserver.Client)
- func (server *Server) ClientDisconnected(wsClient *wsserver.Client)
- func (server *Server) Close()
- func (server *Server) GetPermissionProvider() (permissionProvider PermissionProvider)
- func (server *Server) ProcessMessage(wsClient *wsserver.Client, messageType int, message []byte) (response []byte, err error)
Constants ¶
View Source
const ( ActionGet = "get" ActionSet = "set" ActionAuth = "authorize" ActionSubscribe = "subscribe" ActionUnsubscribe = "unsubscribe" ActionUnsubscribeAll = "unsubscribeAll" ActionSubscription = "subscription" )
VIS actions.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PermissionProvider ¶
type PermissionProvider interface {
GetVisPermissionByToken(token string) (permissions map[string]string, err error)
}
PermissionProvider interface to get permissions.
type Server ¶
Server update manager server structure.
func New ¶
func New(config *config.Config, permissionProvider PermissionProvider) (server *Server, err error)
New creates new Web socket server.
func (*Server) ClientConnected ¶
ClientConnected connect client notification.
func (*Server) ClientDisconnected ¶
ClientDisconnected disconnect client notification.
func (*Server) Close ¶
func (server *Server) Close()
Close closes web socket server and all connections.
func (*Server) GetPermissionProvider ¶
func (server *Server) GetPermissionProvider() (permissionProvider PermissionProvider)
GetPermissionProvider returns permission provider interface.
Click to show internal directories.
Click to hide internal directories.