Documentation
¶
Index ¶
Constants ¶
View Source
const ( // XApplicationVersion is the header for the asked API version (e.g. vnd.github.v1) XApplicationVersion = "X-Application-Version" // XApplicationStableVersion is the header for the stable API version (e.g. vnd.github.v3) XApplicationStableVersion = "X-Application-Stable-Version" )
Variables ¶
This section is empty.
Functions ¶
func CRUD ¶
CRUD defines the folowwing resources:
POST: /path GET: /path GET: /path/:id PATCH: /path/:id DEL: /path/:id
func Versioning ¶
func Versioning(stable string, supported ...string) echo.MiddlewareFunc
Versioning rewrites routes to match the last part of the version header. e.g. `X-Application-Version: vnd.github.v3' header will prefix the request's path by `/v3'. The stable API version will be returned in the response's headers.
Types ¶
type CreateSupported ¶
CreateSupported interface
type DeleteSupported ¶
DeleteSupported interface
type ListSupported ¶
ListSupported interface
type ShowSupported ¶
ShowSupported interface
type UpdateSupported ¶
UpdateSupported interface
Click to show internal directories.
Click to hide internal directories.