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 ¶
func CRUD(group *echo.Group, path string, resource interface{})
CRUD defines the folowwing resources:
POST: /path GET: /path GET: /path/:id PATCH: /path/:id DEL: /path/:id
func Versioning ¶
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 ¶
type CreateSupported interface {
Create(echo.Context) error
}
CreateSupported interface
type DeleteSupported ¶
type DeleteSupported interface {
Delete(echo.Context) error
}
DeleteSupported interface
type ListSupported ¶
type ListSupported interface {
List(echo.Context) error
}
ListSupported interface
type ShowSupported ¶
type ShowSupported interface {
Show(echo.Context) error
}
ShowSupported interface
type UpdateSupported ¶
type UpdateSupported interface {
Update(echo.Context) error
}
UpdateSupported interface
Click to show internal directories.
Click to hide internal directories.