Versions in this module Expand all Collapse all v1 v1.0.1 May 27, 2025 Changes in this version + const AuthenticationEvent + const AuthenticationSuccessEvent + const ErrorEvent + const JwtErrorEvent + const PermissionConnect + const PermissionReceiveBackups + const PermissionReceiveErrors + const PermissionReceiveInstall + const PermissionReceiveTransfer + const PermissionSendCommand + const PermissionSendPowerRestart + const PermissionSendPowerStart + const PermissionSendPowerStop + const SendCommandEvent + const SendServerLogsEvent + const SendStatsEvent + const SetStateEvent + const TokenExpiredEvent + const TokenExpiringEvent + var ErrJwtNoConnectPerm = errors.New("jwt: missing connect permission") + var ErrJwtNotPresent = errors.New("jwt: no jwt present") + var ErrJwtOnDenylist = errors.New("jwt: created too far in past (denylist)") + var ErrJwtUuidMismatch = errors.New("jwt: server uuid mismatch") + func IsJwtError(err error) bool + func NewTokenPayload(token []byte) (*tokens.WebsocketPayload, error) + type Handler struct + Connection *websocket.Conn + func GetHandler(s *server.Server, w http.ResponseWriter, r *http.Request, c *gin.Context) (*Handler, error) + func (h *Handler) GetErrorMessage(msg string) (string, uuid.UUID) + func (h *Handler) GetJwt() *tokens.WebsocketPayload + func (h *Handler) HandleInbound(ctx context.Context, m Message) error + func (h *Handler) Logger() *log.Entry + func (h *Handler) SendErrorJson(msg Message, err error, shouldLog ...bool) error + func (h *Handler) SendJson(v Message) error + func (h *Handler) TokenValid() error + func (h *Handler) Uuid() uuid.UUID + type Message struct + Args []string + Event string