Code Monkey home page Code Monkey logo

aws-codegen's Introduction

Actions Status

Code generator for Elixir and Erlang AWS client.

Generating code

The code generator uses specs from the AWS SDK for the Go programming language to generate code.

Code is generated by running the generate.exs script. It requires Elixir 1.8.4+.

Elixir

export SPEC_PATH=../../aws/aws-sdk-go/models/apis
export TEMPLATE_PATH=priv
export ELIXIR_OUTPUT_PATH=../aws-elixir/lib/aws/generated
mix run generate.exs elixir $SPEC_PATH $TEMPLATE_PATH $ELIXIR_OUTPUT_PATH

Erlang

export SPEC_PATH=../../aws/aws-sdk-go/models/apis
export TEMPLATE_PATH=priv
export ERLANG_OUTPUT_PATH=../aws-erlang/src
mix run generate.exs erlang $SPEC_PATH $TEMPLATE_PATH $ERLANG_OUTPUT_PATH

AWS Protocols

Each AWS API uses a specific protocol which is defined in its specification JSON file in the aws-sdk-go repository. The existing protocols are:

  • json
  • rest-json
  • query
  • rest-xml

Every one of these protocols uses HTTP in an asynchronous (request & response) fashion. They mostly differ in what Content-Type they use for the request body, whether they include parameters in the URL or in the headers, and what Content-Type should one expect in the response body.

The following table attempts to capture the specifics of each protocol:

json rest-json query rest-xml
Methods POST GET, POST, PATCH, PUT, DELETE POST GET, POST, PATCH, PUT, DELETE
Request Content-Type application/json application/json application/x-www-form-urlencoded text/xml
URL Parameters No Yes No Yes
Header Parameters No Yes No Yes
Response Content-Type application/json application/json text/xml text/xml

Dependencies

This project has some dependencies you need to install before installing packages with Hex. Here you can find instructions for Ubuntu Linux and Mac OS.

Ubuntu Linux dependencies

Two packages are needed for Ubuntu: gcc and build-essential. To install them:

$ apt-get install build-essential cmake

Mac OS X dependencies

Two similar packages are needed in OS X, but you may install them with brew:

$ brew install gcc cmake

Alternatively you can install XCode's Command Line Developer Tools package:

$ xcode-select --install

aws-codegen's People

Contributors

anirudh24seven avatar azrosen92 avatar ettomatic avatar fivebats avatar hdtafur avatar jadeallenx avatar jcomellas avatar jfacorro avatar jkakar avatar maartenvanvliet avatar onno-vos-dev avatar philss avatar robertoaloi avatar rrpff avatar samfrench avatar vrcca avatar ypaq 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.