refactor: rename internal/session package to internal/ctx

This commit is contained in:
Prad Nukala
2024-10-08 17:22:14 -04:00
parent 35348fef6a
commit 25cddbada6
11 changed files with 10 additions and 12 deletions
+18
View File
@@ -0,0 +1,18 @@
//go:build js && wasm
package channel
import (
"syscall/js"
"github.com/labstack/echo/v4"
)
type BroadcastContext struct {
echo.Context
Channel js.Value
}
func (c *BroadcastContext) BroadcastMessage(message string) {
c.Channel.Call("postMessage", message)
}