Coder Social home page Coder Social logo

workflow-goclient's Introduction

GoDoc

workflow-goclient

Go client for interacting with the 3DSIM workflow api.

Technical Specifications

Platforms Supported

MacOS, Windows, and Linux

Background Info

We use https://goswagger.io to generate our Go APIs and clients. This allows us to build our APIs in a "design first" manner.

First we create a swagger.yaml file that defines the API. Then we run a command to generate the server code.

Additionally, this allows us to automatically generate client code. The code in this directory was all generated using the go-swagger tools.

Organization

  • workflow - the client package that adds convenience methods for common workflow operations
  • genclient - the generated client code
  • models - the generated models

Regenerating code

First install the swagger generator. Currently we are using release 0.11.0 of https://github.com/go-swagger/go-swagger.

For mac users:

  • brew tap go-swagger/go-swagger
  • brew install go-swagger

For windows users:

The code generator needs a specification file. The specification for the workflow API is stored in github.com/3dsim/workflow/swagger.yaml. Assuming that project is cloned as a sibling project, the command to run to generate new client code is:

swagger generate client -A WorkflowAPI -f ../workflow/swagger.yaml --client-package genclient
  • Generate fakes using counterfeiter
go get github.com/maxbrunsfeld/counterfeiter

From inside package folder

go generate
go get github.com/vektra/mockery/.../
$GOPATH/bin/mockery -name <interface name> -recursive

If you need to generate mocks in the same package to avoid circular dependencies use

$GOPATH/bin/mockery -name <interface name> -recursive -inpkg

Using the client

TODO

Contributors

  • Tim Sublette
  • Ryan Walls
  • Chad Queen
  • Pete Krull
  • Alex Drinkwater

Original release

December 2017

workflow-goclient's People

Contributors

ryanwalls avatar pkrull-ansys avatar

Watchers

James Cloos avatar Alex Drinkwater avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.