invoiceservice-go

command
Version: v0.0.0-...-ec090b1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2018 License: MIT Imports: 14 Imported by: 0

README

Invoice Service

This sample Flogo application is used to demonstrate some key Flogo constructs:

  • The Golang API for Flogo
  • Input/Output mappings
  • Complex object mapping
  • Invoke REST service

Files

.
├── Dockerfile          <-- A Dockerfile to build a container based on an Alpine base image
├── main.go             <-- The Go source code for the app
├── Makefile            <-- A Makefile to help build and deploy the app
├── payment-go-svc.yml  <-- The Kubernetes deployment file
├── README.md           <-- This file
└── swagger.json        <-- The OpenAPI specification for the app

Make targets

The Makefile has a few targets:

  • deps: Get all the Go dependencies for the app
  • clean: Remove the dist folder for a new deployment
  • clean-kube: Remove all the deployed artifacts from Kubernetes
  • build-app: Build an executable (and store it in the dist folder)
  • build-docker: Build a Docker container from the contents of the dist folder
  • run-docker: Run the Docker image with default settings
  • run-kube: Deploy the app to Kubernetes

For more detailed information on the commands that are executed you can check out the Makefile

API

After starting the app, it will register with two endpoints:

  • /api/invoices/:id: Get the invoice details for the invoice ID. The app also reaches out to the paymentservice app
  • /swagger: Get the OpenAPI specification for this app

Visuals

If you want to see the visual representation of the app, check out the invoiceservice app

Documentation

The Go Gopher

There is no documentation for this package.

Source Files

Jump to

Keyboard shortcuts

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