Git Product home page Git Product logo

maester-client's Issues

Finalize and productify v4

Platform team requirements:

  • Nightly tests in CI.
  • Disable dev dependencies check during audit.
  • Version should adhere to semver rules. Breaking change - new major version.
  • All tests from object-storage-client must be present here. Especially which cover some edge cases (like passing the same stream on retry).
  • Exponential back-off like in object-storage-client.
  • All errors should be handled like in latest object-storage-client. Now they don't. E.g. I don't see Client error handler.

Now related to how our services are using the lib (I didn't check you PR in details and not sure you saved these features, most likely you did):

  • We should be able to create an instance to make add/update/delete requests. The instance should accept maester uri and jwtSecret.
  • Each method that modifies DB object should accept ttl. ttl can have -1 value.
  • There should be ability to add stream for encrypt/decrypt.
  • There should be ability to GET object as stream with specified jwt payload.
  • There should be ability to PUT as stream with retries: 0.
  • There should be ability to PUT with custom ttl and contentType (we get it from webhook request headers).
  • There should be ability to POST a json object.
  • There should be ability to GET object as json object.
  • There should be ability to DELETE an object by ID.

Refactor duplicate code for metadata header x-meta-

Looks like it is a duplicate for one functionality:
https://github.com/elasticio/maester-client/blob/master/src/object.ts#L170

        if (params?.objectFields) {
            Object.entries(params.objectFields).forEach(e => {
                if (e[1].Query) headers[`X-Query-${e[0]}`] = e[1].Query;
                if (e[1].Meta) headers[`X-Meta-${e[0]}`] = e[1].Meta;
            })
        }

and
https://github.com/elasticio/maester-client/blob/master/src/object.ts#L24

export function metaToHeaders(meta: ObjectMetadata): Record<string, string> {
    const headers: Record<string, string> = {};
    for (const [key, value] of Object.entries(meta)) {
        headers[`${USER_META_HEADER_PREFIX}${key}`] = String(value);
    }
    return headers;
}

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.