factories

package
v0.23.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2025 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EmptySuccessResponse

func EmptySuccessResponse(statusCode int) httpmock.Responder

EmptySuccessResponse creates a standard empty success response

func ErrorResponse

func ErrorResponse(statusCode int, errorCode, errorMessage string) httpmock.Responder

ErrorResponse creates a standard Graph API error response

func JSONBodyValidator

func JSONBodyValidator(expectedKeys []string) func(req *http.Request) error

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

func SuccessResponse(statusCode int, body interface{}) httpmock.Responder

SuccessResponse creates a standard success response with the given body

Types

This section is empty.

Jump to

Keyboard shortcuts

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