Files
kumomta/crates/kcli/Cargo.toml
T
Wez Furlong 0249bd0d4d kcli: you may now list and cancel admin bounce entries
Entries now have a uuid that identifies them within a given instance
(NOT within a cluster).  The id is returned when the entry is
established:

```console
$ kcli --endpoint http://127.0.0.1:8000 bounce --everything --reason boop
{
  "id": "9a946198-9351-4e0e-b460-fc84e066878a",
  "bounced": {},
  "total_bounced": 0
}
```

You can list entries with their remaining duration:

```console
$ kcli --endpoint http://127.0.0.1:8000 bounce-list
[
  {
    "id": "9a946198-9351-4e0e-b460-fc84e066878a",
    "campaign": null,
    "tenant": null,
    "domain": null,
    "reason": "boop",
    "duration": "4m 57s 313ms 891us 882ns"
  }
]
```

and cancel them:

```console
$ kcli --endpoint http://127.0.0.1:8000 bounce-cancel --id 9a946198-9351-4e0e-b460-fc84e066878a
removed 9a946198-9351-4e0e-b460-fc84e066878a
```

and the error case if you try it again:

```console
$ kcli --endpoint http://127.0.0.1:8000 bounce-cancel --id 9a946198-9351-4e0e-b460-fc84e066878a
Error: bounce entry 9a946198-9351-4e0e-b460-fc84e066878a not found
```
2023-06-12 10:11:53 -07:00

19 lines
550 B
TOML

[package]
name = "kcli"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
anyhow = "1.0"
clap = {version="4.1", features=["derive"]}
humantime = "2.1"
kumo-api-types = {path="../kumo-api-types"}
reqwest = {version="0.11", default-features=false, features=["json", "rustls-tls"]}
serde = {version="1.0", features=["derive"]}
serde_json = "1.0"
tokio = {version="1.25", features=["full", "tracing"]}
uuid = "1.3"
version-info = {path="../version-info"}