chore: some code format

This commit is contained in:
DDDHuang 2022-04-15 14:32:51 +08:00
parent 402d3d97ae
commit c777759707
2 changed files with 57 additions and 34 deletions

View File

@ -431,8 +431,10 @@ schema("/authentication/:id/users") ->
description => <<"List users in authenticator in global authentication chain">>,
parameters => [
param_auth_id(),
{page, mk(pos_integer(), #{in => query, desc => <<"Page Index">>, required => false})},
{limit, mk(pos_integer(), #{in => query, desc => <<"Page Limit">>, required => false})},
{page,
mk(pos_integer(), #{in => query, desc => <<"Page Index">>, required => false})},
{limit,
mk(pos_integer(), #{in => query, desc => <<"Page Limit">>, required => false})},
{like_username,
mk(binary(), #{
in => query,
@ -481,8 +483,10 @@ schema("/listeners/:listener_id/authentication/:id/users") ->
parameters => [
param_listener_id(),
param_auth_id(),
{page, mk(pos_integer(), #{in => query, desc => <<"Page Index">>, required => false})},
{limit, mk(pos_integer(), #{in => query, desc => <<"Page Limit">>, required => false})}
{page,
mk(pos_integer(), #{in => query, desc => <<"Page Index">>, required => false})},
{limit,
mk(pos_integer(), #{in => query, desc => <<"Page Limit">>, required => false})}
],
responses => #{
200 => emqx_dashboard_swagger:schema_with_example(

View File

@ -50,36 +50,55 @@ fields(exhook) ->
)}
];
fields(server) ->
[ {name, sc(binary(),
#{ desc => "Name of the exhook server."
})}
, {enable, sc(boolean(),
#{ default => true
, desc => "Enable the exhook server."
})}
, {url, sc(binary(),
#{ desc => "URL of the gRPC server."
})}
, {request_timeout, sc(duration(),
#{ default => "5s"
, desc => "The timeout to request gRPC server."
})}
, {failed_action, failed_action()}
, {ssl,
sc(ref(ssl_conf), #{})}
, {auto_reconnect,
sc(hoconsc:union([false, duration()]),
#{ default => "60s"
, desc => "Whether to automatically reconnect (initialize) the gRPC server.<br/>"
"When gRPC is not available, exhook tries to request the gRPC service at "
"that interval and reinitialize the list of mounted hooks."
})}
, {pool_size,
sc(pos_integer(),
#{ default => 8
, example => 8
, desc => "The process pool size for gRPC client."
})}
[
{name,
sc(
binary(),
#{desc => "Name of the exhook server."}
)},
{enable,
sc(
boolean(),
#{
default => true,
desc => "Enable the exhook server."
}
)},
{url,
sc(
binary(),
#{desc => "URL of the gRPC server."}
)},
{request_timeout,
sc(
duration(),
#{
default => "5s",
desc => "The timeout to request gRPC server."
}
)},
{failed_action, failed_action()},
{ssl, sc(ref(ssl_conf), #{})},
{auto_reconnect,
sc(
hoconsc:union([false, duration()]),
#{
default => "60s",
desc =>
"Whether to automatically reconnect (initialize) the gRPC server.<br/>"
"When gRPC is not available, exhook tries to request the gRPC service at "
"that interval and reinitialize the list of mounted hooks."
}
)},
{pool_size,
sc(
pos_integer(),
#{
default => 8,
example => 8,
desc => "The process pool size for gRPC client."
}
)}
];
fields(ssl_conf) ->
Schema = emqx_schema:client_ssl_opts_schema(#{}),