server

package
v0.0.0-...-9da79aa Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2025 License: MIT Imports: 24 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAlreadySubscribed = errors.New("already subscribed")
)

Functions

This section is empty.

Types

type Server

type Server struct {
	Config         *utility.Config
	BackgroundTask *common.BackgroundTask
	Facade         *facade.Facade

	SubsMu      sync.Mutex
	Subscribers map[string]*domain.User
	// contains filtered or unexported fields
}

func NewServer

func NewServer(cfg *utility.Config, bt *common.BackgroundTask, facade *facade.Facade) *Server

func (*Server) ActivateUserHandler

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

func (*Server) GenerateAuthTokenHandler

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

func (*Server) GenerateOTPHandler

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

func (*Server) GetByUniqueFieldHandler

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

func (*Server) GetConversationsHandler

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

func (*Server) GetCurrentActiveUserHandler

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

func (*Server) RegisterUserHandler

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

func (*Server) SearchUserHandler

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

func (*Server) Serve

func (s *Server) Serve() error

func (*Server) ShutdownCleanup

func (s *Server) ShutdownCleanup()

func (*Server) UpdateUserHandler

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

func (*Server) WebsocketSubscribeHandler

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

func (*Server) WebsocketSubscribeHandlerDeferFunc

func (s *Server) WebsocketSubscribeHandlerDeferFunc(reqCtx context.Context, conn *websocket.Conn)

WebsocketSubscribeHandlerDeferFunc sets the user's LastOnline to time.Now

Jump to

Keyboard shortcuts

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