cpi

package
v1.233.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2022 License: Apache-2.0 Imports: 14 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCPIFunctionMockResponse

func GetCPIFunctionMockResponse(functionName, testType string) (*http.Response, error)

GetCPIFunctionMockResponse -Generate mock response payload for different CPI functions

func GetCPIFunctionNameByURLCheck added in v1.126.0

func GetCPIFunctionNameByURLCheck(url, method, testType string) string

GetCPIFunctionNameByURLCheck - get postive response by test case type

func GetEmptyHTTPResponseBodyAndErrorNil added in v1.123.0

func GetEmptyHTTPResponseBodyAndErrorNil() (*http.Response, error)

GetEmptyHTTPResponseBodyAndErrorNil -Empty http respose body

func GetFunctionNameByTestTypeAndMethod added in v1.126.0

func GetFunctionNameByTestTypeAndMethod(method, testType string) string

GetFunctionNameByTestTypeAndMethod -get function name by test tyep

func GetFunctionNamePositiveAndCreateIntegrationDesigntimeArtifactResBody added in v1.130.0

func GetFunctionNamePositiveAndCreateIntegrationDesigntimeArtifactResBody(method string) string

GetFunctionNamePositiveAndCreateIntegrationDesigntimeArtifactResBody -Get Function Name

func GetFunctionNamePositiveAndUpdateIntegrationDesigntimeArtifactResBody added in v1.130.0

func GetFunctionNamePositiveAndUpdateIntegrationDesigntimeArtifactResBody(method string) string

GetFunctionNamePositiveAndUpdateIntegrationDesigntimeArtifactResBody -Get Function Name

func GetIntegrationArtifactDeployErrorDetailsMockResponse added in v1.130.0

func GetIntegrationArtifactDeployErrorDetailsMockResponse(testType string) (*http.Response, error)

GetIntegrationArtifactDeployErrorDetailsMockResponse -Provide http respose body

func GetIntegrationArtifactDeployErrorStatusMockResponseBody added in v1.130.0

func GetIntegrationArtifactDeployErrorStatusMockResponseBody() (*http.Response, error)

GetIntegrationArtifactDeployErrorStatusMockResponseBody -Provide http respose body

func GetIntegrationArtifactDeployStatusErrorMockResponseBody added in v1.130.0

func GetIntegrationArtifactDeployStatusErrorMockResponseBody() (*http.Response, error)

GetIntegrationArtifactDeployStatusErrorMockResponseBody -Provide http respose body

func GetIntegrationArtifactDeployStatusMockResponse added in v1.130.0

func GetIntegrationArtifactDeployStatusMockResponse(testType string) (*http.Response, error)

GetIntegrationArtifactDeployStatusMockResponse -Provide http respose body

func GetIntegrationArtifactDeployStatusMockResponseBody added in v1.130.0

func GetIntegrationArtifactDeployStatusMockResponseBody() (*http.Response, error)

GetIntegrationArtifactDeployStatusMockResponseBody -Provide http respose body

func GetIntegrationArtifactDeployStatusPayload added in v1.130.0

func GetIntegrationArtifactDeployStatusPayload(status string) string

GetIntegrationArtifactDeployStatusPayload -Get Payload

func GetIntegrationArtifactGetMplStatusCommandMockResponse added in v1.124.0

func GetIntegrationArtifactGetMplStatusCommandMockResponse(testType string) (*http.Response, error)

GetIntegrationArtifactGetMplStatusCommandMockResponse -Provide http respose body

func GetIntegrationArtifactGetServiceEndpointCommandMockResponse added in v1.124.0

func GetIntegrationArtifactGetServiceEndpointCommandMockResponse(testCaseType string) (*http.Response, error)

GetIntegrationArtifactGetServiceEndpointCommandMockResponse -Provide http respose body

func GetIntegrationArtifactGetServiceEndpointPositiveCaseRespBody added in v1.124.0

func GetIntegrationArtifactGetServiceEndpointPositiveCaseRespBody() (*http.Response, error)

GetIntegrationArtifactGetServiceEndpointPositiveCaseRespBody -Provide http respose body for positive case

func GetIntegrationDesigntimeArtifactMockResponse added in v1.126.0

func GetIntegrationDesigntimeArtifactMockResponse(testType string) (*http.Response, error)

GetIntegrationDesigntimeArtifactMockResponse -Provide http respose body

func GetMockResponseByTestTypeAndMockFunctionName added in v1.126.0

func GetMockResponseByTestTypeAndMockFunctionName(mockFuntionName, testType string) (*http.Response, error)

GetMockResponseByTestTypeAndMockFunctionName - Get mock response by testtype and mock function name

func GetNegativeCaseHTTPResponseBodyAndErrorNil added in v1.123.0

func GetNegativeCaseHTTPResponseBodyAndErrorNil() (*http.Response, error)

GetNegativeCaseHTTPResponseBodyAndErrorNil -Negative case http respose body

func GetParameterKeyMissingResponseBody added in v1.126.0

func GetParameterKeyMissingResponseBody() (*http.Response, error)

GetParameterKeyMissingResponseBody -Parameter key missing http respose body

func GetPositiveCaseResponseByTestType added in v1.125.0

func GetPositiveCaseResponseByTestType(testType string) (*http.Response, error)

