os-threat / Stix-ORM

GNU Affero General Public License v3.0
4 stars 0 forks source link

Reorganise TypeDBSource/TypeDBSink 4: Mehod for Result and Error Handling #36

Open brettforbes opened 10 months ago

brettforbes commented 10 months ago

1. TypeDB Objects Should Look like

  1. TypeDBSink:

    • add(data) -> add function, where data is a list, dict or bundle
  2. TypeDBSource:

    • clear_db() -> clear all except for marking objects
    • delete(stix-id) -> delete the object with the stix-id
    • get_stix_ids() - get all of the ids in the db except for marking
    • get(stix-id) - get a single stix object with the id
    • get_list(stix_id_list) -> get a list of stix objects based on a list of stix-ids (parallelised)
    • get_objects(obj, properties, embedded, sub_prop, import_type): - > get a set of objects of a type, based on constraints
  3. TypeDBStore:

    • all methods for the mixin class

2. Task for this Issue

A method is needed to handle returned results, unexpected conditions and errors for all class methods