Documentation
¶
Index ¶
- func EmptySuccessResponse(statusCode int) httpmock.Responder
- func ErrorResponse(statusCode int, errorCode, errorMessage string) httpmock.Responder
- func JSONBodyValidator(expectedKeys []string) func(req *http.Request) error
- func RequestValidatorResponder(validator func(req *http.Request) error, successResponder httpmock.Responder) httpmock.Responder
- func SuccessResponse(statusCode int, body interface{}) httpmock.Responder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EmptySuccessResponse ¶
EmptySuccessResponse creates a standard empty success response
func ErrorResponse ¶
ErrorResponse creates a standard Graph API error response
func JSONBodyValidator ¶
JSONBodyValidator validates that the request body is valid JSON and matches the expected structure
func RequestValidatorResponder ¶
func RequestValidatorResponder(validator func(req *http.Request) error, successResponder httpmock.Responder) httpmock.Responder
RequestValidatorResponder creates a responder that validates the request before returning a response
func SuccessResponse ¶
SuccessResponse creates a standard success response with the given body
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.