server

package
v0.0.0-...-95d0b56 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2021 License: ISC Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServerOperation

type ServerOperation struct {
	// contains filtered or unexported fields
}

func New

func New(storageAddr string, hmacSecret string, sessionUuid string) (*ServerOperation, error)

func (*ServerOperation) RunMainRuntimeLoop

func (s *ServerOperation) RunMainRuntimeLoop()

Function will consume the main runtime loop and run the business logic of the application.

func (*ServerOperation) StopMainRuntimeLoop

func (s *ServerOperation) StopMainRuntimeLoop()

Function will tell the application to stop the main runtime loop when the process has been finished.

type ServerOperationImpl

type ServerOperationImpl struct {
	// contains filtered or unexported fields
}

func (*ServerOperationImpl) AuthorizationMiddleware

func (h *ServerOperationImpl) AuthorizationMiddleware(fn http.HandlerFunc) http.HandlerFunc

func (*ServerOperationImpl) BearerProcessorMiddleware

func (h *ServerOperationImpl) BearerProcessorMiddleware(fn http.HandlerFunc) http.HandlerFunc

func (*ServerOperationImpl) ChainMiddleware

func (h *ServerOperationImpl) ChainMiddleware(fn http.HandlerFunc) http.HandlerFunc

func (*ServerOperationImpl) HandleRequests

func (c *ServerOperationImpl) HandleRequests(w http.ResponseWriter, r *http.Request)

func (*ServerOperationImpl) IPAddressMiddleware

func (h *ServerOperationImpl) IPAddressMiddleware(fn http.HandlerFunc) http.HandlerFunc

func (*ServerOperationImpl) ProtectedURLsMiddleware

func (h *ServerOperationImpl) ProtectedURLsMiddleware(fn http.HandlerFunc) http.HandlerFunc

The purpose of this middleware is to return a `401 unauthorized` error if the user is not authorized and visiting a protected URL.

func (*ServerOperationImpl) URLProcessorMiddleware

func (h *ServerOperationImpl) URLProcessorMiddleware(fn http.HandlerFunc) http.HandlerFunc

Middleware will split the full URL path into slash-sperated parts and save to the context to flow downstream in the app for this particular request.

Jump to

Keyboard shortcuts

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