Documentation ¶
Index ¶
- Constants
- func Add(rt *env.Runtime, prefix, path string, methods, queries []string, ...) error
- func AddPrivate(rt *env.Runtime, path string, methods, queries []string, endPtFn RouteFunc) error
- func AddPublic(rt *env.Runtime, path string, methods, queries []string, endPtFn RouteFunc) error
- func BuildRoutes(rt *env.Runtime, prefix string) *mux.Router
- func RegisterEndpoints(rt *env.Runtime, s *store.Store)
- func Remove(rt *env.Runtime, prefix, path string, methods, queries []string) error
- type RouteFunc
Constants ¶
View Source
const ( // RoutePrefixPublic used for the unsecured api RoutePrefixPublic = "/api/public/" // RoutePrefixPrivate used for secured api (requiring api) RoutePrefixPrivate = "/api/" // RoutePrefixRoot used for unsecured endpoints at root (e.g. robots.txt) RoutePrefixRoot = "/" // RoutePrefixTesting used for isolated testing of routes with custom middleware RoutePrefixTesting = "/testing/" )
Variables ¶
This section is empty.
Functions ¶
func AddPrivate ¶ added in v1.59.0
AddPrivate endpoint
func BuildRoutes ¶
BuildRoutes returns all matching routes for specified scope.
func RegisterEndpoints ¶
RegisterEndpoints register routes for serving API endpoints
Types ¶
Click to show internal directories.
Click to hide internal directories.