v1-people-transformer

command module
v0.0.0-...-807841d Latest Latest
Warning

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

Go to latest
Published: May 23, 2017 License: MIT Imports: 18 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

DECOMMISIONED - See https://github.com/Financial-Times/basic-tme-transformer instead

V1 People Transformer

CircleCI Go Report Card Coverage Status

An API for pulling in and transforming V1/TME People into the UPP representation of a Person

Installation

For the first time:

go get github.com/Financial-Times/v1-people-transformer

or update:

go get -u github.com/Financial-Times/v1-people-transformer

Running

$GOPATH/bin/v1-people-transformer --tme-username={tme-username} --port={port} --tme-password={tme-password} --token={tme-token} --base-url={base-url for the app} --tme-base-url={tme-base-url} --maxRecords={maxRecords} --batchSize={batchSize} --cache-file-name={cache-file-name}

TME credentials are mandatory and can be found in lastpass

Building

With Docker:

docker build -t coco/v1-orgs-transformer .

docker run -ti --env BASE_URL=<base url> --env TME_BASE_URL=<structure service url> --env TME_USERNAME=<user> --env TME_PASSWORD=<pass> --env TOKEN=<token> --env CACHE_FILE_NAME=<file> coco/v1-orgs-transformer

Endpoints

GET /transformers/people

The V1 people transformer holds all the V1 People in memory and this endpoint gets the JSON for ALL the people. Useful for piping to a file or using with up-rest-utils but be careful using this via Postman or a Browser as it is a lot of JSON

A successful GET results in a 200.

curl -X GET https://{pub-semantic-user}:{pub-semantic-password}@semantic-up.ft.com/__v1-people-transformer/transformers/people

GET /transformers/people/{uuid}

The V1 people transformer holds all the V1 People in memory and this endpoint gets the JSON a person with a given UUID. The UUID is derived from the TME composite id at this point

A successful GET results in a 200 and 404 for not finding the person

curl -X GET https://{pub-semantic-user}:{pub-semantic-password}@semantic-up.ft.com/__v1-people-transformer/transformers/people/8138ca3f-b80d-3ef8-ad59-6a9b6ea5f15e

GET /transformers/people/__ids

All of the UUIDS for ALL the V1 people - This is needed for loading via the concept publisher

curl -X GET https://{pub-semantic-user}:{pub-semantic-password}@semantic-up.ft.com/__v1-people-transformer/transformers/people/__ids

GET /transformers/people/__count

A count of how people are in the transformer's memory cache

curl -X GET https://{pub-semantic-user}:{pub-semantic-password}@semantic-up.ft.com/__v1-people-transformer/transformers/people/__count

POST /transformers/people/__reload

Fetches all the V1 people from TME and reloads the cache. There is no payload for this post

curl -X POST https://{pub-semantic-user}:{pub-semantic-password}@semantic-up.ft.com/__v1-people-transformer/transformers/people/__reload

Admin endpoints

Healthchecks: http://localhost:8080/__health

Ping: http://localhost:8080/ping or http://localhost:8080/__ping

Build-info: http://localhost:8080/build-info

Good to Go: http://localhost:8080/__gtg

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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