Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrResponseFileDoesNotExist = errors.New("ErrResponseFileDoesNotExist")
Functions ¶
func ParseAssertRequest ¶
Types ¶
type EndpointConfigError ¶
type EndpointConfigError struct {
Code EndpointConfigErrorCode
EndpointIndex int
Metadata map[string]string
}
func ValidateEndpointConfigs ¶
func ValidateEndpointConfigs( endpointConfigs []types.EndpointConfig, readFile ReadFileFunc, configDirPath string, ) ([]EndpointConfigError, error)
type EndpointConfigErrorCode ¶
type EndpointConfigErrorCode int
const ( EndpointConfigErrorCode_Unknown EndpointConfigErrorCode = iota EndpointConfigErrorCode_EndpointDuplicate EndpointConfigErrorCode_FileUnreadable EndpointConfigErrorCode_InvalidMethod EndpointConfigErrorCode_RouteWithQuerystring )
type ExecFunc ¶ added in v0.2.0
type ExecFunc = func(command string, env map[string]string) (*ExecResult, error)
type ExecResult ¶ added in v0.2.0
type ExecResult struct {
Output []byte
}
type ReadFileFunc ¶
type Response ¶
type Response struct {
Body []byte
EndpointContentType types.Endpoint_content_type
StatusCode int
Headers map[string]string
}
func ResolveEndpointResponse ¶
func ResolveEndpointResponse( readFile ReadFileFunc, exec ExecFunc, request *http.Request, requestBody []byte, state *types.State, endpointConfig *types.EndpointConfig, envVars map[string]string, endpointParams map[string]string, requestRecords []types.RequestRecord, ) (*Response, error, map[string]string)
Click to show internal directories.
Click to hide internal directories.