http

package
v0.0.0-...-6e7fa2b Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: MIT Imports: 22 Imported by: 0

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.

Jump to

Keyboard shortcuts

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