aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Options.cs
diff options
context:
space:
mode:
authorMirta <mirta@twine-s.com>2020-11-23 16:13:53 +0200
committerMirta <mirta@twine-s.com>2020-11-23 16:13:53 +0200
commit91c007adced573e09b77ab4be4a5aba623a816cc (patch)
tree250221fc2def7d59f1393be8394f766faf576656 /Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Options.cs
parent4e9af2b852eb3b9eecfa09e9bc76869558e183cb (diff)
parent50a3c0b857b4aa88a9e3970d69256f12b5b24eb8 (diff)
downloadTango-91c007adced573e09b77ab4be4a5aba623a816cc.tar.gz
Tango-91c007adced573e09b77ab4be4a5aba623a816cc.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Options.cs')
-rw-r--r--Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Options.cs68
1 files changed, 68 insertions, 0 deletions
diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Options.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Options.cs
new file mode 100644
index 000000000..fd91a5722
--- /dev/null
+++ b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Options.cs
@@ -0,0 +1,68 @@
+using CommandLine;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.DataStore.Web;
+using Tango.Web;
+
+namespace Tango.DataStore.CLI
+{
+ public class OptionsBase
+ {
+ [Option(longName: "email", HelpText = "Email address.")]
+ public String Email { get; set; }
+
+ [Option(longName: "password", HelpText = "Password.")]
+ public String Password { get; set; }
+
+ [Option(longName: "env", HelpText = "The target environment.", Required = true)]
+ public DeploymentSlot Environment { get; set; }
+ }
+
+ [Verb("get", HelpText = "Get a data store item.")]
+ public class GetOptions : OptionsBase
+ {
+ [Option(longName: "sn", HelpText = "Machine serial number. if not specified will return only global values.")]
+ public String MachineSerialNumber { get; set; }
+
+ [Option(longName: "collection", HelpText = "Collection name.\nIf not specified will return all collections.\nIf 'key' if specified the 'collection' must be specified.")]
+ public String Collection { get; set; }
+
+ [Option(longName: "key", HelpText = "Item key. If not specified will return the entire collection.")]
+ public String Key { get; set; }
+ }
+
+ [Verb("put", HelpText = "Put a new, or update an existing data store item.")]
+ public class PutOptions : OptionsBase
+ {
+ [Option(longName: "sn", HelpText = "Machine serial number. If not specified will put a value on the global data store.")]
+ public String MachineSerialNumber { get; set; }
+
+ [Option(longName: "collection", HelpText = "New or existing collection name.", Required = true)]
+ public String Collection { get; set; }
+
+ [Option(longName: "key", HelpText = "New or existing item key", Required = true)]
+ public String Key { get; set; }
+
+ [Option(longName: "data-type", HelpText = "Item data type", Required = true)]
+ public Web.DataType DataType { get; set; }
+
+ [Option(longName: "proto-type", HelpText = "Protobuf message type when data-type is 'Proto'.")]
+ public MessageType ProtoMessageType { get; set; }
+
+ [Option(longName: "value", HelpText = "Item value", Required = true)]
+ public String Value { get; set; }
+ }
+
+ [Verb("login-config", HelpText = "Stores the specified credentials for use with the --auto-login flag.")]
+ public class LoginConfig
+ {
+ [Option(longName: "email", HelpText = "Email address.")]
+ public String Email { get; set; }
+
+ [Option(longName: "password", HelpText = "Password.")]
+ public String Password { get; set; }
+ }
+}