Documentation ¶
Index ¶
- func FilesHandler(w http.ResponseWriter, r *http.Request)
- func NewRouter() *chi.Mux
- func RandomString(length int) []byte
- func RunCommand(data *CommandRequest, resp *CommandResponse, done chan<- bool)
- func RunCommandWithArgsHandler(w http.ResponseWriter, r *http.Request)
- func ShowConfigHandler(w http.ResponseWriter, r *http.Request)
- type CommandRequest
- type CommandResponse
- type ShowConfigResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilesHandler ¶ added in v0.3.0
func FilesHandler(w http.ResponseWriter, r *http.Request)
func RandomString ¶ added in v0.2.0
func RunCommand ¶
func RunCommand(data *CommandRequest, resp *CommandResponse, done chan<- bool)
func RunCommandWithArgsHandler ¶
func RunCommandWithArgsHandler(w http.ResponseWriter, r *http.Request)
func ShowConfigHandler ¶
func ShowConfigHandler(w http.ResponseWriter, r *http.Request)
Types ¶
type CommandRequest ¶
type CommandResponse ¶
type CommandResponse struct { Cmd string `json:"cmd"` Msg string `json:"msg"` Rc int `json:"rc"` Stderr string `json:"stderr"` StderrLines []string `json:"stderr_lines"` Stdout string `json:"stdout"` StdoutLines []string `json:"stdout_lines"` }
func NewCommandResponse ¶
func NewCommandResponse() *CommandResponse
func (*CommandResponse) Render ¶
func (c *CommandResponse) Render(w http.ResponseWriter, r *http.Request) error
type ShowConfigResponse ¶
func NewShowConfigResponse ¶
func NewShowConfigResponse() *ShowConfigResponse
func (*ShowConfigResponse) Render ¶
func (c *ShowConfigResponse) Render(w http.ResponseWriter, r *http.Request) error
Click to show internal directories.
Click to hide internal directories.