Documentation
¶
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
}
func NewServer ¶
func NewServer(serverConfig *ServerConfig) *Server
type ServerConfig ¶
type ServerConfig struct {
CorsConfig *cors.Options
// MuxCallback registers endpoints and custom middlewares to the HTTP mux.
MuxCallback func(*http.ServeMux)
// MiddlewareCallback customizes the Negroni middleware stack before the server starts.
MiddlewareCallback func(*negroni.Negroni) *negroni.Negroni
// ListenCallback is called after the server starts listening, before serving requests.
ListenCallback func()
// PortOverride manually sets the port. If empty, uses the PORT environment variable.
PortOverride string
}
ServerConfig configures the API server's endpoints, middleware, and startup behavior.
Click to show internal directories.
Click to hide internal directories.