dyd

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App interface {
	Bind(url string, handler func(ctx *Context, write func(s string, args ...any) error))
	ListenAndServe(addr string) error
}

App represents a dyd web app.

func NewApp

func NewApp() (App, error)

NewApp returns a newly created App or an error, if any.

type Context

type Context struct {
	ReqSequence    int64
	Request        *http.Request
	ResponseWriter http.ResponseWriter
}

Context provides access to the state of the server/session/request/database etc. At the moment it provides only elementary context for the proof of concept.

Jump to

Keyboard shortcuts

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