Class: Deimos::SchemaBackends::Plain
- Inherits:
-
Base
- Object
- Base
- Deimos::SchemaBackends::Plain
show all
- Defined in:
- lib/deimos/schema_backends/plain.rb
Overview
Schema backend that passes through as a basic string.
Instance Attribute Summary
Attributes inherited from Base
#key_schema, #namespace, #schema
Instance Method Summary
collapse
Methods inherited from Base
#coerce, content_type, #decode, #encode, field_type, #initialize, #load_schema, mock_backend, #sql_type
Instance Method Details
#coerce_field(_field, value) ⇒ Object
32
33
34
|
# File 'lib/deimos/schema_backends/plain.rb', line 32
def coerce_field(_field, value)
value
end
|
#decode_key(payload, key_id) ⇒ Object
42
43
44
|
# File 'lib/deimos/schema_backends/plain.rb', line 42
def decode_key(payload, key_id)
payload[key_id]
end
|
#decode_payload(payload, schema:) ⇒ Object
13
14
15
|
# File 'lib/deimos/schema_backends/plain.rb', line 13
def decode_payload(payload, schema:)
payload
end
|
#encode_key(key_id, key, topic: nil) ⇒ Object
37
38
39
|
# File 'lib/deimos/schema_backends/plain.rb', line 37
def encode_key(key_id, key, topic: nil)
key
end
|
#encode_payload(payload, schema:, topic: nil) ⇒ Object
18
19
20
|
# File 'lib/deimos/schema_backends/plain.rb', line 18
def encode_payload(payload, schema:, topic: nil)
payload.to_s
end
|
#generate_key_schema(field_name) ⇒ Object
9
10
|
# File 'lib/deimos/schema_backends/plain.rb', line 9
def generate_key_schema(field_name)
end
|
#schema_fields ⇒ Object
27
28
29
|
# File 'lib/deimos/schema_backends/plain.rb', line 27
def schema_fields
[]
end
|
#validate(payload, schema:) ⇒ Object
23
24
|
# File 'lib/deimos/schema_backends/plain.rb', line 23
def validate(payload, schema:)
end
|