GetPositiveCaseResponseByTestType - get postive response by test case type

func GetRespBodyHTTPStatusCreated added in v1.126.0

func GetRespBodyHTTPStatusCreated() (*http.Response, error)

GetRespBodyHTTPStatusCreated -Provide http respose body for Http StatusOK

func GetRespBodyHTTPStatusOK added in v1.126.0

func GetRespBodyHTTPStatusOK() (*http.Response, error)

GetRespBodyHTTPStatusOK -Provide http respose body for Http StatusOK

func GetRespBodyHTTPStatusServiceErrorResponse added in v1.126.0

func GetRespBodyHTTPStatusServiceErrorResponse() (*http.Response, error)

GetRespBodyHTTPStatusServiceErrorResponse -Provide http respose body for server error

func GetRespBodyHTTPStatusServiceNotFound added in v1.126.0

func GetRespBodyHTTPStatusServiceNotFound() (*http.Response, error)

GetRespBodyHTTPStatusServiceNotFound -Provide http respose body for Http URL not Found

func IntegrationArtifactDownloadCommandMockResponse added in v1.125.0

func IntegrationArtifactDownloadCommandMockResponse(testType string) (*http.Response, error)

IntegrationArtifactDownloadCommandMockResponse -Provide http respose body

func IntegrationArtifactDownloadCommandMockResponsePositiveCaseRespBody added in v1.125.0

func IntegrationArtifactDownloadCommandMockResponsePositiveCaseRespBody() (*http.Response, error)

IntegrationArtifactDownloadCommandMockResponsePositiveCaseRespBody -Provide http respose body for positive case

func IntegrationDesigntimeArtifactUpdateMockResponse added in v1.126.0

func IntegrationDesigntimeArtifactUpdateMockResponse(testType string) (*http.Response, error)

IntegrationDesigntimeArtifactUpdateMockResponse -Provide http respose body

func NegtiveResForIntegrationArtifactGenericCommandMockResponse added in v1.130.0

func NegtiveResForIntegrationArtifactGenericCommandMockResponse(message string) (*http.Response, error)

NegtiveResForIntegrationArtifactGenericCommandMockResponse -Nagative Case http response body

func TriggerIntegrationTestMockResponse added in v1.150.0

func TriggerIntegrationTestMockResponse(testCaseType string) (*http.Response, error)

TriggerIntegrationTestMockResponse

func UpdateIntegrationDesigntimeArtifactMockResponse added in v1.126.0

func UpdateIntegrationDesigntimeArtifactMockResponse(testType string) (*http.Response, error)

UpdateIntegrationDesigntimeArtifactMockResponse -Provide http respose body

Types

type CommonUtils

type CommonUtils interface {
	GetBearerToken() (string, error)
}

CommonUtils for CPI

type HTTPUploadUtils added in v1.188.0

type HTTPUploadUtils interface {
	HandleHTTPFileUploadResponse() error
	HandleHTTPGetRequestResponse() (string, error)
}

HTTPUploadUtils for CPI

type HttpCPIUtils added in v1.177.0

type HttpCPIUtils interface {
	HandleHTTPFileDownloadResponse() error
}

HttpCPIUtils for CPI

type HttpFileDownloadRequestParameters added in v1.177.0

type HttpFileDownloadRequestParameters struct {
	ErrMessage, FileDownloadPath string
	Response                     *http.Response
}

HttpParameters struct

func (HttpFileDownloadRequestParameters) HandleHTTPFileDownloadResponse added in v1.177.0

func (httpFileDownloadRequestParameters HttpFileDownloadRequestParameters) HandleHTTPFileDownloadResponse() error

HandleHTTPFileDownloadResponse - Handle the file download response for http multipart response

type HttpFileUploadRequestParameters added in v1.188.0

type HttpFileUploadRequestParameters struct {
	ErrMessage, FilePath, HTTPMethod, HTTPURL, SuccessMessage string
	Response                                                  *http.Response
	HTTPErr                                                   error
}

HTTPFileUploadRequestParameters struct

func (HttpFileUploadRequestParameters) HandleHTTPFileUploadResponse added in v1.188.0

func (httpFileUploadRequestParameters HttpFileUploadRequestParameters) HandleHTTPFileUploadResponse() error

HandleHTTPFileUploadResponse - Handle the file upload response

func (HttpFileUploadRequestParameters) HandleHTTPGetRequestResponse added in v1.227.0

func (httpGetRequestParameters HttpFileUploadRequestParameters) HandleHTTPGetRequestResponse() (string, error)

HandleHTTPGetRequestResponse - Handle the GET Request response data

type OAuth added in v1.149.0

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 added in v1.149.0

type ServiceKey struct {
	OAuth OAuth `json:"oauth"`
}

ServiceKey contains information about a CPI service key

func ReadCpiServiceKey added in v1.149.0

func ReadCpiServiceKey(serviceKeyJSON string) (cpiServiceKey ServiceKey, err error)

ReadCpiServiceKey unmarshalls the give json service key string.

type TokenParameters

type TokenParameters struct {
	TokenURL, Username, Password string
	Client                       piperhttp.Sender
}

TokenParameters struct

func (TokenParameters) GetBearerToken

func (tokenParameters TokenParameters) GetBearerToken() (string, error)

GetBearerToken -Provides the bearer token for making CPI OData calls

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL