Skip to content

erlfmt rabbitmq_aws (4.1.x) #14342

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Format rabbitmq_aws with erlfmt
a4fffbd7e0a312fef2e514ade54fc4310a681542
# Revert "Format MQTT code with erlfmt"
209f23fa2f58e0240116b3e8e5be9cd54d34b569
# Format MQTT code with erlfmt
Expand Down
96 changes: 52 additions & 44 deletions deps/rabbitmq_aws/include/rabbitmq_aws.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,22 @@
-type sc_error() :: {error, Reason :: atom()}.
-type security_credentials() :: sc_ok() | sc_error().

-record(imdsv2token, { token :: security_token() | undefined,
expiration :: non_neg_integer() | undefined}).
-record(imdsv2token, {
token :: security_token() | undefined,
expiration :: non_neg_integer() | undefined
}).

-type imdsv2token() :: #imdsv2token{}.

-record(state, {access_key :: access_key() | undefined,
secret_access_key :: secret_access_key() | undefined,
expiration :: expiration() | undefined,
security_token :: security_token() | undefined,
region :: region() | undefined,
imdsv2_token:: imdsv2token() | undefined,
error :: atom() | string() | undefined}).
-record(state, {
access_key :: access_key() | undefined,
secret_access_key :: secret_access_key() | undefined,
expiration :: expiration() | undefined,
security_token :: security_token() | undefined,
region :: region() | undefined,
imdsv2_token :: imdsv2token() | undefined,
error :: atom() | string() | undefined
}).
-type state() :: #state{}.

-type scheme() :: atom().
Expand All @@ -79,17 +83,16 @@
-type query_args() :: [tuple() | string()].
-type fragment() :: string().

-type userinfo() :: {undefined | username(),
undefined | password()}.
-type userinfo() :: {undefined | username(), undefined | password()}.

-type authority() :: {undefined | userinfo(),
host(),
undefined | tcp_port()}.
-record(uri, {scheme :: undefined | scheme(),
authority :: authority(),
path :: undefined | path(),
query :: undefined | query_args(),
fragment :: undefined | fragment()}).
-type authority() :: {undefined | userinfo(), host(), undefined | tcp_port()}.
-record(uri, {
scheme :: undefined | scheme(),
authority :: authority(),
path :: undefined | path(),
query :: undefined | query_args(),
fragment :: undefined | fragment()
}).

-type method() :: head | get | put | post | trace | options | delete | patch.
-type http_version() :: string().
Expand All @@ -104,35 +107,40 @@

-type ssl_options() :: [ssl:tls_client_option()].

-type http_option() :: {timeout, timeout()} |
{connect_timeout, timeout()} |
{ssl, ssl_options()} |
{essl, ssl_options()} |
{autoredirect, boolean()} |
{proxy_auth, {User :: string(), Password :: string()}} |
{version, http_version()} |
{relaxed, boolean()} |
{url_encode, boolean()}.
-type http_option() ::
{timeout, timeout()}
| {connect_timeout, timeout()}
| {ssl, ssl_options()}
| {essl, ssl_options()}
| {autoredirect, boolean()}
| {proxy_auth, {User :: string(), Password :: string()}}
| {version, http_version()}
| {relaxed, boolean()}
| {url_encode, boolean()}.
-type http_options() :: [http_option()].


-record(request, {access_key :: access_key(),
secret_access_key :: secret_access_key(),
security_token :: security_token(),
service :: string(),
region = "us-east-1" :: string(),
method = get :: method(),
headers = [] :: headers(),
uri :: string(),
body = "" :: body()}).
-record(request, {
access_key :: access_key(),
secret_access_key :: secret_access_key(),
security_token :: security_token(),
service :: string(),
region = "us-east-1" :: string(),
method = get :: method(),
headers = [] :: headers(),
uri :: string(),
body = "" :: body()
}).
-type request() :: #request{}.

-type httpc_result() :: {ok, {status_line(), headers(), body()}} |
{ok, {status_code(), body()}} |
{error, term()}.
-type httpc_result() ::
{ok, {status_line(), headers(), body()}}
| {ok, {status_code(), body()}}
| {error, term()}.

-type result_ok() :: {ok, {ResponseHeaders :: headers(), Response :: list()}}.
-type result_error() :: {'error', Message :: reason_phrase(), {ResponseHeaders :: headers(), Response :: list()} | undefined} |
{'error', {credentials, Reason :: string()}} |
{'error', string()}.
-type result_error() ::
{'error', Message :: reason_phrase(),
{ResponseHeaders :: headers(), Response :: list()} | undefined}
| {'error', {credentials, Reason :: string()}}
| {'error', string()}.
-type result() :: result_ok() | result_error().
Loading
Loading