Skip to content

Instantly share code, notes, and snippets.

@percybolmer
Created September 10, 2022 06:00
Show Gist options
  • Save percybolmer/e094e34256b23fa56f2db2ae6faab1f9 to your computer and use it in GitHub Desktop.
Save percybolmer/e094e34256b23fa56f2db2ae6faab1f9 to your computer and use it in GitHub Desktop.
package main
import "encoding/json"
// Event is the Messages sent over the websocket
// Used to differ between different actions
type Event struct {
// Type is the message type sent
Type string `json:"type"`
// Payload is the data Based on the Type
Payload json.RawMessage `json:"payload"`
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment