Discover Packages
github.com/Financial-Times/public-people-api
command
module
Version:
v0.1.5
Opens a new window with list of versions in this module.
Published: Sep 21, 2016
License: MIT
Opens a new window with license information.
Imports: 15
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
Public API for People (public-people-api)
Generates JSON representation of a Person in public-friendly format.
Build & deployment
Installation & running locally
Download the source code, dependencies and its test dependencies:
go get -u github.com/Financial-Times/public-people-api
cd $GOPATH/src/github.com/Financial-Times/public-people-api
go get -t
Run the tests and install the binary:
go test ./...
go install
Run the binary (using the help
flag to see the available optional arguments):
$GOPATH/bin/public-people-api [--help]
Test:
Either using curl:
curl http://localhost:8080/people/143ba45c-2fb3-35bc-b227-a6ed80b5c517 | json_pp
Or using httpie :
http GET http://localhost:8080/people/143ba45c-2fb3-35bc-b227-a6ed80b5c517
Endpoints
GET
Using curl:
curl http://localhost:8080/people/143ba45c-2fb3-35bc-b227-a6ed80b5c517 | json_pp`
Or using httpie :
http GET http://localhost:8080/people/143ba45c-2fb3-35bc-b227-a6ed80b5c517
The expected response will contain information about the person, and the organisations they are connected to (via memberships).
Based on the following google doc .
Health Checks
Health checks: http://localhost:8080/__health
Logging
The application uses logrus ; the log file is initialised in app.go .
Logging requires an env
app parameter, for all environments other than local
logs are written to file.
When running locally, logs are written to console. If you want to log locally to file, you need to pass in an env parameter that is != local
.
NOTE: /build-info
and /__gtg
endpoints are not logged as they are called every second from varnish/vulcand and this information is not needed in logs/splunk.
Expand ▾
Collapse ▴
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.