pathfinder

package module
v0.0.0-...-8209e07 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2018 License: MIT Imports: 4 Imported by: 0

README

pathfinder

Build Status License MIT

The routing context from the original DDD Sample Application, written in Go.

Running the application

Start the application on port 8080 (or whatever the PORT variable is set to).

go run cmd/pathfinder/main.go
Docker

You can also run the application using Docker:

docker run --name some-pathfinder -p 8080:8080 marcusolsson/pathfinder

Try it!

curl 'localhost:8080/paths?from=SESTO&to=FIHEL'

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidArgument = errors.New("invalid argument")

ErrInvalidArgument is used if the user provides invalid arguments.

Functions

This section is empty.

Types

type PathService

type PathService interface {
	ShortestPath(origin, destination string) ([]path.TransitPath, error)
}

PathService provides the shortest path "algorithm".

func NewLoggingMiddleware

func NewLoggingMiddleware(logger log.Logger, next PathService) PathService

NewLoggingMiddleware creates a new logging middleware.

func NewPathService

func NewPathService() PathService

NewPathService creates a new path service.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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