Documentation ¶
Index ¶
- Variables
- func ApiMessage(code uint32, message string, description interface{}, path string) map[string]interface{}
- func ApiResponse(w http.ResponseWriter, data map[string]interface{})
- func ApiResponseByteArray(w http.ResponseWriter, data []byte)
- func ApiResponseError(w http.ResponseWriter, data map[string]interface{})
- func ApiResponseZip(w http.ResponseWriter, data []byte)
- func AppendFile(fileName string, content string)
- func CloseFile(file *os.File) error
- func CreateDir(dirName string)
- func CreateFileIfNotExist(fileName string)
- func DeleteFile(fileName string)
- func DeleteFiles(fileNames []string)
- func DoesFileExists(filename string) bool
- func GetAllProcesses() []*models.ProcessInfo
- func GetAllProcessesByExecName(processName string) []*models.ProcessInfo
- func GetBase64HashForTheCommand(command string, cmdId string, suffix string) string
- func GetCommandDetailsForEndedCommand(endedCommand *exec.Cmd) *models.CommandDetails
- func GetFormattedTimeAsString(timestamp time.Time) string
- func GetMessage() map[uint32]string
- func GetProcessByPid(pid int) []*models.ProcessInfo
- func GetProcessesForPid(pid int) []*models.ProcessInfo
- func IsFolder(folderName string) bool
- func KillAllCmdBackgroundProcesses()
- func KillCmdBackgroundProcess(cmdId string)
- func KillProcess(pid int)
- func KillProcesses(processes []*models.ProcessInfo)
- func OpenFile(fileName string) *os.File
- func ReadFile(fileName string) []byte
- func RecreateFile(fileName string)
- func RecreateFiles(fileNames []string)
- func RunCommand(command string) *models.CommandDetails
- func RunCommandNoFile(command string, cmdId string) *models.CommandDetails
- func RunCommandToFile(command string, cmdId string) *models.CommandDetails
- func StartCommand(cmdId string, command []string, ch chan error)
- func TrimSpacesAndLineEndings(data []string) []string
- func WriteFile(fileName string, content []byte)
- func WriteFileJson(fileName string, content interface{}) error
- type HttpResponse
- type YamlConfigParser
Constants ¶
This section is empty.
Variables ¶
View Source
var ServerHttpResponse = &HttpResponse{}
Functions ¶
func ApiMessage ¶
func ApiResponse ¶
func ApiResponse(w http.ResponseWriter, data map[string]interface{})
func ApiResponseByteArray ¶
func ApiResponseByteArray(w http.ResponseWriter, data []byte)
func ApiResponseError ¶
func ApiResponseError(w http.ResponseWriter, data map[string]interface{})
func ApiResponseZip ¶
func ApiResponseZip(w http.ResponseWriter, data []byte)
func AppendFile ¶
func CreateFileIfNotExist ¶
func CreateFileIfNotExist(fileName string)
func DeleteFile ¶
func DeleteFile(fileName string)
func DeleteFiles ¶
func DeleteFiles(fileNames []string)
func DoesFileExists ¶
func GetAllProcesses ¶
func GetAllProcesses() []*models.ProcessInfo
func GetAllProcessesByExecName ¶
func GetAllProcessesByExecName(processName string) []*models.ProcessInfo
func GetCommandDetailsForEndedCommand ¶
func GetCommandDetailsForEndedCommand(endedCommand *exec.Cmd) *models.CommandDetails
* ! The command must have already ended
func GetMessage ¶
func GetProcessByPid ¶
func GetProcessByPid(pid int) []*models.ProcessInfo
func GetProcessesForPid ¶
func GetProcessesForPid(pid int) []*models.ProcessInfo
func KillAllCmdBackgroundProcesses ¶
func KillAllCmdBackgroundProcesses()
func KillCmdBackgroundProcess ¶
func KillCmdBackgroundProcess(cmdId string)
func KillProcess ¶
func KillProcess(pid int)
func KillProcesses ¶
func KillProcesses(processes []*models.ProcessInfo)
func RecreateFile ¶
func RecreateFile(fileName string)
func RecreateFiles ¶
func RecreateFiles(fileNames []string)
func RunCommand ¶
func RunCommand(command string) *models.CommandDetails
func RunCommandNoFile ¶
func RunCommandNoFile(command string, cmdId string) *models.CommandDetails
func RunCommandToFile ¶
func RunCommandToFile(command string, cmdId string) *models.CommandDetails
func StartCommand ¶
func WriteFileJson ¶
Types ¶
type HttpResponse ¶
type HttpResponse struct { Response interface{} Code int }
type YamlConfigParser ¶
type YamlConfigParser struct {
// contains filtered or unexported fields
}
func NewYamlConfigParser ¶
func NewYamlConfigParser() *YamlConfigParser
func (*YamlConfigParser) CheckConfig ¶
func (configParser *YamlConfigParser) CheckConfig(config *models.YamlConfig) error
func (*YamlConfigParser) GetCommandsList ¶
func (configParser *YamlConfigParser) GetCommandsList(config *models.YamlConfig) []string
Click to show internal directories.
Click to hide internal directories.