route

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2026 License: MIT Imports: 5 Imported by: 15

Documentation

Rendered for js/wasm

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallJS added in v0.3.0

func CallJS(scope_id, verb string, request js.Value) any

func Commit

func Commit(scope_id string)

Types

type ContentType added in v0.6.0

type ContentType string
const (
	JSON      ContentType = "application/json"
	Text      ContentType = "text/plain"
	Form      ContentType = "application/x-www-form-urlencoded"
	Multipart ContentType = "multipart/form-data"
	Blob      ContentType = "application/octet-stream"
)

type Handler

type Handler = func(Request) any

func Connect

func Connect(h Handler) Handler

func Delete

func Delete(h Handler) Handler

func Get

func Get(h Handler) Handler

top-level functions for no-options case

func Head(h Handler) Handler

func Options

func Options(h Handler) Handler

func Patch

func Patch(h Handler) Handler

func Post

func Post(h Handler) Handler

func Put

func Put(h Handler) Handler

func Trace

func Trace(h Handler) Handler

type Props added in v0.6.1

type Props = map[string]any

type Request

type Request = core.Request

type With added in v0.6.0

type With struct {
	ContentType ContentType
}

func (With) Connect added in v0.6.0

func (w With) Connect(h Handler) Handler

func (With) Delete added in v0.6.0

func (w With) Delete(h Handler) Handler

func (With) Get added in v0.6.0

func (w With) Get(h Handler) Handler

methods on With for the with-options case

func (With) Head added in v0.6.0

func (w With) Head(h Handler) Handler

func (With) Options added in v0.6.0

func (w With) Options(h Handler) Handler

func (With) Patch added in v0.6.0

func (w With) Patch(h Handler) Handler

func (With) Post added in v0.6.0

func (w With) Post(h Handler) Handler

func (With) Put added in v0.6.0

func (w With) Put(h Handler) Handler

func (With) Trace added in v0.6.0

func (w With) Trace(h Handler) Handler

Jump to

Keyboard shortcuts

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