1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//! # `pdns_cli`
//!
//! the `pdns_cli` binary crate provides a CLI for interacting with the `PowerDNS` Authoritative Server API.
//!
//! # Connecting to the API
//!
//! The CLI expects 2 parameters:
//!
//! 1) The webser url
//!
//! This url specifies the API endpoint to hit and can be specified in 2 ways
//! - `PDNS_WEBSERVER_URL` environment variable
//! - `webserver-url` cli parameter
//!
//! See [`pdns_client::Client::new`] for restrictions on the url
//!
//! 2) The webserver API key
//!
//! This is used for authenticating to the API (specified in the header of requests as `X-API-Key`) and can be specified in 2 ways
//! - `PDNS_API_KEY` environment variable
//! - `api-key` cli parameter
//!
//! # Examples
//!
//! ```bash
//! export PDNS_WEBSERVER_URL=http://127.0.0.1:8081/
//! export PDNS_API_KEY=changeme
//!
//! pdns-cli servers list
//! ```
//!
//!
// ////////////////////////////////////
// REGISTERING
// ////////////////////////////////////
// ////////////////////////////////////
// USE: BRING INTO SCOPE
// ////////////////////////////////////
use *;
use Parser;