Documentation
¶
Index ¶
Constants ¶
View Source
const (
ErrMappingNotFound = "%s or %s mapping doesn't exist in request, skipping operation"
)
Variables ¶
This section is empty.
Functions ¶
func GetEffectiveMethod ¶
func GetEffectiveMethod(mapping interfaces.HTTPMapping) string
GetEffectiveMethod returns the effective HTTP method for a mapping. If the mapping has a method defined, it returns that. Otherwise, it derives the method from the action.
func GetMapping ¶
func GetMapping(requestParams interfaces.MappedHTTPRequestSpec, action string, logger logging.Logger) (interfaces.HTTPMapping, error)
GetMapping retrieves the mapping based on the provided request parameters, method, and action. It first attempts to find the mapping by the specified action. If found, it sets the method if it's not defined. If no action is specified or the mapping by action is not found, it falls back to finding the mapping by the default method.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.