draft-content-suggestions

command module
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: MIT Imports: 26 Imported by: 0

README

draft-content-suggestions

Circle CIGo Report Card Coverage Status

Introduction

Draft Content Suggestions as a microservice, provides consolidated suggestions via fetching draft content from Draft Content service and querying Suggestions Umbrella service.

Installation

Download the source code, dependencies and test dependencies:

    go get github.com:Financial-Times/draft-content-suggestions
    cd $GOPATH/src/github.com/Financial-Times/draft-content-suggestions
    go build .

Running locally

  1. Run the tests and install the binary:

     go test ./...
     go install
    
  2. Run the binary (using the help flag to see the available optional arguments):

     $GOPATH/bin/draft-content-suggestions [--help]
    

Options:

    --app-system-code="draft-content-suggestions"            System Code of the application ($APP_SYSTEM_CODE)
    --app-name="Annotation Suggestions API"                   Application name ($APP_NAME)
    --port="8080"                                           Port to listen on ($APP_PORT)
    --draft-content-endpoint="http://localhost:9000/drafts/content" Draft Content Service
    --draft-content-gtg-endpoint="http://localhost:9000/__gtg" Draft Content Health Service
    --suggestions-umbrella-endpoint="http://test.api.ft.com/content/suggest" Suggestions Umbrella Service
    --suggestions-api-key="" Suggestions service apiKey
  1. Test:

    1. Either using curl:

       curl http://localhost:8080/drafts/content/143ba45c-2fb3-35bc-b227-a6ed80b5c517/suggestions | json_pp
      
    2. Or using httpie:

       http GET http://localhost:8080/drafts/content/143ba45c-2fb3-35bc-b227-a6ed80b5c517/suggestions
      

Build and deployment

How can I build and deploy it (lots of this will be links out as the steps will be common)

API

For detailed documentation in OpenAPI format, please see here.

Logging
  • The application uses go-logger/v2; the log library is initialised in main.go.
  • 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.

Change/Rotate sealed secrets

Please reffer to documentation in pac-global-sealed-secrets-eks. Here are explained details how to create new, change existing sealed secrets.

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