Documentation ¶
Index ¶
- type Handler
- func (h *Handler) CreateSession(rw http.ResponseWriter, r *http.Request)
- func (h *Handler) DeleteSession(rw http.ResponseWriter, r *http.Request)
- func (h *Handler) GetAgentMsh(rw http.ResponseWriter, r *http.Request)
- func (h *Handler) ProxyAgent(rw http.ResponseWriter, r *http.Request)
- func (h *Handler) ProxyMeshCentral() http.Handler
- func (h *Handler) ProxyMeshCentralURL() string
- func (h *Handler) ProxyRelay(rw http.ResponseWriter, r *http.Request)
- func (h *Handler) ShareSession(rw http.ResponseWriter, r *http.Request)
- func (h *Handler) ShareSessionURL(rw http.ResponseWriter, r *http.Request)
- type Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func (*Handler) CreateSession ¶
func (h *Handler) CreateSession(rw http.ResponseWriter, r *http.Request)
CreateSession godoc @Summary Create a session. @Description Create a plexus session where meshagents can connect to. @Tags session @Accept application/x-www-form-urlencoded @Produce application/json @Param id formData string true "session id" @Param ttl formData int true "the time to live for the session" @Param username formData string true "the credentials to open the remote control interface & delete the session" @Param password formData string true "the credentials to open the remote control interface & delete the session" @Success 200 {object} api.Session @Failure 400 {object} api.Error @Failure 500 {object} api.Error @Failure 502 {object} api.Error @Router /session [post]
func (*Handler) DeleteSession ¶
func (h *Handler) DeleteSession(rw http.ResponseWriter, r *http.Request)
DeleteSession godoc @Summary Delete a session. @Tags session @Produce application/json @Param id path string true "session id" @Security BasicAuth @Success 200 {object} api.Result @Failure 400 {object} api.Error @Failure 500 {object} api.Error @Failure 502 {object} api.Error @Router /session/{id} [delete]
func (*Handler) GetAgentMsh ¶
func (h *Handler) GetAgentMsh(rw http.ResponseWriter, r *http.Request)
GetAgentMsh godoc @Summary Gets the meshagent.msh for the given session. @Tags session @Produce text/plain @Param id path string true "session id" @Param token path string true "auth token" @Success 200 {object} string @Failure 400 {object} string @Failure 401 {object} string @Failure 404 {object} string @Failure 500 {object} string @Router /config/{id}:{token} [get]
func (*Handler) ProxyAgent ¶
func (h *Handler) ProxyAgent(rw http.ResponseWriter, r *http.Request)
ProxyAgent godoc @Summary Forwards the agent control requests to the meshcentral server @Tags websocket @Param id path string true "session id" @Param token path string true "the authentication token" @Success 200 {object} string @Router /agent/{id}:{token} [get]
func (*Handler) ProxyMeshCentral ¶ added in v0.0.3
func (*Handler) ProxyMeshCentralURL ¶ added in v0.0.3
func (*Handler) ProxyRelay ¶
func (h *Handler) ProxyRelay(rw http.ResponseWriter, r *http.Request)
ProxyRelay godoc @Summary Forwards meshagent relay requests to the meshcentral server. @Tags websocket @Success 200 {object} string @Router /meshrelay.ashx [get]
func (*Handler) ShareSession ¶
func (h *Handler) ShareSession(rw http.ResponseWriter, r *http.Request)
ShareSession godoc @Summary Start the remote control on the session via a browser. @Tags session @Produce text/html @Param id path string true "session id" @Security BasicAuth @Success 200 {object} string @Failure 400 {object} api.Error @Failure 401 {object} api.Error @Failure 500 {object} api.Error @Router /session/{id} [get]
func (*Handler) ShareSessionURL ¶
func (h *Handler) ShareSessionURL(rw http.ResponseWriter, r *http.Request)
ShareSessionURL godoc @Summary Gets the meshcentral share session for the session id. @Tags session @Produce application/json @Param id path string true "session id" @Security BasicAuth @Success 200 {object} api.URLResponse @Failure 400 {object} api.Error @Failure 401 {object} api.Error @Failure 500 {object} api.Error @Failure 502 {object} api.Error @Router /session/{id}/url [get]