meta
Subcommands for reading and writing artifact metadata.
| Name | Summary |
|---|---|
get |
gest artifact meta get: get a metadata value from an artifact by dot-delimited path. |
set |
gest artifact meta set: set a metadata value on an artifact at a dot-delimited path. |
unset |
gest artifact meta unset: remove a metadata value from an artifact at a dot-delimited path. |
struct Command
pub struct CommandRead or write artifact metadata fields.
| Field | Type | Description |
|---|---|---|
id |
Option<String> | The artifact ID or prefix (used when no subcommand is given). |
subcommand |
Option<Sub> | The subcommand to run; with none, the command shows all the metadata of id. |
output |
json::Flags | The output mode: normal, --json, --quiet or --raw. |
Implements FromArgMatches, Args, Debug.
Command::call
pub async fn call(&self, context: &AppContext) -> Result<(), Error>Dispatch to the matched artifact meta subcommand, or show all the metadata of id.
| Parameter | Type | Description |
|---|---|---|
context |
&AppContext | the application context: settings, store and current project |
| returns | Result<(), Error> | The result of the subcommand; with none, the result of showing the metadata, or Error::Argument when id is missing. |
enum Sub
enum SubThe subcommands of gest artifact meta, one variant for each.
| Variant | Description |
|---|---|
Get(get::Command) |
Get a metadata value by dot-delimited path. |
Set(set::Command) |
Set a metadata value at a dot-delimited path. |
Unset(unset::Command) |
Remove a metadata value at a dot-delimited path. |
Implements Debug, FromArgMatches, Subcommand.