conduit

module
v0.0.0-...-e8e34a0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2021 License: MIT

README

Conduit

Conduit implements several styles of Go web servers for Conduit, the RealWorld example web application.

Servers

The grand plan is to implement several servers.

Look in cmd/xxx to find the main for each server. The main function creates a Config, then calls run to initialize and execute the server. All errors are returned to main, which prints the error and then exits.

Run uses the package imported from internal/servers/xxx to initialize the server. It should have server declared in the main package, but because of the way I wrote the test suite, I have to have Server and that Server has to have exported fields. (I'd like to revisit and fix that in the future.)

Configuration

All servers use the internal/config package. Normally, that would be declared in the main package. It's separated out soley to allow it to be reused.

Test Suite

The servers share a common test suite.

Directories

Path Synopsis
cmd
gorilla
Package main implements a Conduit server using Gorilla packages.
Package main implements a Conduit server using Gorilla packages.
hexagonal
Package main implements a Conduit server using a Hexagonal ( also known as Ports and Adapters) style.
Package main implements a Conduit server using a Hexagonal ( also known as Ports and Adapters) style.
ryer
Package main implements a Conduit server in the style of Mat Ryer's server.
Package main implements a Conduit server in the style of Mat Ryer's server.
internal
conduit
Package conduit defines the types exposed to the client by the web server.
Package conduit defines the types exposed to the client by the web server.
jsonapi
Package jsonapi implements a REST-ish interface.
Package jsonapi implements a REST-ish interface.
jwt
Package jwt implements naive JSON Web Tokens.
Package jwt implements naive JSON Web Tokens.
servers/ryer
Package ryer implements a Conduit server in the style of Mat Ryer's server.
Package ryer implements a Conduit server in the style of Mat Ryer's server.
store/memory
Package memory implements a non-persistent in-memory data store for Conduit data.
Package memory implements a non-persistent in-memory data store for Conduit data.
store/model
Package model defines the types that we expect our stores to return.
Package model defines the types that we expect our stores to return.
store/postgres
Package postgres implements a make-believe connection to an external database
Package postgres implements a make-believe connection to an external database
tests
Package tests implements a test suite for the Conduit server API.
Package tests implements a test suite for the Conduit server API.
way

Jump to

Keyboard shortcuts

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