httpapi

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2019 License: MIT Imports: 16 Imported by: 2

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     imgart.ImageService
	ProfileService imgart.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