Giter Site home page Giter Site logo

zio-google-cloud-storage's People

Contributors

jkobejs avatar

Watchers

 avatar

zio-google-cloud-storage's Issues

Implement missing object and bucket API

Add support for API optional query parameters

Provide access token as API method parameter wrapped in ZIO

Provide access token as API method parameter wrapped in ZIO


Motivation

zio-google-cloud-storage currently depends on zio-google-cloud-oauth2 library and uses it to get access token to perform HTTP calls when API methods are called.

Imagine that user wants to list bucket content to get stream of storage objects and then for every object download it. For bucket with N storage objects that means that we need to perform authentication at least N times. Since one access tokens can be used for 1h it should be cached for <1h to reduce HTTP calls to google servers.
To reduce number of HTTP calls to auth servers we can do following:

  1. cache access tokens internally
  2. leave caching to user and and new parameter to API methods accessToken: ZIO[R, AuthError, String]

Opting for caching access token internally means that user will be able to use only one service account to access his cloud storage when using storage service. If user has many service accounts used in different projects user will need to create many Storages and keep track of them to use library properly.

Caching should be left to user and described in documentation with an example how perform authentication and cache it to use in API calls.


Remove zio-google-cloud-oauth2 dependency and add new parameter to storage API methods that will be description of effectful authentication to google servers, accessToken: ZIO[R, AuthError, String]

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.