Class: Dscli::OutputParams

Inherits:
Object
  • Object
show all
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

Instance Method Details

#aclObject



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_hostnameObject



19
20
21
# File 'lib/dscli/outputParams.rb', line 19

def api_hostname
  ask 'Splunk Storm REST API host'
end

#auth_access_keyObject



23
24
25
# File 'lib/dscli/outputParams.rb', line 23

def auth_access_key
  ask 'AWS access key'
end

#auth_access_tokenObject



27
28
29
# File 'lib/dscli/outputParams.rb', line 27

def auth_access_token
  ask 'Splunk Storm REST access token'
end

#auth_passwordObject



31
32
33
# File 'lib/dscli/outputParams.rb', line 31

def auth_password
  ask 'Authentication password'
end

#auth_secret_keyObject



35
36
37
# File 'lib/dscli/outputParams.rb', line 35

def auth_secret_key
  ask 'AWS secret key'
end

#auth_typeObject



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_usernameObject



39
40
41
# File 'lib/dscli/outputParams.rb', line 39

def auth_username
  ask 'Authentication username'
end

#bucketObject



47
48
49
# File 'lib/dscli/outputParams.rb', line 47

def bucket
  ask 'Bucket name'
end

#collection_nameObject



51
52
53
# File 'lib/dscli/outputParams.rb', line 51

def collection_name
  ask 'MongoDB Collection name'
end

#databaseObject



55
56
57
# File 'lib/dscli/outputParams.rb', line 55

def database
  ask 'Numeric ID of your existing Redis database'
end

#db_nameObject



59
60
61
# File 'lib/dscli/outputParams.rb', line 59

def db_name
  ask 'Database name'
end

#delivery_frequencyObject



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

#directoryObject



67
68
69
# File 'lib/dscli/outputParams.rb', line 67

def directory
  ask 'Directory'
end

#file_prefixObject



71
72
73
# File 'lib/dscli/outputParams.rb', line 71

def file_prefix
  ask 'Optional filename prefix', default: 'DataSift'
end

#formatObject



75
76
77
# File 'lib/dscli/outputParams.rb', line 75

def format
  ask 'Output format', choices: FORMATS.each, indexed: true
end

#hostObject



79
80
81
# File 'lib/dscli/outputParams.rb', line 79

def host
  ask 'The host to connect to'
end

#listObject



83
84
85
# File 'lib/dscli/outputParams.rb', line 83

def list
  ask 'Name of a Redis list to stores interactions'
end

#max_sizeObject



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

#methodObject



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

#portObject



96
97
98
# File 'lib/dscli/outputParams.rb', line 96

def port
  ask 'Port on the remote machine'
end

#project_idObject



100
101
102
# File 'lib/dscli/outputParams.rb', line 100

def project_id
  ask 'ID of your Splunk Storm REST project'
end

#regionObject



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_passwordObject



108
109
110
# File 'lib/dscli/outputParams.rb', line 108

def server_level_auth_password
  ask 'Server-level authentication password'
end

#server_level_auth_usernameObject



112
113
114
# File 'lib/dscli/outputParams.rb', line 112

def server_level_auth_username
  ask 'Server-level authentication username'
end

#sourceObject



116
117
118
# File 'lib/dscli/outputParams.rb', line 116

def source
  ask 'Label used to mark data delivered to Zoomdata'
end

#tableObject



120
121
122
# File 'lib/dscli/outputParams.rb', line 120

def table
  ask 'Name of the table to use'
end

#typeObject



124
125
126
# File 'lib/dscli/outputParams.rb', line 124

def type
  ask 'The type that you want to use for the index'
end

#urlObject



128
129
130
# File 'lib/dscli/outputParams.rb', line 128

def url
  ask 'The URL to post data to'
end

#use_gzipObject



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

#use_sslObject



136
137
138
# File 'lib/dscli/outputParams.rb', line 136

def use_ssl
  ask 'Use SSL?', choices: BOOL.each, indexed: true, default: BOOL.last
end

#verify_sslObject



140
141
142
# File 'lib/dscli/outputParams.rb', line 140

def verify_ssl
  ask 'Verify SSL certificate?', choices: BOOL.each, indexed: true, default: BOOL.last
end