Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRouter ¶
func NewRouter(logger *httplog.Logger, songUseCase songUseCase, opts *RouterOptions) *chi.Mux
NewRouter initializes a new HTTP router for the application. It sets up middleware for logging, CORS, and error handling, as well as route definitions.
@title Online Song Library API @description This is a simple API for managing songs. @contact.name Vadim Barashkov @contatc.email vadimdominik2005@gmail.com @license.name MIT @license.url https://opensource.org/license/mit @version 1.0 @schemes http https
Types ¶
type RouterOptions ¶
type RouterOptions struct { SwaggerHost string // SwaggerHost is the hostname for serving Swagger documentation. SwaggerPort int // SwaggerPort is the port number for serving Swagger documentation. }
RouterOptions holds configuration options for the HTTP router.
Click to show internal directories.
Click to hide internal directories.