Giter Club home page Giter Club logo

rdm-native-value-formatters's Introduction

RedisDesktopManager Native Value Formatters

91f4b202-89a4-11e5-8446-b34f21ee9152

Advantages:

  • Plugin can be developed by any software engineer (Java/C++/C#/Python/PHP/Node.js etc)
  • Plugin can be easily debugged

How to implement native value formatter

  1. Create directory with meaningful name. Name of the directory will be used as formatter name.
  2. Implement script or executable which meets protocol described below.
  3. Add file usage.json with usage shell command
    For example for python script it will be: ['python', 'my_super_formatter.py']
  4. Test your formatter in RDM!

Protocol

Formatter info:

CMD: <executable> info STDOUT (json):

{
    "version": "1.0.0",
    "description": "Formatter description"
}

Validate:

CMD: <executable> validate STDIN: <binary-data-encoded-with-base64> STDOUT (json):

{    
    “valid”: “false”,    
    “error”: “input is not gziped data” // if valid is false
}

Decode binary data:

CMD: <executable> decode STDIN: <binary-data-encoded-with-base64> STDOUT (json):

{
    “output”: “<decoded data for human-friendly edit>”,
    “read-only”: “false”,    
    “format”: “plain_text” // or “json”
}

Encode string-representation

Required only for formatters which return “read-only”: false in decode method

CMD: <executable> encode STDIN : <edited-string-representation-encoded-with-base64> STDOUT (json):

{
    “output”: “<binary-data-encoded-with-base64>”,    
}

Error handling:

If formatter cannot decode/encode value error response should be returned:

OUT (json):

{
    “error”: “Invalid CBOR data”,    
}

rdm-native-value-formatters's People

Contributors

uglide avatar mrnom avatar benjaminleseur avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.