Documentation ¶
Index ¶
- Constants
- func Add(rt *env.Runtime, prefix, path string, methods, queries []string, ...) error
- func BuildRoutes(rt *env.Runtime, prefix string) *mux.Router
- func RegisterEndpoints(rt *env.Runtime, s *domain.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 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.