4242-spec get (Service :: string (),
4343 Path :: path ()) -> result ().
4444% % @doc Perform a HTTP GET request to the AWS API for the specified service. The
45- % % response will automatically be decoded if it is either in JSON or XML
45+ % % response will automatically be decoded if it is either in JSON, or XML
4646% % format.
4747% % @end
4848get (Service , Path ) ->
@@ -243,7 +243,7 @@ handle_msg(_Request, State) ->
243243-spec endpoint (State :: state (), Host :: string (),
244244 Service :: string (), Path :: string ()) -> string ().
245245% % @doc Return the endpoint URL, either by constructing it with the service
246- % % information passed in or by using the passed in Host value.
246+ % % information passed in, or by using the passed in Host value.
247247% % @ednd
248248endpoint (# state {region = Region }, undefined , Service , Path ) ->
249249 lists :flatten ([" https://" , endpoint_host (Region , Service ), Path ]);
@@ -294,11 +294,11 @@ get_content_type(Headers) ->
294294 end ,
295295 parse_content_type (Value ).
296296
297- -spec has_credentials () -> true | false .
297+ -spec has_credentials () -> boolean () .
298298has_credentials () ->
299299 gen_server :call (rabbitmq_aws , has_credentials ).
300300
301- -spec has_credentials (state ()) -> true | false .
301+ -spec has_credentials (state ()) -> boolean () .
302302% % @doc check to see if there are credentials made available in the current state
303303% % returning false if not or if they have expired.
304304% % @end
@@ -307,7 +307,7 @@ has_credentials(#state{access_key = Key}) when Key /= undefined -> true;
307307has_credentials (_ ) -> false .
308308
309309
310- -spec expired_credentials (Expiration :: calendar :datetime ()) -> true | false .
310+ -spec expired_credentials (Expiration :: calendar :datetime ()) -> boolean () .
311311% % @doc Indicates if the date that is passed in has expired.
312312% % end
313313expired_credentials (undefined ) -> false ;
@@ -354,9 +354,8 @@ local_time() ->
354354
355355
356356-spec maybe_decode_body (ContentType :: {nonempty_string (), nonempty_string ()}, Body :: body ()) -> list () | body ().
357- % % @doc Attempt to decode the response body based upon the mime type that is
358- % % presented.
359- % % @end.
357+ % % @doc Attempt to decode the response body by its MIME
358+ % % @end
360359maybe_decode_body ({" application" , " x-amz-json-1.0" }, Body ) ->
361360 rabbitmq_aws_json :decode (Body );
362361maybe_decode_body ({" application" , " json" }, Body ) ->
@@ -387,10 +386,10 @@ perform_request(State, Service, Method, Headers, Path, Body, Options, Host) ->
387386 Headers , Path , Body , Options , Host ).
388387
389388
390- -spec perform_request_has_creds (true | false , State :: state (),
391- Service :: string (), Method :: method (),
392- Headers :: headers (), Path :: path (), Body :: body (),
393- Options :: http_options (), Host :: string () | undefined )
389+ -spec perform_request_has_creds (HasCreds :: boolean () , State :: state (),
390+ Service :: string (), Method :: method (),
391+ Headers :: headers (), Path :: path (), Body :: body (),
392+ Options :: http_options (), Host :: string () | undefined )
394393 -> {Result :: result (), NewState :: state ()}.
395394% % @doc Invoked after checking to see if there are credentials. If there are,
396395% % validate they have not or will not expire, performing the request if not,
@@ -403,10 +402,10 @@ perform_request_has_creds(false, State, _, _, _, _, _, _, _) ->
403402 perform_request_creds_error (State ).
404403
405404
406- -spec perform_request_creds_expired (true | false , State :: state (),
407- Service :: string (), Method :: method (),
408- Headers :: headers (), Path :: path (), Body :: body (),
409- Options :: http_options (), Host :: string () | undefined )
405+ -spec perform_request_creds_expired (CredsExp :: boolean () , State :: state (),
406+ Service :: string (), Method :: method (),
407+ Headers :: headers (), Path :: path (), Body :: body (),
408+ Options :: http_options (), Host :: string () | undefined )
410409 -> {Result :: result (), NewState :: state ()}.
411410% % @doc Invoked after checking to see if the current credentials have expired.
412411% % If they haven't, perform the request, otherwise try and refresh the
0 commit comments