Documentation ¶
Index ¶
- Constants
- type Config
- type Webserver
- func (s *Webserver) ConfigureRoutes(isDev bool)
- func (s *Webserver) Login(user *models.User, w http.ResponseWriter, r *http.Request) http.HandlerFunc
- func (s *Webserver) Logout(user *models.User, w http.ResponseWriter, r *http.Request) http.HandlerFunc
- func (s *Webserver) RefreshToken(user *models.User, w http.ResponseWriter, r *http.Request) http.HandlerFunc
- func (s *Webserver) Run(serviceWG *sync.WaitGroup)
- func (s *Webserver) Start(serviceWG *sync.WaitGroup) error
- func (s *Webserver) Stop() error
Constants ¶
View Source
const (
DefaultHttpListenAddr = "127.0.0.1:8080"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Webserver ¶
type Webserver struct { *Config *service.Service *http.Server *router.Router *websocket.Hub *database.Database service.IServiceManager }
func (*Webserver) ConfigureRoutes ¶ added in v0.3.0
func (*Webserver) Login ¶ added in v0.3.0
func (s *Webserver) Login(user *models.User, w http.ResponseWriter, r *http.Request) http.HandlerFunc
func (*Webserver) Logout ¶ added in v0.3.0
func (s *Webserver) Logout(user *models.User, w http.ResponseWriter, r *http.Request) http.HandlerFunc
func (*Webserver) RefreshToken ¶ added in v0.3.0
func (s *Webserver) RefreshToken(user *models.User, w http.ResponseWriter, r *http.Request) http.HandlerFunc
func (*Webserver) Run ¶ added in v0.3.0
Run is the main thread of the process, called as a goroutine.
Click to show internal directories.
Click to hide internal directories.