server

package
v0.0.0-...-d809d1c Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 24 Imported by: 0

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