Class: Dscli::OutputParams
- Inherits:
-
Object
- Object
- Dscli::OutputParams
- Includes:
- Interactive
- Defined in:
- lib/dscli/outputParams.rb
Constant Summary collapse
- FORMATS =
['json_new_line', 'json_meta', 'json_array']
- S3_ACL =
['private', 'public-read', 'public-read-write', 'authenticated-read', 'bucket-owner-read', 'bucket-owner-full-control']
- HTTP_AUTH_TYPE =
['none', 'basic']
- DELIVERY_FREQUENCY =
[0, 10, 30, 60, 300]
- MAX_SIZE =
['100KB', '250KB', '500KB', '1MB', '2MB', '5MB', '10MB', '20MB']
- HTTP_METHOD =
['POST', 'PUT']
- BOOL =
['true', 'false']
Instance Method Summary collapse
- #acl ⇒ Object
- #api_hostname ⇒ Object
- #auth_access_key ⇒ Object
- #auth_access_token ⇒ Object
- #auth_password ⇒ Object
- #auth_secret_key ⇒ Object
- #auth_type ⇒ Object
- #auth_username ⇒ Object
- #bucket ⇒ Object
- #collection_name ⇒ Object
- #database ⇒ Object
- #db_name ⇒ Object
- #delivery_frequency ⇒ Object
- #directory ⇒ Object
- #file_prefix ⇒ Object
- #format ⇒ Object
- #host ⇒ Object
- #list ⇒ Object
- #max_size ⇒ Object
- #method ⇒ Object
- #port ⇒ Object
- #project_id ⇒ Object
- #region ⇒ Object
- #server_level_auth_password ⇒ Object
- #server_level_auth_username ⇒ Object
- #source ⇒ Object
- #table ⇒ Object
- #type ⇒ Object
- #url ⇒ Object
- #use_gzip ⇒ Object
- #use_ssl ⇒ Object
- #verify_ssl ⇒ Object
Instance Method Details
#acl ⇒ Object
15 16 17 |
# File 'lib/dscli/outputParams.rb', line 15 def acl ask 'ACL', choices: S3_ACL.each, indexed: true, default: S3_ACL.first end |
#api_hostname ⇒ Object
19 20 21 |
# File 'lib/dscli/outputParams.rb', line 19 def api_hostname ask 'Splunk Storm REST API host' end |
#auth_access_key ⇒ Object
23 24 25 |
# File 'lib/dscli/outputParams.rb', line 23 def auth_access_key ask 'AWS access key' end |
#auth_access_token ⇒ Object
27 28 29 |
# File 'lib/dscli/outputParams.rb', line 27 def auth_access_token ask 'Splunk Storm REST access token' end |
#auth_password ⇒ Object
31 32 33 |
# File 'lib/dscli/outputParams.rb', line 31 def auth_password ask 'Authentication password' end |
#auth_secret_key ⇒ Object
35 36 37 |
# File 'lib/dscli/outputParams.rb', line 35 def auth_secret_key ask 'AWS secret key' end |
#auth_type ⇒ Object
43 44 45 |
# File 'lib/dscli/outputParams.rb', line 43 def auth_type ask 'Auth type', choices: HTTP_AUTH_TYPE.each, indexed: true, default: HTTP_AUTH_TYPE.first end |
#auth_username ⇒ Object
39 40 41 |
# File 'lib/dscli/outputParams.rb', line 39 def auth_username ask 'Authentication username' end |
#bucket ⇒ Object
47 48 49 |
# File 'lib/dscli/outputParams.rb', line 47 def bucket ask 'Bucket name' end |
#collection_name ⇒ Object
51 52 53 |
# File 'lib/dscli/outputParams.rb', line 51 def collection_name ask 'MongoDB Collection name' end |
#database ⇒ Object
55 56 57 |
# File 'lib/dscli/outputParams.rb', line 55 def database ask 'Numeric ID of your existing Redis database' end |
#db_name ⇒ Object
59 60 61 |
# File 'lib/dscli/outputParams.rb', line 59 def db_name ask 'Database name' end |
#delivery_frequency ⇒ Object
63 64 65 |
# File 'lib/dscli/outputParams.rb', line 63 def delivery_frequency ask 'Delivery frequency (seconds)', choices: DELIVERY_FREQUENCY.each, indexed: true, default: DELIVERY_FREQUENCY.first end |
#directory ⇒ Object
67 68 69 |
# File 'lib/dscli/outputParams.rb', line 67 def directory ask 'Directory' end |
#file_prefix ⇒ Object
71 72 73 |
# File 'lib/dscli/outputParams.rb', line 71 def file_prefix ask 'Optional filename prefix', default: 'DataSift' end |
#format ⇒ Object
75 76 77 |
# File 'lib/dscli/outputParams.rb', line 75 def format ask 'Output format', choices: FORMATS.each, indexed: true end |
#host ⇒ Object
79 80 81 |
# File 'lib/dscli/outputParams.rb', line 79 def host ask 'The host to connect to' end |
#list ⇒ Object
83 84 85 |
# File 'lib/dscli/outputParams.rb', line 83 def list ask 'Name of a Redis list to stores interactions' end |
#max_size ⇒ Object
87 88 89 90 |
# File 'lib/dscli/outputParams.rb', line 87 def max_size max_size = ask 'Max delivery size', choices: MAX_SIZE.each, indexed: true, default: MAX_SIZE.last human_size_to_number(max_size) end |
#method ⇒ Object
92 93 94 |
# File 'lib/dscli/outputParams.rb', line 92 def method ask 'HTTP request type', choices: HTTP_METHOD.each, indexed: true, default: HTTP_METHOD.first end |
#port ⇒ Object
96 97 98 |
# File 'lib/dscli/outputParams.rb', line 96 def port ask 'Port on the remote machine' end |
#project_id ⇒ Object
100 101 102 |
# File 'lib/dscli/outputParams.rb', line 100 def project_id ask 'ID of your Splunk Storm REST project' end |
#region ⇒ Object
104 105 106 |
# File 'lib/dscli/outputParams.rb', line 104 def region ask 'AWS region the destination table is set up in' end |
#server_level_auth_password ⇒ Object
108 109 110 |
# File 'lib/dscli/outputParams.rb', line 108 def server_level_auth_password ask 'Server-level authentication password' end |
#server_level_auth_username ⇒ Object
112 113 114 |
# File 'lib/dscli/outputParams.rb', line 112 def server_level_auth_username ask 'Server-level authentication username' end |
#source ⇒ Object
116 117 118 |
# File 'lib/dscli/outputParams.rb', line 116 def source ask 'Label used to mark data delivered to Zoomdata' end |
#table ⇒ Object
120 121 122 |
# File 'lib/dscli/outputParams.rb', line 120 def table ask 'Name of the table to use' end |
#type ⇒ Object
124 125 126 |
# File 'lib/dscli/outputParams.rb', line 124 def type ask 'The type that you want to use for the index' end |
#url ⇒ Object
128 129 130 |
# File 'lib/dscli/outputParams.rb', line 128 def url ask 'The URL to post data to' end |
#use_gzip ⇒ Object
132 133 134 |
# File 'lib/dscli/outputParams.rb', line 132 def use_gzip ask 'Use GZip?', choices: BOOL.each, indexed: true, default: BOOL.last end |