Help us shape the future of Go! Take the 2026 Go Developer Survey

server

package
v2.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package server provides a Data API server handlers.

Index

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

func (s *Server) AuthMiddleware(next http.Handler) http.Handler

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

func (s *Server) ConnInfoMiddleware(next http.Handler) http.Handler

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].

func (*Server) UpdateOne

func (s *Server) UpdateOne(rw http.ResponseWriter, r *http.Request)

UpdateOne implements [ServerInterface].

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL