Class: Rex::Proto::Thrift::ThriftData

Inherits:
BinData::Record
  • Object
show all
Defined in:
lib/rex/proto/thrift.rb,
lib/rex/proto/thrift.rb

Overview

forward definition

Class Method Summary collapse

Class Method Details

.boolean(field_id, value) ⇒ Object

Short hand method for defining a boolean field



146
147
148
# File 'lib/rex/proto/thrift.rb', line 146

def self.boolean(field_id, value)
  { data_type: ThriftDataType::T_BOOLEAN, field_id: field_id, data_value: value }
end

.i16(field_id, value) ⇒ Object



150
151
152
# File 'lib/rex/proto/thrift.rb', line 150

def self.i16(field_id, value)
  { data_type: ThriftDataType::T_I16, field_id: field_id, data_value: value }
end

.i32(field_id, value) ⇒ Object



154
155
156
# File 'lib/rex/proto/thrift.rb', line 154

def self.i32(field_id, value)
  { data_type: ThriftDataType::T_I32, field_id: field_id, data_value: value }
end

.i64(field_id, value) ⇒ Object



158
159
160
# File 'lib/rex/proto/thrift.rb', line 158

def self.i64(field_id, value)
  { data_type: ThriftDataType::T_I64, field_id: field_id, data_value: value }
end

.list(field_id, data_type, value) ⇒ Object



162
163
164
# File 'lib/rex/proto/thrift.rb', line 162

def self.list(field_id, data_type, value)
  { data_type: ThriftDataType::T_LIST, field_id: field_id, data_value: { data_type: data_type, members: value } }
end

.set(field_id, data_type, value) ⇒ Object



166
167
168
# File 'lib/rex/proto/thrift.rb', line 166

def self.set(field_id, data_type, value)
  { data_type: ThriftDataType::T_SET, field_id: field_id, data_value: { data_type: data_type, members: value } }
end

.stopObject



170
171
172
# File 'lib/rex/proto/thrift.rb', line 170

def self.stop
  { data_type: ThriftDataType::T_STOP }
end

.struct(field_id, value) ⇒ Object



174
175
176
# File 'lib/rex/proto/thrift.rb', line 174

def self.struct(field_id, value)
  { data_type: ThriftDataType::T_STRUCT, field_id: field_id, data_value: value }
end

.utf7(field_id, value) ⇒ Object



178
179
180
# File 'lib/rex/proto/thrift.rb', line 178

def self.utf7(field_id, value)
  { data_type: ThriftDataType::T_UTF7, field_id: field_id, data_value: value }
end