server

package
v0.0.0-...-389ba5e Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2020 License: MIT Imports: 23 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 {
	Log     *zap.SugaredLogger
	Config  *config.Config
	Router  *mux.Router
	Spotify *motify.Spotify
	Store   store.Store
	Tmpl    tmpl.Templater
	Builder build.Builder
}

Server congregates all of the services required to listen and serve HTTP requests

func New

func New(log *zap.SugaredLogger, config *config.Config, db *sqlx.DB, router *mux.Router) (*Server, error)

New builds a new Server struct

func (*Server) Run

func (s *Server) Run()

Run makes the Server start listening and serving on the configured addr

func (*Server) SetupRoutes

func (s *Server) SetupRoutes()

SetupRoutes wires up the handlers to the appropriate routes

Jump to

Keyboard shortcuts

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