examples

package
v0.0.0-...-5c0f325 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExamplePost

type ExamplePost struct {
	Title       string `json:"title"`
	Description string `json:"description"`
	Code        uint64 `json:"code"`
}

type Handlers

type Handlers struct {
	// contains filtered or unexported fields
}

func NewHandlers

func NewHandlers(logger *log.Logger) *Handlers

func (*Handlers) Logger

func (h *Handlers) Logger(next http.HandlerFunc) http.HandlerFunc

func (*Handlers) MySocketIOServer

func (h *Handlers) MySocketIOServer(w http.ResponseWriter, r *http.Request) *socketio.Server

WIP: figure out how to transform endpoints for socket.io. It may only work if it has access to underlying server: https://stackoverflow.com/a/44572186

func (*Handlers) MyWebSocket

func (h *Handlers) MyWebSocket(w http.ResponseWriter, r *http.Request)

func (*Handlers) Post

func (h *Handlers) Post(w http.ResponseWriter, r *http.Request)

func (*Handlers) SetupRoutes

func (examples *Handlers) SetupRoutes(mux *http.ServeMux)

setup routes

func (*Handlers) SocketIoLogger

func (h *Handlers) SocketIoLogger(next func(w http.ResponseWriter, r *http.Request) *socketio.Server) http.HandlerFunc

type WSMessage

type WSMessage struct {
	Message string `json:"message"`
}

Sends back ws message with slight transformation ("from GO SERVER")

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL