Documentation ¶
Index ¶
- Constants
- func GetMockDataApprovedPRForCommitResponsesMessage() io.ReadCloser
- func GetMockDataClosedPRForCommitResponsesMessage() io.ReadCloser
- func GetMockDataCommitsResponseMessage() io.ReadCloser
- func GetMockDataCommitsResponseStatusCode() int
- func GetMockDataNoPRForCommitResponsesMessage() io.ReadCloser
- func GetMockDataPRsResponseMessage() io.ReadCloser
- func GetMockDataPRsResponseStatusCode() int
- func GetMockDataSingleCommitResponseMessage() io.ReadCloser
- func GetMockDataSingleCommitResponseStatusCode() int
- func GetMockDataSinglePRResponseMessage() io.ReadCloser
- func GetMockDataSinglePRResponseStatusCode() int
- func GetMockDataSingleSliceCommitResponsesMessage() io.ReadCloser
- func GetMockDataSingleSliceNonMergeCommitResponsesMessage() io.ReadCloser
- func GetMockDataUnauthorisedResponseMessage() io.ReadCloser
- func GetMockDataUnauthorisedResponseStatusCode() int
- func GetMockedContext(request *http.Request, response *httptest.ResponseRecorder) (*gin.Context, *gin.Engine)
- func GetMockedContextWithParams(request *http.Request, response *httptest.ResponseRecorder, ...) (*gin.Context, *gin.Engine)
Constants ¶
const ( ErrorMessageAuthentication = "Requires authentication" ErrorMessageRepo = "invalid repo parameter" ErrorMessageOwner = "invalid owner parameter" ErrorMessageScope = "invalid scope parameter" ErrorMessagePull = "invalid pull parameter" ErrorMessageInvalidSHA = "invalid SHA parameter" )
represents the error messages returned when validating parameters provided to service functions
Variables ¶
This section is empty.
Functions ¶
func GetMockDataApprovedPRForCommitResponsesMessage ¶
func GetMockDataApprovedPRForCommitResponsesMessage() io.ReadCloser
GetMockDataApprovedPRForCommitResponsesMessage returns a matching approved PR for the commit sha AABCDEF123456
func GetMockDataClosedPRForCommitResponsesMessage ¶
func GetMockDataClosedPRForCommitResponsesMessage() io.ReadCloser
GetMockDataClosedPRForCommitResponsesMessage returns a matching closed but not merged PR for the commit sha AABCDEF123456
func GetMockDataCommitsResponseMessage ¶
func GetMockDataCommitsResponseMessage() io.ReadCloser
GetMockDataCommitsResponseMessage represents mock data to be used for multiple Commits returned from a function call
func GetMockDataCommitsResponseStatusCode ¶
func GetMockDataCommitsResponseStatusCode() int
GetMockDataCommitsResponseStatusCode represents mock data to be used for a successful status code
func GetMockDataNoPRForCommitResponsesMessage ¶
func GetMockDataNoPRForCommitResponsesMessage() io.ReadCloser
GetMockDataNoPRForCommitResponsesMessage returns no matching PRs
func GetMockDataPRsResponseMessage ¶
func GetMockDataPRsResponseMessage() io.ReadCloser
GetMockDataPRsResponseMessage represents mock data to be used for multiple PRs
func GetMockDataPRsResponseStatusCode ¶
func GetMockDataPRsResponseStatusCode() int
GetMockDataPRsResponseStatusCode represents mock data to be used for a successful status code
func GetMockDataSingleCommitResponseMessage ¶
func GetMockDataSingleCommitResponseMessage() io.ReadCloser
GetMockDataSingleCommitResponseMessage represents mock data to be used for a SingleCommitResponse
func GetMockDataSingleCommitResponseStatusCode ¶
func GetMockDataSingleCommitResponseStatusCode() int
GetMockDataSingleCommitResponseStatusCode represents mock data to be used for a status code of a message returning a SingleCommitResponse struct
func GetMockDataSinglePRResponseMessage ¶
func GetMockDataSinglePRResponseMessage() io.ReadCloser
GetMockDataSinglePRResponseMessage represents mock data to be used fo a single PR returned from a function
func GetMockDataSinglePRResponseStatusCode ¶
func GetMockDataSinglePRResponseStatusCode() int
GetMockDataSinglePRResponseStatusCode represents mock data to be used for a successful status code
func GetMockDataSingleSliceCommitResponsesMessage ¶
func GetMockDataSingleSliceCommitResponsesMessage() io.ReadCloser
GetMockDataSingleSliceCommitResponsesMessage returns a single commit that is a merge commit
func GetMockDataSingleSliceNonMergeCommitResponsesMessage ¶
func GetMockDataSingleSliceNonMergeCommitResponsesMessage() io.ReadCloser
GetMockDataSingleSliceNonMergeCommitResponsesMessage returns a commit that is not a merge commit
func GetMockDataUnauthorisedResponseMessage ¶
func GetMockDataUnauthorisedResponseMessage() io.ReadCloser
GetMockDataUnauthorisedResponseMessage represents mock data for a github call that requires authentication
func GetMockDataUnauthorisedResponseStatusCode ¶
func GetMockDataUnauthorisedResponseStatusCode() int
GetMockDataUnauthorisedResponseStatusCode represents a mocked status code for unauthorised access
func GetMockedContext ¶
func GetMockedContext(request *http.Request, response *httptest.ResponseRecorder) (*gin.Context, *gin.Engine)
GetMockedContext returns a test context to be used in tests
func GetMockedContextWithParams ¶
func GetMockedContextWithParams(request *http.Request, response *httptest.ResponseRecorder, params map[string]string) (*gin.Context, *gin.Engine)
GetMockedContextWithParams returns a test context to be used in tests with Params set to the key/value pairs in the provided map
Types ¶
This section is empty.