Documentation
¶
Overview ¶
Package server implements the HTTP server for the Moolah API. It defines the Server struct, which holds references to all services and the HTTP handler. The server is responsible for starting and shutting down the HTTP server, as well as defining the routes in a separate file (routes.go).
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 is the main HTTP server for the API. It holds references to all services and the HTTP handler.
func New ¶
func New( port string, authSvc domain.AuthService, tenantSvc domain.TenantService, accountSvc domain.AccountService, categorySvc domain.CategoryService, transactionSvc domain.TransactionService, adminSvc domain.AdminService, idempotencyStore domain.IdempotencyStore, rateLimiterStore *middleware.RateLimiterStore, tokenParser middleware.TokenParser, ) *Server
NewServer is a factory function that creates and configures a new Server instance.
func (*Server) ListenAndServe ¶
ListenAndServe starts the HTTP server with the configured address and handler. It also sets the read and write timeouts.
Click to show internal directories.
Click to hide internal directories.