web

package
v0.0.0-...-8be9ec9 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2024 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTemplateWithBase

func CreateTemplateWithBase(templateName string) (*template.Template, error)

func GameHandlerHtml

func GameHandlerHtml(w http.ResponseWriter, r *http.Request, game games.Game)

func RenderTemplateToString

func RenderTemplateToString(templateName string, data interface{}) (string, error)

func RenderTemplateWithBase

func RenderTemplateWithBase(w io.Writer, templateName string, data interface{}) error

Types

type FediGamesServer

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

func NewFediGamesServer

func NewFediGamesServer(engine *internal.GameEngine, gamesList []games.Game) FediGamesServer

func (*FediGamesServer) AvatarHandler

func (server *FediGamesServer) AvatarHandler(w http.ResponseWriter, r *http.Request)

func (*FediGamesServer) FollowersHandler

func (server *FediGamesServer) FollowersHandler(w http.ResponseWriter, r *http.Request)

func (*FediGamesServer) FollowingHandler

func (server *FediGamesServer) FollowingHandler(w http.ResponseWriter, r *http.Request)

func (*FediGamesServer) GameHandler

func (server *FediGamesServer) GameHandler(w http.ResponseWriter, r *http.Request)

func (*FediGamesServer) InboxHandler

func (server *FediGamesServer) InboxHandler(w http.ResponseWriter, r *http.Request)

ServeHTTP implements http.Handler.

func (*FediGamesServer) IndexHandler

func (server *FediGamesServer) IndexHandler(w http.ResponseWriter, r *http.Request)

func (*FediGamesServer) MediaServer

func (server *FediGamesServer) MediaServer() http.Handler

func (*FediGamesServer) OutboxHandler

func (server *FediGamesServer) OutboxHandler(w http.ResponseWriter, r *http.Request)

func (*FediGamesServer) Start

func (server *FediGamesServer) Start() error

func (*FediGamesServer) StaticServer

func (server *FediGamesServer) StaticServer() http.Handler

func (*FediGamesServer) WebfingerHandler

func (server *FediGamesServer) WebfingerHandler(w http.ResponseWriter, r *http.Request)

type TemplateData

type TemplateData struct {
	Data interface{}
}
type WebfingerLink struct {
	Rel  string `json:"rel"`
	Type string `json:"type"`
	Href string `json:"href"`
}

type WebfingerResponse

type WebfingerResponse struct {
	Subject string          `json:"subject"`
	Aliases []string        `json:"aliases"`
	Links   []WebfingerLink `json:"links"`
}

Jump to

Keyboard shortcuts

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