Skip to content

Commit dd95f23

Browse files
Merge pull request #14342 from rabbitmq/su_aws/erlfmt_rabbitmqaws_4.1.x
erlfmt rabbitmq_aws (4.1.x)
2 parents 70a6e64 + 610d16f commit dd95f23

19 files changed

+3092
-2466
lines changed

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Format rabbitmq_aws with erlfmt
2+
a4fffbd7e0a312fef2e514ade54fc4310a681542
13
# Revert "Format MQTT code with erlfmt"
24
209f23fa2f58e0240116b3e8e5be9cd54d34b569
35
# Format MQTT code with erlfmt

deps/rabbitmq_aws/include/rabbitmq_aws.hrl

Lines changed: 52 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,22 @@
5757
-type sc_error() :: {error, Reason :: atom()}.
5858
-type security_credentials() :: sc_ok() | sc_error().
5959

60-
-record(imdsv2token, { token :: security_token() | undefined,
61-
expiration :: non_neg_integer() | undefined}).
60+
-record(imdsv2token, {
61+
token :: security_token() | undefined,
62+
expiration :: non_neg_integer() | undefined
63+
}).
6264

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

65-
-record(state, {access_key :: access_key() | undefined,
66-
secret_access_key :: secret_access_key() | undefined,
67-
expiration :: expiration() | undefined,
68-
security_token :: security_token() | undefined,
69-
region :: region() | undefined,
70-
imdsv2_token:: imdsv2token() | undefined,
71-
error :: atom() | string() | undefined}).
67+
-record(state, {
68+
access_key :: access_key() | undefined,
69+
secret_access_key :: secret_access_key() | undefined,
70+
expiration :: expiration() | undefined,
71+
security_token :: security_token() | undefined,
72+
region :: region() | undefined,
73+
imdsv2_token :: imdsv2token() | undefined,
74+
error :: atom() | string() | undefined
75+
}).
7276
-type state() :: #state{}.
7377

7478
-type scheme() :: atom().
@@ -79,17 +83,16 @@
7983
-type query_args() :: [tuple() | string()].
8084
-type fragment() :: string().
8185

82-
-type userinfo() :: {undefined | username(),
83-
undefined | password()}.
86+
-type userinfo() :: {undefined | username(), undefined | password()}.
8487

85-
-type authority() :: {undefined | userinfo(),
86-
host(),
87-
undefined | tcp_port()}.
88-
-record(uri, {scheme :: undefined | scheme(),
89-
authority :: authority(),
90-
path :: undefined | path(),
91-
query :: undefined | query_args(),
92-
fragment :: undefined | fragment()}).
88+
-type authority() :: {undefined | userinfo(), host(), undefined | tcp_port()}.
89+
-record(uri, {
90+
scheme :: undefined | scheme(),
91+
authority :: authority(),
92+
path :: undefined | path(),
93+
query :: undefined | query_args(),
94+
fragment :: undefined | fragment()
95+
}).
9396

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

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

107-
-type http_option() :: {timeout, timeout()} |
108-
{connect_timeout, timeout()} |
109-
{ssl, ssl_options()} |
110-
{essl, ssl_options()} |
111-
{autoredirect, boolean()} |
112-
{proxy_auth, {User :: string(), Password :: string()}} |
113-
{version, http_version()} |
114-
{relaxed, boolean()} |
115-
{url_encode, boolean()}.
110+
-type http_option() ::
111+
{timeout, timeout()}
112+
| {connect_timeout, timeout()}
113+
| {ssl, ssl_options()}
114+
| {essl, ssl_options()}
115+
| {autoredirect, boolean()}
116+
| {proxy_auth, {User :: string(), Password :: string()}}
117+
| {version, http_version()}
118+
| {relaxed, boolean()}
119+
| {url_encode, boolean()}.
116120
-type http_options() :: [http_option()].
117121

118-
119-
-record(request, {access_key :: access_key(),
120-
secret_access_key :: secret_access_key(),
121-
security_token :: security_token(),
122-
service :: string(),
123-
region = "us-east-1" :: string(),
124-
method = get :: method(),
125-
headers = [] :: headers(),
126-
uri :: string(),
127-
body = "" :: body()}).
122+
-record(request, {
123+
access_key :: access_key(),
124+
secret_access_key :: secret_access_key(),
125+
security_token :: security_token(),
126+
service :: string(),
127+
region = "us-east-1" :: string(),
128+
method = get :: method(),
129+
headers = [] :: headers(),
130+
uri :: string(),
131+
body = "" :: body()
132+
}).
128133
-type request() :: #request{}.
129134

130-
-type httpc_result() :: {ok, {status_line(), headers(), body()}} |
131-
{ok, {status_code(), body()}} |
132-
{error, term()}.
135+
-type httpc_result() ::
136+
{ok, {status_line(), headers(), body()}}
137+
| {ok, {status_code(), body()}}
138+
| {error, term()}.
133139

134140
-type result_ok() :: {ok, {ResponseHeaders :: headers(), Response :: list()}}.
135-
-type result_error() :: {'error', Message :: reason_phrase(), {ResponseHeaders :: headers(), Response :: list()} | undefined} |
136-
{'error', {credentials, Reason :: string()}} |
137-
{'error', string()}.
141+
-type result_error() ::
142+
{'error', Message :: reason_phrase(),
143+
{ResponseHeaders :: headers(), Response :: list()} | undefined}
144+
| {'error', {credentials, Reason :: string()}}
145+
| {'error', string()}.
138146
-type result() :: result_ok() | result_error().

0 commit comments

Comments
 (0)