executeapi

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package executeapi parses API Gateway invoke URLs that carry the API id in the host or an internal path prefix.

Index

Constants

View Source
const NoBasePath = "(none)"

NoBasePath is the wire value AWS uses for a mapping at the domain root.

Variables

This section is empty.

Functions

func HostName

func HostName(r *http.Request) string

HostName returns the lower-cased request host without its port.

func MatchBasePath

func MatchBasePath(keys []string, path string) (string, string, bool)

MatchBasePath picks the longest key that is a whole-segment prefix of path and returns it with the remaining path (always starting with "/"). The empty key and "(none)" match any path as the lowest-precedence fallback.

func Parse

func Parse(r *http.Request) (string, string, bool)

Parse extracts the API id and the remaining "/{stage}/{path}" from an invoke request, which is either {apiId}.execute-api.<host>[:port]/{stage}/{path} or /_aws/execute-api/{apiId}/{stage}/{path}.

Types

This section is empty.

Jump to

Keyboard shortcuts

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