web

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2024 License: Zlib Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Modules = map[string]func(){
	"sessions":   SessionsExample,
	"forms":      FormsExample,
	"middleware": MiddlewareExample,
	"template":   TemplateExample,
	"filesystem": FilesystemExample,
}

Functions

func FilesystemExample

func FilesystemExample()

func FormsExample

func FormsExample()

func Method

func Method(m string) http.HandlerFunc

Advanced middleware example

func MiddlewareExample

func MiddlewareExample()

func SessionsExample

func SessionsExample()

func TemplateExample

func TemplateExample()

func WithServer

func WithServer(e func())

Wraps an example function with the necessary http server

Types

type ContactDetails

type ContactDetails struct {
	Email   string
	Subject string
	Message string
}

type Server

type Server struct{}

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Todo

type Todo struct {
	Title string
	Done  bool
}

type TodoPageData

type TodoPageData struct {
	PageTitle string
	Todos     []Todo
}

Jump to

Keyboard shortcuts

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