local

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Transport

type Transport struct {
	Underlying http.RoundTripper

	Debug bool
}

func (*Transport) RoundTrip

func (t *Transport) RoundTrip(r *http.Request) (*http.Response, error)

RoundTrip modifies the incoming request to reshape a Moov API production URL to a local dev URL. The GoDoc for http.RoundTripper state that the request SHOULD not be modified, not MUST. If this ends up causing problems we'll have to figure out another solution.

This means:

  • Dropping /v1/$app routing prefix
  • Changing the local port used (each app runs on its own port now)
  • Adjusting the scheme if needed.

Jump to

Keyboard shortcuts

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