mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-07 21:13:44 +02:00
docs
This commit is contained in:
parent
49d9982aa2
commit
b69a38f2c6
1 changed files with 7 additions and 4 deletions
|
@ -27,6 +27,7 @@ use crate::model::{IpAssignmentPool, Member, Network, RequestLogItem};
|
||||||
|
|
||||||
const RECONNECT_RATE_LIMIT: tokio::time::Duration = tokio::time::Duration::from_millis(250);
|
const RECONNECT_RATE_LIMIT: tokio::time::Duration = tokio::time::Duration::from_millis(250);
|
||||||
|
|
||||||
|
/// Query for looking up a virtual network and all its relevant settings.
|
||||||
const GET_NETWORK_SQL: &'static str = "
|
const GET_NETWORK_SQL: &'static str = "
|
||||||
SELECT
|
SELECT
|
||||||
n.capabilities,
|
n.capabilities,
|
||||||
|
@ -52,9 +53,11 @@ FROM
|
||||||
LEFT OUTER JOIN ztc_oidc_config oc ON noc.client_id = oc.client_id AND o.org_id = oc.org_id
|
LEFT OUTER JOIN ztc_oidc_config oc ON noc.client_id = oc.client_id AND o.org_id = oc.org_id
|
||||||
LEFT OUTER JOIN ztc_network_dns d ON d.network_id = n.id
|
LEFT OUTER JOIN ztc_network_dns d ON d.network_id = n.id
|
||||||
WHERE
|
WHERE
|
||||||
id = $1 AND
|
n.id = $1 AND
|
||||||
deleted = false";
|
n.deleted = false";
|
||||||
|
|
||||||
|
/// Query to get capabilities, a deprecated feature for small subsets of rules that is handled here automatically by
|
||||||
|
/// merging with the main rule set.
|
||||||
const GET_NETWORK_MEMBERS_WITH_CAPABILITIES_SQL: &'static str = "
|
const GET_NETWORK_MEMBERS_WITH_CAPABILITIES_SQL: &'static str = "
|
||||||
SELECT
|
SELECT
|
||||||
m.id,
|
m.id,
|
||||||
|
@ -66,8 +69,8 @@ WHERE
|
||||||
authorized = true AND
|
authorized = true AND
|
||||||
deleted = false AND
|
deleted = false AND
|
||||||
capabilities IS NOT NULL AND
|
capabilities IS NOT NULL AND
|
||||||
capabilities != '[]'
|
capabilities != '[]' AND
|
||||||
";
|
capabilities != 'null'";
|
||||||
|
|
||||||
struct PostgresConnection {
|
struct PostgresConnection {
|
||||||
s_list_networks: Statement,
|
s_list_networks: Statement,
|
||||||
|
|
Loading…
Add table
Reference in a new issue