_examples/

directory
v4.0.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2020 License: MIT

README

chi examples

Usage

  1. go get -v -d -u ./... - fetch example deps
  2. cd <example>/ ie. cd rest/
  3. go run *.go - note, example services run on port 3333
  4. Open another terminal and use curl to send some requests to your example service, curl -v http://localhost:3333/
  5. Read /main.go source to learn how service works and read comments for usage

Directories

Path Synopsis
Limits ====== This example demonstrates the use of Timeout, and Throttle middlewares.
Limits ====== This example demonstrates the use of Timeout, and Throttle middlewares.
Custom Structured Logger ======================== This example demonstrates how to use middleware.RequestLogger, middleware.LogFormatter and middleware.LogEntry to build a structured logger using the amazing sirupsen/logrus package as the logging backend.
Custom Structured Logger ======================== This example demonstrates how to use middleware.RequestLogger, middleware.LogFormatter and middleware.LogEntry to build a structured logger using the amazing sirupsen/logrus package as the logging backend.
REST ==== This example demonstrates a HTTP REST web service with some fixture data.
REST ==== This example demonstrates a HTTP REST web service with some fixture data.
Todos Resource ============== This example demonstrates a project structure that defines a subrouter and its handlers on a struct, and mounting them as subrouters to a parent router.
Todos Resource ============== This example demonstrates a project structure that defines a subrouter and its handlers on a struct, and mounting them as subrouters to a parent router.
Versions ======== This example demonstrates the use of the render subpackage, with a quick concept for how to support multiple api versions.
Versions ======== This example demonstrates the use of the render subpackage, with a quick concept for how to support multiple api versions.

Jump to

Keyboard shortcuts

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