Documentation ¶
Index ¶
- Constants
- Variables
- func GenerateErrorResponse(code *int64, message string) *models.Error
- func NewConnection() models.ServiceManagerConnectionResponse
- func NewStatus() models.StatusResponse
- func NewWorkspace() models.ServiceManagerWorkspaceResponse
- func ReadExitStatus(err error, cmdExec *exec.Cmd, c CSMFileHelper) int
- func ReadOutputFile(outputFile *os.File, removeAfter bool) ([]byte, error)
- func RunCmd(cmdExec *exec.Cmd, c CSMFileHelper) bool
- type CSMFileHelper
- type CSMFileHelperInterface
- type JsonResponse
Constants ¶
View Source
const ERR_EXTENSION_NOT_FOUND string = "extension not found"
View Source
const ERR_TIMEOUT string = "Timeout while executing the extension. The extension did not respond in a reasonable amount of time."
Variables ¶
View Source
var HTTP_408 int64 = 408
View Source
var HTTP_500 int64 = 500
Functions ¶
func NewConnection ¶
func NewConnection() models.ServiceManagerConnectionResponse
func NewStatus ¶
func NewStatus() models.StatusResponse
func NewWorkspace ¶
func NewWorkspace() models.ServiceManagerWorkspaceResponse
func ReadExitStatus ¶
func ReadExitStatus(err error, cmdExec *exec.Cmd, c CSMFileHelper) int
Types ¶
type CSMFileHelper ¶
type CSMFileHelper struct { CSMFileHelperInterface Logger *logrus.Logger Config *common.ServiceManagerConfiguration }
func (CSMFileHelper) GetExtension ¶
func (c CSMFileHelper) GetExtension(extPath string) (bool, string)
GetExtension verify if the extension file exists
func (CSMFileHelper) RunExtension ¶
func (c CSMFileHelper) RunExtension(extensionPath string, params ...string) (bool, string)
RunExtension executes the extension
func (CSMFileHelper) RunExtensionFileGen ¶
func (c CSMFileHelper) RunExtensionFileGen(extensionPath string, params ...string) (bool, *os.File, string)
RunExtensionFileGen executes the extension
type CSMFileHelperInterface ¶
type JsonResponse ¶
type JsonResponse struct { ErrorCode int `json:"error_code,omitempty"` ErrorMessage string `json:"error_message,omitempty"` Details interface{} `json:"details,omitempty"` Status string `json:"status"` ServiceType string `json:"service_type"` Diagnostics []*models.StatusDiagnostic `json:"diagnostics,omitempty"` }
func (*JsonResponse) Unmarshal ¶
func (j *JsonResponse) Unmarshal(value []byte) error
Click to show internal directories.
Click to hide internal directories.