rendering

package
v0.0.0-...-7b9b069 Latest Latest
Warning

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

Go to latest
Published: May 16, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package rendering is responsible for rendering game boards by ID in their current state

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoardRenderHandler

type BoardRenderHandler struct {
	LinkRenderer RenderLink
}

BoardRenderHandler handles all image requests from Slack

func (BoardRenderHandler) ServeHTTP

func (b BoardRenderHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP is a request handler

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

RenderLink is a simple struct for creating valid external board URLs

func NewRenderLink(hostname string, signingKey string) RenderLink

NewRenderLink creates a new RenderLink struct instance

func (r RenderLink) CreateLink(gm *game.Game) (*url.URL, error)

CreateLink returns an externally accessible board URL at the current game state

func (r RenderLink) ValidateLink(url url.URL) bool

ValidateLink ensures that the link signatuer is signed properly with the app signing key

Jump to

Keyboard shortcuts

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