-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from yuce/cpmap-docs
CPMap Docs and 5.4.0 Release Notes
- Loading branch information
Showing
5 changed files
with
426 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,369 @@ | ||
= clc cpmap | ||
|
||
CPMap commands are a group of CPMap operations. | ||
|
||
Usage: | ||
|
||
[source,bash] | ||
---- | ||
clc cpmap [command] [flags] | ||
---- | ||
|
||
== Commands | ||
|
||
* <<clc-cpmap-compare-and-set, clc cpmap compare-and-set>> | ||
* <<clc-cpmap-delete, clc cpmap delete>> | ||
* <<clc-cpmap-destroy, clc cpmap destroy>> | ||
* <<clc-cpmap-get, clc cpmap get>> | ||
* <<clc-cpmap-put, clc cpmap put>> | ||
* <<clc-cpmap-remove, clc cpmap remove>> | ||
* <<clc-cpmap-set, clc cpmap set>> | ||
|
||
== clc cpmap compare-and-set | ||
|
||
Sets the value for the given key if it has the expected value. | ||
|
||
Usage: | ||
|
||
[source,bash] | ||
---- | ||
clc cpmap compare-and-set [key] [expected-value] [new-value] [flags] | ||
---- | ||
|
||
Parameters: | ||
|
||
[cols="1m,1a,2a,1a"] | ||
|=== | ||
|Parameter|Required|Description|Default | ||
|
||
|`--name`, `-n` | ||
|Optional | ||
|Name of the map. | ||
|`default` | ||
|
||
|`key` | ||
|Required | ||
|Key of the map entry. | ||
|N/A | ||
|
||
|`expected-value`, | ||
|Required | ||
|Value to set for the key. | ||
|N/A | ||
|
||
|`new-value`, | ||
|Required | ||
|Value to set for the key. | ||
|N/A | ||
|
||
|`--key-type`, `-k` | ||
|Optional | ||
|Data type of the key. One of: `string`, `bool`, `json`, `i8`, `i16`, `i32`, `i64`, `f32`, `f64` | ||
|string | ||
|
||
|`--value-type`, `-v` | ||
|Optional | ||
|Data type of the value. One of: `string`, `bool`, `json`, `i8`, `i16`, `i32`, `i64`, `f32`, `f64` | ||
|string | ||
|
||
|=== | ||
|
||
.Global parameters | ||
[%collapsible] | ||
==== | ||
include::partial$global-parameters.adoc[] | ||
==== | ||
|
||
== clc cpmap get | ||
|
||
Gets a value from the given CPMap. | ||
|
||
Usage: | ||
|
||
[source,bash] | ||
---- | ||
clc cpmap get [key] [flags] | ||
---- | ||
|
||
Parameters: | ||
|
||
[cols="1m,1a,2a,1a"] | ||
|=== | ||
|Parameter|Required|Description|Default | ||
|
||
|`--name`, `-n` | ||
|Optional | ||
|Name of the CPMap. | ||
|`default` | ||
|
||
|`key` | ||
|Required | ||
|Key of the CPMap entry. | ||
|N/A | ||
|
||
|`--key-type`, `-k` | ||
|Optional | ||
|Data type of the key. One of: `string`, `bool`, `json`, `i8`, `i16`, `i32`, `i64`, `f32`, `f64`. | ||
|string | ||
|
||
|=== | ||
|
||
.Global parameters | ||
[%collapsible] | ||
==== | ||
include::partial$global-parameters.adoc[] | ||
==== | ||
|
||
Example: | ||
|
||
[source,bash] | ||
---- | ||
clc cpmap get -n yearbook -k i16 2012 | ||
---- | ||
|
||
== clc cpmap set | ||
|
||
Sets a value in the given CPMap. | ||
|
||
Usage: | ||
|
||
[source,bash] | ||
---- | ||
clc cpmap set [key] [value] [flags] | ||
---- | ||
|
||
Parameters: | ||
|
||
[cols="1m,1a,2a,1a"] | ||
|=== | ||
|Parameter|Required|Description|Default | ||
|
||
|`--name`, `-n` | ||
|Optional | ||
|Name of the CPMap. | ||
|`default` | ||
|
||
|`key` | ||
|Required | ||
|Key of the CPMap entry. | ||
|N/A | ||
|
||
|`value`, | ||
|Required | ||
|Value to set for the key. | ||
|N/A | ||
|
||
|`--key-type`, `-k` | ||
|Optional | ||
|Data type of the key. One of: `string`, `bool`, `json`, `i8`, `i16`, `i32`, `i64`, `f32`, `f64` | ||
|string | ||
|
||
|`--value-type`, `-v` | ||
|Optional | ||
|Data type of the value. One of: `string`, `bool`, `json`, `i8`, `i16`, `i32`, `i64`, `f32`, `f64` | ||
|string | ||
|
||
|=== | ||
|
||
.Global parameters | ||
[%collapsible] | ||
==== | ||
include::partial$global-parameters.adoc[] | ||
==== | ||
|
||
Example: | ||
|
||
[source,bash] | ||
---- | ||
clc cpmap -n my-cpmap set -k string hello -v f32 19.94 | ||
---- | ||
|
||
|
||
== clc cpmap put | ||
|
||
Puts the given value in the given CPMap and returns the old value. | ||
|
||
Usage: | ||
|
||
[source,bash] | ||
---- | ||
clc cpmap put [key] [value] [flags] | ||
---- | ||
|
||
Parameters: | ||
|
||
[cols="1m,1a,2a,1a"] | ||
|=== | ||
|Parameter|Required|Description|Default | ||
|
||
|`--name`, `-n` | ||
|Optional | ||
|Name of the CPMap. | ||
|`default` | ||
|
||
|`key` | ||
|Required | ||
|Key of the CPMap entry. | ||
|N/A | ||
|
||
|`value`, | ||
|Required | ||
|Value to set for the key. | ||
|N/A | ||
|
||
|`--key-type`, `-k` | ||
|Optional | ||
|Data type of the key. One of: `string`, `bool`, `json`, `i8`, `i16`, `i32`, `i64`, `f32`, `f64` | ||
|string | ||
|
||
|`--value-type`, `-v` | ||
|Optional | ||
|Data type of the value. One of: `string`, `bool`, `json`, `i8`, `i16`, `i32`, `i64`, `f32`, `f64` | ||
|string | ||
|
||
|=== | ||
|
||
.Global parameters | ||
[%collapsible] | ||
==== | ||
include::partial$global-parameters.adoc[] | ||
==== | ||
|
||
Example: | ||
|
||
[source,bash] | ||
---- | ||
clc cpmap -n my-cpmap put -k string hello -v f32 19.94 | ||
---- | ||
|
||
== clc cpmap remove | ||
|
||
Removes the value of a given key in a CPMap and returns the old value. | ||
|
||
Usage: | ||
|
||
[source,bash] | ||
---- | ||
clc cpmap remove [flags] [key] | ||
---- | ||
|
||
Parameters: | ||
|
||
[cols="1m,1a,2a,1a"] | ||
|=== | ||
|Parameter|Required|Description|Default | ||
|
||
|`--name`, `-n` | ||
|Optional | ||
|Name of the map. | ||
|`default` | ||
|
||
|`key` | ||
|Required | ||
|Key of the map entry. | ||
|N/A | ||
|
||
|`--key-type`, `-k` | ||
|Optional | ||
|Data type of the key. One of: `string`, `bool`, `json`, `i8`, `i16`, `i32`, `i64`, `f32`, `f64` | ||
|string | ||
|
||
|=== | ||
|
||
.Global parameters | ||
[%collapsible] | ||
==== | ||
include::partial$global-parameters.adoc[] | ||
==== | ||
|
||
Example: | ||
|
||
[source,bash] | ||
---- | ||
clc cpmap remove --name my-cpmap --key-type string k1 | ||
k1 | ||
---- | ||
|
||
|
||
== clc cpmap delete | ||
|
||
Deletes the value of a given key in a CPMap. | ||
|
||
Usage: | ||
|
||
[source,bash] | ||
---- | ||
clc cpmap delete [flags] [key] | ||
---- | ||
|
||
Parameters: | ||
|
||
[cols="1m,1a,2a,1a"] | ||
|=== | ||
|Parameter|Required|Description|Default | ||
|
||
|`--name`, `-n` | ||
|Optional | ||
|Name of the map. | ||
|`default` | ||
|
||
|`key` | ||
|Required | ||
|Key of the map entry. | ||
|N/A | ||
|
||
|`--key-type`, `-k` | ||
|Optional | ||
|Data type of the key. One of: `string`, `bool`, `json`, `i8`, `i16`, `i32`, `i64`, `f32`, `f64` | ||
|string | ||
|
||
|=== | ||
|
||
.Global parameters | ||
[%collapsible] | ||
==== | ||
include::partial$global-parameters.adoc[] | ||
==== | ||
|
||
Example: | ||
|
||
[source,bash] | ||
---- | ||
clc cpmap delete --name my-cpmap --key-type string k1 | ||
k1 | ||
---- | ||
|
||
== clc cpmap destroy | ||
|
||
Deletes the CPMap and all the data in it. | ||
|
||
Usage: | ||
|
||
[source,bash] | ||
---- | ||
clc cpmap destroy [flags] | ||
---- | ||
|
||
Parameters: | ||
|
||
[cols="1m,1a,2a,1a"] | ||
|=== | ||
|Parameter|Required|Description|Default | ||
|
||
|`--name`, `-n` | ||
|Optional | ||
|Name of the map. | ||
|`default` | ||
|
||
|`--yes` | ||
|Optional | ||
|Skip confirming the destroy operation. | ||
|`false` | ||
|
||
|=== | ||
|
||
.Global parameters | ||
[%collapsible] | ||
==== | ||
include::partial$global-parameters.adoc[] | ||
==== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.