server

package
v0.0.0-...-741e748 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileServer

func FileServer(r chi.Router, path string, root http.FileSystem)

FileServer conveniently sets up a http.FileServer handler to serve static files from a http.FileSystem.

Types

type Server

type Server struct {
	Router *chi.Mux
	Store  *db.Store
	Cache  *cache.PostCache
}

func NewServer

func NewServer(config utils.Config) *Server

func (*Server) PrepareDB

func (s *Server) PrepareDB(config utils.Config) (err error)

func (*Server) PrepareRedis

func (s *Server) PrepareRedis(config utils.Config)

func (*Server) PrepareRouter

func (s *Server) PrepareRouter()

func (*Server) RunServer

func (s *Server) RunServer(host string, port int) (err error)

Jump to

Keyboard shortcuts

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