Help us shape the future of Go! Take the 2026 Go Developer Survey

executeapi

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 2 Imported by: 0

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