Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthWithKey ¶
AuthWithKey is an auth function that If the key is an empty string it will panic This returns a function that can be used as Options.Auth
Types ¶
type Options ¶
type Options struct { // Auth validates the request, if this is not defined it will broadcast every message // The function it's argument is the message that websocket reciefed // The return values are the message that gets send to all other client // And a bool that tells if the Auth was correct Auth func(msg []byte) ([]byte, bool) // if SendKeepAlive is true the server will send a keep alive message every 30 seconds // the message is "🤖️" SendKeepAlive bool // if ExtendURL is spesified the middleware will extends another middleware ExtendURL string ExtendWSURL string }
Options are some settings to include in the Setup function
Click to show internal directories.
Click to hide internal directories.