Skip to content

Commit

Permalink
doc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
benwilson512 committed Jul 22, 2016
1 parent a9265ad commit ee98c99
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 178 deletions.
4 changes: 4 additions & 0 deletions lib/ex_aws/ec2.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
defmodule ExAws.EC2 do
@moduledoc """
Operations on AWS EC2
"""

import ExAws.Utils

@version "2015-10-01"
Expand Down
41 changes: 1 addition & 40 deletions lib/ex_aws/kinesis.ex
Original file line number Diff line number Diff line change
@@ -1,45 +1,6 @@
defmodule ExAws.Kinesis do
@moduledoc """
Defines a Kinesis client.
Usage:
```
defmodule MyApp.Kinesis do
use ExAws.Kinesis.Client, otp_app: :my_otp_app
end
```
In your config
```
config :my_otp_app, :ex_aws,
kinesis: [], # kinesis config goes here
dynamodb: [], # you get the idea
```
You can now use MyApp.Kinesis as the root module for the Kinesis api without needing
to pass in a particular configuration.
This enables different otp apps to configure their AWS configuration separately.
The alignment with a particular OTP app however is entirely optional.
The following also works:
```
defmodule MyApp.Kinesis do
use ExAws.Kinesis.Client
def config_root do
Application.get_all_env(:my_aws_config_root)
end
end
```
ExAws now expects the config for that kinesis client to live under
```elixir
config :my_aws_config_root
kinesis: [] # Kinesis config goes here
```
Default config values can be found in ExAws.Config
Operations on AWS Kinesis
http://docs.aws.amazon.com/kinesis/latest/APIReference/API_Operations.html
"""
Expand Down
9 changes: 4 additions & 5 deletions lib/ex_aws/lambda.ex
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
defmodule ExAws.Lambda do
@moduledoc """
Operations on ExAws Lambda
"""

import ExAws.Utils, only: [camelize_keys: 1, upcase: 1]
require Logger

@moduledoc false
# Implimentation of the AWS Kinesis API.
#
# See ExAws.Kinesis.Client for usage.

@namespace "Lambda"
@actions %{
add_permission: :post,
Expand Down
23 changes: 4 additions & 19 deletions lib/ex_aws/rds.ex
Original file line number Diff line number Diff line change
@@ -1,26 +1,11 @@
defmodule ExAws.RDS do
import ExAws.Utils, only: [camelize_keys: 1]

@version "2014-10-31"


@moduledoc """
The purpose of this module is to surface the ExAws.RDS API tied to a single
configuration chosen, sich that it does not need passed in with every request.
Operations on AWS RDS
"""

Usage:
```
defmodule MyApp.RDS do
use ExAws.RDS.Client, otp_app: :my_otp_app
end
```
import ExAws.Utils, only: [camelize_keys: 1]

In your config
```
config :my_otp_app, :ex_aws,
rds: [], # RDS config goes here
```
"""
@version "2014-10-31"

@type db_instance_classes :: [
:db_t1_micro | :db_m1_small | :db_m1_medium | :db_m1_large | :db_m1_xlarge |
Expand Down
44 changes: 1 addition & 43 deletions lib/ex_aws/s3.ex
Original file line number Diff line number Diff line change
@@ -1,48 +1,6 @@
defmodule ExAws.S3 do

@moduledoc """
The purpose of this module is to surface the ExAws.S3 API tied to a single
configuration chosen, such that it does not need passed in with every request.
Usage:
```
defmodule MyApp.S3 do
use ExAws.S3.Client, otp_app: :my_otp_app
end
```
In your config
```
config :my_otp_app, :ex_aws,
s3: [], # S3 config goes here
```
You can now use MyApp.S3 as the root module for the S3 api without needing
to pass in a particular configuration.
This enables different otp apps to configure their AWS configuration separately.
The alignment with a particular OTP app while convenient is however entirely optional.
The following also works:
```
defmodule MyApp.S3 do
use ExAws.S3.Client
def config_root do
Application.get_all_env(:my_aws_config_root)
end
end
```
ExAws now expects the config for that S3 client to live under
```elixir
config :my_aws_config_root
s3: [] # S3 config goes here
```
This is in fact how the functions in ExAws.S3 that do not require a config work.
Default config values can be found in ExAws.Config. The default configuration is always used,
and then the configuration of a particular client is merged in and overrides the defaults.
Operations on AWS S3
"""

import ExAws.S3.Utils
Expand Down
55 changes: 1 addition & 54 deletions lib/ex_aws/sns.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,60 +2,7 @@ defmodule ExAws.SNS do
import ExAws.Utils, only: [camelize_key: 1, camelize_keys: 1]

@moduledoc """
Defines an SNS Client
By default you can use ExAws.SNS
## Usage
```
defmodule MyApp.SNS do
use ExAws.SNS.Client, otp_app: :my_otp_app
end
```
In your config:
```
config :my_otp_app, :ex_aws,
sns: [], # SNS config goes here
```
You can now use MyApp.SNS as the root module for the SNS API without
needing to pass in a particular configuration. This enables different OTP
apps to configure their AWS configurations separately.
The alignment with a particular OTP app while convenient is however entirely
optional.
The following also works:
```
defmodule MyApp.SNS do
use ExAws.SNS.Client
def config_root do
Application.get_all_env(:my_aws_config_root)
end
end
```
ExAws now expects the config for that client to live under `:my_aws_config_root`:
```elixir
config :my_aws_config_root
sns: [] # SNS config goes here
```
Default config values can be found in ExAws.Config.
## General notes
TODO
## Examples
TODO
Operations on AWS SNS
http://docs.aws.amazon.com/sns/latest/APIReference/API_Operations.html
"""
Expand Down
16 changes: 1 addition & 15 deletions lib/ex_aws/sqs.ex
Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
defmodule ExAws.SQS do
@moduledoc """
The purpose of this module is to surface the ExAws.SQS API tied to a single
configuration chose, such that it does not need passed in with every request
Usage:
```elixir
defmodule MyApp.SQS do
use ExAws.SQS.Client, otp_app: :my_otp_app
end
```
In your config
```elixir
config :my_otp_app, ExAws,
sqs: [], #SQS config goes here
```
Operations on AWS SQS
"""

@type sqs_permission ::
Expand Down
9 changes: 7 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
defmodule ExAws.Mixfile do
use Mix.Project

@version "1.0.0-beta1"

def project do
[app: :ex_aws,
version: "1.0.0-beta1",
version: @version,
elixir: "~> 1.0",
elixirc_paths: elixirc_paths(Mix.env),
description: "AWS client. Currently supports Dynamo, EC2, Kinesis, Lambda, RDS, S3, SNS, SQS",
name: "ExAws",
source_url: "https://github.com/cargosense/ex_aws",
package: package,
dialyzer: [flags: "--fullpath"],
deps: deps]
deps: deps,
docs: [main: "ExAws", source_ref: "v#{@version}",
source_url: "https://github.com/cargosense/ex_aws"]
]
end

def application do
Expand Down

0 comments on commit ee98c99

Please sign in to comment.