server

package
v0.0.0-...-a554ddd Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

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 contains all dependencies for the API Server

func New

func New(logger log.Logger, router *mux.Router, anime *anime.Service) *Server

New provides a new Instance of a Server

func (*Server) HomeHandler

func (s *Server) HomeHandler(w http.ResponseWriter, r *http.Request)

HomeHandler for the API

func (*Server) InitRoutes

func (s *Server) InitRoutes(dataDir string)

InitRoutes sets all endpoints and handlers

func (*Server) Run

func (s *Server) Run(port int)

Run starts the WebServer and listens until panic or SIGKILL

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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