server

package
v0.0.0-...-6db6f14 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

Run instantiates new server and runs it

Types

type Server

type Server struct {
	Router        *chi.Mux
	Session       *scs.SessionManager
	Configuration *configuration.Configuration
	Log           *zap.Logger
	Enforcer      *casbin.Enforcer
}

Server structure

func (*Server) AddMiddleware

func (s *Server) AddMiddleware()

AddMiddleware to server

func (*Server) AddRoutes

func (s *Server) AddRoutes()

AddRoutes to server

func (*Server) Authenticated

func (s *Server) Authenticated(next http.HandlerFunc) http.HandlerFunc

Authenticated routes

func (*Server) Authorized

func (s *Server) Authorized(next http.HandlerFunc) http.HandlerFunc

Authorized middleware

func (*Server) Home

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

Home route

Jump to

Keyboard shortcuts

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