Documentation ¶
Index ¶
- func ErrorAndAbort(w http.ResponseWriter, r *http.Request, status int, key string, errs ...error)
- func ErrorAndDisconnect(ctx context.Context, conn *websocket.Conn, err error)
- func GenerateLobbyCode(ctx context.Context) string
- func GeneratePeerID(ctx context.Context) string
- func GenerateSecret(ctx context.Context) string
- func GenerateShortLobbyCode(ctx context.Context) string
- func Getenv(key, def string) string
- func IsPipeError(err error) bool
- func IsUUID(in string) bool
- func Now(ctx context.Context) time.Time
- func RenderJSON(w http.ResponseWriter, r *http.Request, status int, val interface{})
- func ReplyError(ctx context.Context, conn *websocket.Conn, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorAndAbort ¶
func ErrorAndDisconnect ¶
func GenerateLobbyCode ¶
func GeneratePeerID ¶
func GenerateSecret ¶
func GenerateShortLobbyCode ¶
func IsPipeError ¶
func RenderJSON ¶
func RenderJSON(w http.ResponseWriter, r *http.Request, status int, val interface{})
RenderJSON will write a json response to the given ResponseWriter.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.