Documentation ¶
Index ¶
- Variables
- func CheckCSRF(apiOp *types.APIRequest) error
- func ValidateAction(request *types.APIRequest) (*types.Action, error)
- type Defaults
- type RequestHandler
- type ResponseWriter
- type Server
- func (s *Server) AddSchemas(schemas *types.Schemas) error
- func (s *Server) CustomAPIUIResponseWriter(cssURL, jsURL, version writer.StringGetter)
- func (s *Server) GetSchemas() *types.Schemas
- func (s *Server) Handle(apiOp *types.APIRequest)
- func (s *Server) ServeHTTP(rw http.ResponseWriter, req *http.Request)
- type Verb
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CheckCSRF ¶
func CheckCSRF(apiOp *types.APIRequest) error
func ValidateAction ¶
func ValidateAction(request *types.APIRequest) (*types.Action, error)
Types ¶
type Defaults ¶
type Defaults struct { ListHandler types.RequestHandler CreateHandler types.RequestHandler DeleteHandler types.RequestHandler UpdateHandler types.RequestHandler Store types.Store ErrorHandler types.ErrorHandler }
type RequestHandler ¶
type ResponseWriter ¶
type ResponseWriter interface {
Write(apiOp *types.APIRequest, code int, obj interface{})
}
type Server ¶
type Server struct { ResponseWriters map[string]ResponseWriter Schemas *types.Schemas QueryFilter types.QueryFilter Defaults Defaults DefaultNamespace string AccessControl types.AccessControl Parser parse.Parser URLParser parse.URLParser }
func DefaultAPIServer ¶
func DefaultAPIServer() *Server
func (*Server) CustomAPIUIResponseWriter ¶
func (s *Server) CustomAPIUIResponseWriter(cssURL, jsURL, version writer.StringGetter)
func (*Server) GetSchemas ¶
func (*Server) Handle ¶
func (s *Server) Handle(apiOp *types.APIRequest)
Click to show internal directories.
Click to hide internal directories.