chi

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Router

type Router struct {
	*chi.Mux
	// contains filtered or unexported fields
}

func NewRouter

func NewRouter(db gloss.Database) *Router

NewRouter creates a router, associates a database with it, and mounts API routes

func (*Router) GetCounterById

func (rt *Router) GetCounterById(w http.ResponseWriter, r *http.Request)

Get the value of the counter with ID counterId

func (*Router) IncrementCounterById

func (rt *Router) IncrementCounterById(w http.ResponseWriter, r *http.Request)

Increment the value of the counter with ID counterId

Jump to

Keyboard shortcuts

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