Documentation ¶
Index ¶
- func CreateServer() (*http.Server, error)
- func GetHealthCheck(w http.ResponseWriter, r *http.Request)
- func RespondWithError(w http.ResponseWriter, statusCode int, msg string)
- func RespondWithJson(w http.ResponseWriter, statusCode int, payload interface{})
- type AuthHandler
- type Config
- func (c *Config) ConnectToRoom(w http.ResponseWriter, r *http.Request, user database.User)
- func (c *Config) CreateRoom(w http.ResponseWriter, r *http.Request, user database.User)
- func (c *Config) CreateUser(w http.ResponseWriter, r *http.Request)
- func (c Config) EnsureAuth(handler AuthHandler) http.HandlerFunc
- func (c *Config) GetAllRooms(w http.ResponseWriter, r *http.Request, _ database.User)
- func (c *Config) GetUser(w http.ResponseWriter, r *http.Request, user database.User)
- func (c *Config) Login(w http.ResponseWriter, r *http.Request)
- func (c *Config) NewRouter() *http.ServeMux
- type Env
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateServer ¶
func GetHealthCheck ¶
func GetHealthCheck(w http.ResponseWriter, r *http.Request)
func RespondWithError ¶
func RespondWithError(w http.ResponseWriter, statusCode int, msg string)
func RespondWithJson ¶
func RespondWithJson(w http.ResponseWriter, statusCode int, payload interface{})
Types ¶
type AuthHandler ¶
type Config ¶
func CreateConfig ¶
func (*Config) ConnectToRoom ¶
func (*Config) CreateRoom ¶
func (*Config) CreateUser ¶
func (c *Config) CreateUser(w http.ResponseWriter, r *http.Request)
func (Config) EnsureAuth ¶
func (c Config) EnsureAuth(handler AuthHandler) http.HandlerFunc
func (*Config) GetAllRooms ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.