Documentation ¶
Index ¶
- func GetCPIFunctionMockResponse(functionName, testType string) (*http.Response, error)
- func GetCPIFunctionNameByURLCheck(url, method, testType string) string
- func GetEmptyHTTPResponseBodyAndErrorNil() (*http.Response, error)
- func GetFunctionNameByTestTypeAndMethod(method, testType string) string
- func GetFunctionNamePositiveAndCreateIntegrationDesigntimeArtifactResBody(method string) string
- func GetFunctionNamePositiveAndUpdateIntegrationDesigntimeArtifactResBody(method string) string
- func GetIntegrationArtifactDeployErrorDetailsMockResponse(testType string) (*http.Response, error)
- func GetIntegrationArtifactDeployErrorStatusMockResponseBody() (*http.Response, error)
- func GetIntegrationArtifactDeployStatusErrorMockResponseBody() (*http.Response, error)
- func GetIntegrationArtifactDeployStatusMockResponse(testType string) (*http.Response, error)
- func GetIntegrationArtifactDeployStatusMockResponseBody() (*http.Response, error)
- func GetIntegrationArtifactDeployStatusPayload(status string) string
- func GetIntegrationArtifactGetMplStatusCommandMockResponse(testType string) (*http.Response, error)
- func GetIntegrationArtifactGetServiceEndpointCommandMockResponse(testCaseType string) (*http.Response, error)
- func GetIntegrationArtifactGetServiceEndpointPositiveCaseRespBody() (*http.Response, error)
- func GetIntegrationDesigntimeArtifactMockResponse(testType string) (*http.Response, error)
- func GetMockResponseByTestTypeAndMockFunctionName(mockFuntionName, testType string) (*http.Response, error)
- func GetNegativeCaseHTTPResponseBodyAndErrorNil() (*http.Response, error)
- func GetParameterKeyMissingResponseBody() (*http.Response, error)
- func GetPositiveCaseResponseByTestType(testType string) (*http.Response, error)
- func GetRespBodyHTTPStatusCreated() (*http.Response, error)
- func GetRespBodyHTTPStatusOK() (*http.Response, error)
- func GetRespBodyHTTPStatusServiceErrorResponse() (*http.Response, error)
- func GetRespBodyHTTPStatusServiceNotFound() (*http.Response, error)
- func IntegrationArtifactDownloadCommandMockResponse(testType string) (*http.Response, error)
- func IntegrationArtifactDownloadCommandMockResponsePositiveCaseRespBody() (*http.Response, error)
- func IntegrationDesigntimeArtifactUpdateMockResponse(testType string) (*http.Response, error)
- func NegtiveResForIntegrationArtifactGenericCommandMockResponse(message string) (*http.Response, error)
- func TriggerIntegrationTestMockResponse(testCaseType string) (*http.Response, error)
- func UpdateIntegrationDesigntimeArtifactMockResponse(testType string) (*http.Response, error)
- type CommonUtils
- type HTTPUploadUtils
- type HttpCPIUtils
- type HttpFileDownloadRequestParameters
- type HttpFileUploadRequestParameters
- type OAuth
- type ServiceKey
- type TokenParameters
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCPIFunctionMockResponse ¶
GetCPIFunctionMockResponse -Generate mock response payload for different CPI functions
func GetCPIFunctionNameByURLCheck ¶
GetCPIFunctionNameByURLCheck - get postive response by test case type
func GetEmptyHTTPResponseBodyAndErrorNil ¶
GetEmptyHTTPResponseBodyAndErrorNil -Empty http respose body
func GetFunctionNameByTestTypeAndMethod ¶
GetFunctionNameByTestTypeAndMethod -get function name by test tyep
func GetFunctionNamePositiveAndCreateIntegrationDesigntimeArtifactResBody ¶
GetFunctionNamePositiveAndCreateIntegrationDesigntimeArtifactResBody -Get Function Name
func GetFunctionNamePositiveAndUpdateIntegrationDesigntimeArtifactResBody ¶
GetFunctionNamePositiveAndUpdateIntegrationDesigntimeArtifactResBody -Get Function Name
func GetIntegrationArtifactDeployErrorDetailsMockResponse ¶
GetIntegrationArtifactDeployErrorDetailsMockResponse -Provide http respose body
func GetIntegrationArtifactDeployErrorStatusMockResponseBody ¶
GetIntegrationArtifactDeployErrorStatusMockResponseBody -Provide http respose body
func GetIntegrationArtifactDeployStatusErrorMockResponseBody ¶
GetIntegrationArtifactDeployStatusErrorMockResponseBody -Provide http respose body
func GetIntegrationArtifactDeployStatusMockResponse ¶
GetIntegrationArtifactDeployStatusMockResponse -Provide http respose body
func GetIntegrationArtifactDeployStatusMockResponseBody ¶
GetIntegrationArtifactDeployStatusMockResponseBody -Provide http respose body
func GetIntegrationArtifactDeployStatusPayload ¶
GetIntegrationArtifactDeployStatusPayload -Get Payload
func GetIntegrationArtifactGetMplStatusCommandMockResponse ¶
GetIntegrationArtifactGetMplStatusCommandMockResponse -Provide http respose body
func GetIntegrationArtifactGetServiceEndpointCommandMockResponse ¶
func GetIntegrationArtifactGetServiceEndpointCommandMockResponse(testCaseType string) (*http.Response, error)
GetIntegrationArtifactGetServiceEndpointCommandMockResponse -Provide http respose body
func GetIntegrationArtifactGetServiceEndpointPositiveCaseRespBody ¶
GetIntegrationArtifactGetServiceEndpointPositiveCaseRespBody -Provide http respose body for positive case
func GetIntegrationDesigntimeArtifactMockResponse ¶
GetIntegrationDesigntimeArtifactMockResponse -Provide http respose body
func GetMockResponseByTestTypeAndMockFunctionName ¶
func GetMockResponseByTestTypeAndMockFunctionName(mockFuntionName, testType string) (*http.Response, error)
GetMockResponseByTestTypeAndMockFunctionName - Get mock response by testtype and mock function name
func GetNegativeCaseHTTPResponseBodyAndErrorNil ¶
GetNegativeCaseHTTPResponseBodyAndErrorNil -Negative case http respose body
func GetParameterKeyMissingResponseBody ¶
GetParameterKeyMissingResponseBody -Parameter key missing http respose body
func GetPositiveCaseResponseByTestType ¶
GetPositiveCaseResponseByTestType - get postive response by test case type
func GetRespBodyHTTPStatusCreated ¶
GetRespBodyHTTPStatusCreated -Provide http respose body for Http StatusOK
func GetRespBodyHTTPStatusOK ¶
GetRespBodyHTTPStatusOK -Provide http respose body for Http StatusOK
func GetRespBodyHTTPStatusServiceErrorResponse ¶
GetRespBodyHTTPStatusServiceErrorResponse -Provide http respose body for server error
func GetRespBodyHTTPStatusServiceNotFound ¶
GetRespBodyHTTPStatusServiceNotFound -Provide http respose body for Http URL not Found
func IntegrationArtifactDownloadCommandMockResponse ¶
IntegrationArtifactDownloadCommandMockResponse -Provide http respose body
func IntegrationArtifactDownloadCommandMockResponsePositiveCaseRespBody ¶
IntegrationArtifactDownloadCommandMockResponsePositiveCaseRespBody -Provide http respose body for positive case
func IntegrationDesigntimeArtifactUpdateMockResponse ¶
IntegrationDesigntimeArtifactUpdateMockResponse -Provide http respose body
func NegtiveResForIntegrationArtifactGenericCommandMockResponse ¶
func NegtiveResForIntegrationArtifactGenericCommandMockResponse(message string) (*http.Response, error)
NegtiveResForIntegrationArtifactGenericCommandMockResponse -Nagative Case http response body
func TriggerIntegrationTestMockResponse ¶
TriggerIntegrationTestMockResponse
Types ¶
type CommonUtils ¶
CommonUtils for CPI
type HTTPUploadUtils ¶
type HTTPUploadUtils interface { HandleHTTPFileUploadResponse() error HandleHTTPGetRequestResponse() (string, error) }
HTTPUploadUtils for CPI
type HttpCPIUtils ¶
type HttpCPIUtils interface {
HandleHTTPFileDownloadResponse() error
}
HttpCPIUtils for CPI
type HttpFileDownloadRequestParameters ¶
type HttpFileDownloadRequestParameters struct {
ErrMessage, FileDownloadPath string
Response *http.Response
}
HttpParameters struct
func (HttpFileDownloadRequestParameters) HandleHTTPFileDownloadResponse ¶
func (httpFileDownloadRequestParameters HttpFileDownloadRequestParameters) HandleHTTPFileDownloadResponse() error
HandleHTTPFileDownloadResponse - Handle the file download response for http multipart response
type HttpFileUploadRequestParameters ¶
type HttpFileUploadRequestParameters struct {
ErrMessage, FilePath, HTTPMethod, HTTPURL, SuccessMessage string
Response *http.Response
HTTPErr error
}
HTTPFileUploadRequestParameters struct
func (HttpFileUploadRequestParameters) HandleHTTPFileUploadResponse ¶
func (httpFileUploadRequestParameters HttpFileUploadRequestParameters) HandleHTTPFileUploadResponse() error
HandleHTTPFileUploadResponse - Handle the file upload response
func (HttpFileUploadRequestParameters) HandleHTTPGetRequestResponse ¶
func (httpGetRequestParameters HttpFileUploadRequestParameters) HandleHTTPGetRequestResponse() (string, error)
HandleHTTPGetRequestResponse - Handle the GET Request response data
type OAuth ¶
type OAuth struct { Host string `json:"url"` OAuthTokenProviderURL string `json:"tokenurl"` ClientID string `json:"clientid"` ClientSecret string `json:"clientsecret"` }
OAuth is inside a CPI service key and contains more needed information
type ServiceKey ¶
type ServiceKey struct {
OAuth OAuth `json:"oauth"`
}
ServiceKey contains information about a CPI service key
func ReadCpiServiceKey ¶
func ReadCpiServiceKey(serviceKeyJSON string) (cpiServiceKey ServiceKey, err error)
ReadCpiServiceKey unmarshalls the give json service key string.
type TokenParameters ¶
TokenParameters struct
func (TokenParameters) GetBearerToken ¶
func (tokenParameters TokenParameters) GetBearerToken() (string, error)
GetBearerToken -Provides the bearer token for making CPI OData calls