Documentation
¶
Overview ¶
Package server provides a Data API server handlers.
Index ¶
- type Server
- func (s *Server) Aggregate(rw http.ResponseWriter, r *http.Request)
- func (s *Server) AuthMiddleware(next http.Handler) http.Handler
- func (s *Server) ConnInfoMiddleware(next http.Handler) http.Handler
- func (s *Server) DeleteMany(rw http.ResponseWriter, r *http.Request)
- func (s *Server) DeleteOne(rw http.ResponseWriter, r *http.Request)
- func (s *Server) Find(rw http.ResponseWriter, r *http.Request)
- func (s *Server) FindOne(rw http.ResponseWriter, r *http.Request)
- func (s *Server) InsertMany(rw http.ResponseWriter, r *http.Request)
- func (s *Server) InsertOne(rw http.ResponseWriter, r *http.Request)
- func (s *Server) OpenAPISpec(rw http.ResponseWriter, r *http.Request)
- func (s *Server) UpdateMany(rw http.ResponseWriter, r *http.Request)
- func (s *Server) UpdateOne(rw http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements services described by OpenAPI description file.
func New ¶
func New(l *slog.Logger, handler *middleware.Middleware) *Server
New creates a new Server.
func (*Server) Aggregate ¶
func (s *Server) Aggregate(rw http.ResponseWriter, r *http.Request)
Aggregate implements [ServerInterface].
func (*Server) AuthMiddleware ¶
AuthMiddleware handles SCRAM authentication based on the username and password specified in request. After a successful handshake it calls the next handler.
func (*Server) ConnInfoMiddleware ¶ added in v2.3.0
ConnInfoMiddleware returns a handler function that creates a new *conninfo.ConnInfo, calls the next handler, and closes the connection info after the request is done.
func (*Server) DeleteMany ¶
func (s *Server) DeleteMany(rw http.ResponseWriter, r *http.Request)
DeleteMany implements [ServerInterface].
func (*Server) DeleteOne ¶
func (s *Server) DeleteOne(rw http.ResponseWriter, r *http.Request)
DeleteOne implements [ServerInterface].
func (*Server) Find ¶
func (s *Server) Find(rw http.ResponseWriter, r *http.Request)
Find implements [ServerInterface].
func (*Server) FindOne ¶
func (s *Server) FindOne(rw http.ResponseWriter, r *http.Request)
FindOne implements [ServerInterface].
func (*Server) InsertMany ¶
func (s *Server) InsertMany(rw http.ResponseWriter, r *http.Request)
InsertMany implements [ServerInterface].
func (*Server) InsertOne ¶
func (s *Server) InsertOne(rw http.ResponseWriter, r *http.Request)
InsertOne implements [ServerInterface].
func (*Server) OpenAPISpec ¶ added in v2.7.0
func (s *Server) OpenAPISpec(rw http.ResponseWriter, r *http.Request)
OpenAPISpec serves the OpenAPI specification.
func (*Server) UpdateMany ¶
func (s *Server) UpdateMany(rw http.ResponseWriter, r *http.Request)
UpdateMany implements [ServerInterface].