controller

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

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

Go to latest
Published: Jun 3, 2021 License: AGPL-3.0 Imports: 7 Imported by: 0

README

Controller

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

func New

func New(cfg *config.Config, store *adr.Store) (*Controller, error)

New returns

func (*Controller) Handle

func (ctl *Controller) Handle(w http.ResponseWriter, r *http.Request)

Handle implements the http interface. This should be the only part of the controller that you need to customize for the ADR. Mostly that means wiring in the route.

func (*Controller) Handler

func (ctl *Controller) Handler() http.Handler

Handler implements the http interface by forwarding all requests to custom handle function.

func (*Controller) ServeHTTP

func (ctl *Controller) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP to satisfy the http.Handler interface. It forwards all requests to our custom handle function.

Jump to

Keyboard shortcuts

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