Skip to content

maartenvanvliet/aws-codegen

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Elixir

export SPEC_PATH=../../aws/aws-sdk-go/models/apis
export TEMPLATE_PATH=priv
export ELIXIR_OUTPUT_PATH=../aws-elixir/lib/aws
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

About

Code generator for AWS clients in Erlang and Elixir.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Elixir 57.2%
  • HTML 42.8%