Documentation
¶
Overview ¶
Package common contains all shared structs(data structures) required for all connectors
Index ¶
- Variables
- func FileExist(str string) bool
- func HandleError(err error, method string)
- func PrintGreen(str string)
- func PrintHeader(version string)
- func PrintRed(str string)
- func SendHTTPRequest(ctx context.Context, method, url, auth_token string, body io.Reader, ...) ([]byte, bool, error)
- type GeneralUpdatedList
- type MAIN_DEFECT_TYPE
- type PREDICTED_SUB_TYPE
- type TFAInput
- type TFAModel
Constants ¶
This section is empty.
Variables ¶
View Source
var MAIN_DEFECT_TYPES map[string]MAIN_DEFECT_TYPE = map[string]MAIN_DEFECT_TYPE{ "AUTOMATION_BUG": AUTOMATION_BUG, "SYSTEM_BUG": SYSTEM_BUG, "PRODUCT_BUG": PRODUCT_BUG, "NO_DEFECT": NO_DEFECT, }
View Source
var PREDICTED_SUB_TYPES map[string]PREDICTED_SUB_TYPE = map[string]PREDICTED_SUB_TYPE{ "PREDICTED_AUTOMATION_BUG": PREDICTED_AUTOMATION_BUG, "PREDICTED_SYSTEM_BUG": PREDICTED_SYSTEM_BUG, "PREDICTED_PRODUCT_BUG": PREDICTED_PRODUCT_BUG, "PREDICTED_NO_DEFECT": PREDICTED_NO_DEFECT, }
View Source
var TFA_DEFECT_TYPE map[string]MAIN_DEFECT_TYPE = map[string]MAIN_DEFECT_TYPE{ "Automation Bug": AUTOMATION_BUG, "Product Bug": PRODUCT_BUG, "System Issue": SYSTEM_BUG, "No Defect": NO_DEFECT, }
View Source
var TFA_DEFECT_TYPE_TO_SUB_TYPE map[string]PREDICTED_SUB_TYPE = map[string]PREDICTED_SUB_TYPE{ "Automation Bug": PREDICTED_AUTOMATION_BUG, "Product Bug": PREDICTED_PRODUCT_BUG, "System Issue": PREDICTED_SYSTEM_BUG, "No Defect": PREDICTED_NO_DEFECT, }
Functions ¶
func HandleError ¶
HandleError is the Error handler for the whole tfacon.
func PrintGreen ¶
func PrintGreen(str string)
PrintGreen is a helper function that prints str in green to terminal.
func PrintHeader ¶
func PrintHeader(version string)
PrintHeader is a helper function for the whole program to print header information.
Types ¶
type GeneralUpdatedList ¶
type GeneralUpdatedList interface {
GetSelf() GeneralUpdatedList
}
GeneralUpdatedList is an updated list of object, with the prediction from TFA classifier each connector should have it's own UpdatedList structure and implement the GeneralUpdatedList interface.
type MAIN_DEFECT_TYPE ¶ added in v1.1.4
var AUTOMATION_BUG MAIN_DEFECT_TYPE = MAIN_DEFECT_TYPE{
"locator": "ab001",
"typeRef": "AUTOMATION_BUG",
"longName": "Automation Bug",
"shortName": "AB",
"color": "#f7d63e",
}
var NO_DEFECT MAIN_DEFECT_TYPE = MAIN_DEFECT_TYPE{
"locator": "nd001",
"typeRef": "NO_DEFECT",
"longName": "No Defect",
"shortName": "ND",
"color": "#777777",
}
var PRODUCT_BUG MAIN_DEFECT_TYPE = MAIN_DEFECT_TYPE{
"locator": "pb001",
"typeRef": "PRODUCT_BUG",
"longName": "Product Bug",
"shortName": "PB",
"color": "#ec3900",
}
var SYSTEM_BUG MAIN_DEFECT_TYPE = MAIN_DEFECT_TYPE{
"locator": "si001",
"typeRef": "SYSTEM_ISSUE",
"longName": "System Issue",
"shortName": "SI",
"color": "#0274d1",
}
type PREDICTED_SUB_TYPE ¶
var PREDICTED_AUTOMATION_BUG PREDICTED_SUB_TYPE = PREDICTED_SUB_TYPE{
"typeRef": "TO_INVESTIGATE",
"longName": "Predicted Automation Bug",
"shortName": "TIA",
"color": "#ffeeaa",
}
var PREDICTED_NO_DEFECT PREDICTED_SUB_TYPE = PREDICTED_SUB_TYPE{
"typeRef": "TO_INVESTIGATE",
"longName": "Predicted No Defect",
"shortName": "TND",
"color": "#C1BCB4",
}
var PREDICTED_PRODUCT_BUG PREDICTED_SUB_TYPE = PREDICTED_SUB_TYPE{
"typeRef": "TO_INVESTIGATE",
"longName": "Predicted Product Bug",
"shortName": "TIP",
"color": "#ffaaaa",
}
var PREDICTED_SYSTEM_BUG PREDICTED_SUB_TYPE = PREDICTED_SUB_TYPE{
"typeRef": "TO_INVESTIGATE",
"longName": "Predicted System Issue",
"shortName": "TIS",
"color": "#aaaaff",
}
type TFAInput ¶
type TFAInput struct { ID string `json:"id"` Project string `json:"project"` Messages string `json:"messages"` AutoFinalizeDefectType bool `json:"finalization_flag"` FinalizationThreshold float32 `json:"finalization_threshold"` }
TFAInput is the data structure for describing the three input params for TFA Classifier.
Click to show internal directories.
Click to hide internal directories.