server

package
v1.0.26 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RecoveryMiddlware

func RecoveryMiddlware(c *gin.Context, recovered interface{})

* This middleware prints a panic in JSON to the log and redirects * the user to an error page with a get parameter containing the error message

func SetupRouter

func SetupRouter() *gin.Engine

SetupRouter function will perform all route operations

Types

type Server

type Server struct {
	Config    config.Config
	HTTP      *http.Server
	Scheduler *services.SchedulerService
	Datastore *services.MongoDatastore
}

func NewServer

func NewServer(config config.Config) *Server

NewServer returns an initialized Server

func (*Server) AuthV1GoogleCallbackGet

func (s *Server) AuthV1GoogleCallbackGet(c *gin.Context)

func (*Server) AuthV1GoogleGet

func (s *Server) AuthV1GoogleGet(c *gin.Context)

func (*Server) AuthV1OpenIDCallbackGet

func (s *Server) AuthV1OpenIDCallbackGet(c *gin.Context)

func (*Server) AuthV1OpenIDGet

func (s *Server) AuthV1OpenIDGet(c *gin.Context)

func (*Server) AuthV1RegisterPost

func (s *Server) AuthV1RegisterPost(c *gin.Context)

func (*Server) AuthV1RegisterVerifyGet

func (s *Server) AuthV1RegisterVerifyGet(c *gin.Context)

func (*Server) EventsV1Get

func (s *Server) EventsV1Get(c *gin.Context)

func (*Server) EventsV1PastGet

func (s *Server) EventsV1PastGet(c *gin.Context)

func (*Server) EventsV1PastSocIDGet

func (s *Server) EventsV1PastSocIDGet(c *gin.Context)

func (*Server) EventsV1UpcomingGet

func (s *Server) EventsV1UpcomingGet(c *gin.Context)

func (*Server) EventsV1UpcomingSocIDGet

func (s *Server) EventsV1UpcomingSocIDGet(c *gin.Context)

func (*Server) LoggingMiddleware

func (s *Server) LoggingMiddleware() gin.HandlerFunc

* This middleware logs primarily the request path, method, response status and completion latency

func (*Server) MiscMiddleware

func (s *Server) MiscMiddleware() gin.HandlerFunc

* Does any random things to the context we want done before reaching the endpoint func

func (*Server) MiscV1BrewGet

func (s *Server) MiscV1BrewGet(c *gin.Context)

func (*Server) MiscV1PingGet

func (s *Server) MiscV1PingGet(c *gin.Context)

func (*Server) RootGet

func (s *Server) RootGet(c *gin.Context)

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

Start begins listening

func (*Server) Stop

func (s *Server) Stop(ctx context.Context) error

Stop shuts down the server and listener

Jump to

Keyboard shortcuts

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