server

package
v0.0.0-...-e85e7bf Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SPA

func SPA()

SPA is the main function for running the HTTP server

func Serve

func Serve()

Types

type Client

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

Client is a middleman between the websocket connection and the hub.

type FeedWSIFPayload

type FeedWSIFPayload struct {
	Channel string `json:"channel"`
	Message []Meme `json:"message"`
}

FeedWSIFPayload thing

type FeedWSPayload

type FeedWSPayload struct {
	Channel string `json:"channel"`
	Message []int  `json:"message"`
}

FeedWSPayload is a thing

type Hub

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

Hub maintains the set of active clients and broadcasts messages to the clients.

type ImgFlipData

type ImgFlipData struct {
	Memes []Meme `json:"memes"`
}

ImgFlipData data

type ImgFlipPayl

type ImgFlipPayl struct {
	Data ImgFlipData `json:"data"`
}

ImgFlipPayl payload

type Meme

type Meme struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	URL      string `json:"url"`
	Width    int    `json:"width"`
	Height   int    `json:"height"`
	BoxCount int    `json:"box_count"`
}

Meme imgflip meme

Jump to

Keyboard shortcuts

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