http

package
v0.0.0-...-0bfa455 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(config *Configuration, dep *ServerDependencies) http.Server

NewServer creates an http server

func RedocSpec

func RedocSpec() http.Handler

RedocSpec returns handler for API Redoc documentation

func Spec

Spec returns the swagger 2.0 spec

Types

type Configuration

type Configuration struct {
	Address      string
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
}

Configuration for running the server

func (*Configuration) Validate

func (c *Configuration) Validate() error

Validate the server configuration

type ServerDependencies

type ServerDependencies struct {
	Logger         log.Logger
	ImgService     imger.ImageService
	ProfileService imger.ProfileService
	Health         health.Health
}

ServerDependencies contains all dependencies

Jump to

Keyboard shortcuts

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