frankieone

command module
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

README

FrankieOne Test SDK REST API Service written in Golang using GIN Framework

Golang 1.16 | Sqllite | GoGin Framework | | ZAP Logger | Docker | CircleCI

Run prebuilt image

To Run the pre-built docker image, that automatically builds with every new push

docker run -p 8081:8081 --name frankieone techievee/frankieone:latest

The application exposes

  • 8081 - For TLS port ( TLS Enabled by default from the config with self-signed certificate)

Generating the documentation

make swagger

Configuration

The application configuration can be specified as YAML and their config location can be specified using the -cnf environment variable, which defaults to current directory

  • config folder
    • app.yaml
      • app_env - prod: All debug logs are supressed in stdout, any other values: all logs enabled
      • services - For specifying the port and TLS options

Building the solution

For building the solution, please

  • Install the gcc and other developer tools
  • Copy the cert and config folders
  • create a folder where the db file resides
  • RUN
    • CGO_ENABLED=1 go build -o /frankieoneSDK

Pre-built solution for MAC are available as ZIP in release folder

API Endpoints

SNo ENDPOINTS REST API METHOD DESCRIPTION
1 /isgood Yes POST gets all products.

API Return Code

SNo ENDPOINTS REST API METHOD DESCRIPTION
1 /isgood Yes POST 200- Success, 500- Internal Server Error.

Data Models

POST Endpoints requires the body to have the following json data

DeviceCollection:

[
  {
    "checkType": "DEVICE",
    "activityType": "SIGNUP",
    "checkSessionKey": "string",
    "activityData": [
      {
        "kvpKey": "ip.address",
        "kvpValue1": "1.23.45.123",
        "kvpType": "general.string"
      }
    ]
  },
  {
    "checkType": "DEVICE",
    "activityType": "SIGNUP",
    "checkSessionKey": "string1",
    "activityData": [
      {
        "kvpKey": "ip.address",
        "kvpValue": "1.23.45.123",
        "kvpType": "general.string"
      },
       {
        "kvpKey": "ip.address",
        "kvpValue": "1.23.45.123",
        "kvpType": "general.string"
      }
    ]
  }
]

Returns 200: Success

{
    "puppy": true
}

Returns 500: Error

{
    "code": 500,
    "message": "Key: 'DeviceCheckDetailsObject.CheckType' Error:Field validation for 'CheckType' failed on the 'oneof' tag"
}

Documentation

Overview

Package main Frankie Financial Universal SDK Tester API (Internal Only)

This API allows developers to test the Universal SDK output to ensure it looks right.. The traditional Swagger view of this documentation can be found here:\n - https://app.swaggerhub.com/apis-docs/FrankieFinancial/TestUniversalSDK

Schemes: https
Host: localhost:8081
Version: 1.0.3
Contact: Vinod Kumar jayarajan<vinodkumarjayarajan@gmail.com>

Consumes:
- application/json

Produces:
- application/json

Security:

SecurityDefinitions:

swagger:meta

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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