handler

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config interface {
	Prefix() string
	LogID() string
	Deadline() time.Duration
}

type Handler

type Handler struct {
	Config
	Fun      func(context.Context, Config, http.ResponseWriter, *http.Request) (int, error)
	Endpoint types.Endpoint
	Method   string
}

Handler implements the http.Handler interface

func (Handler) Path

func (h Handler) Path() string

Path returns a path that should be configured for this handler

func (Handler) ServeHTTP

func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP is part of the http.Handler interface

Jump to

Keyboard shortcuts

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