Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File storage class #61

Merged
merged 3 commits into from
Jul 26, 2023
Merged

File storage class #61

merged 3 commits into from
Jul 26, 2023

Conversation

necessarylion
Copy link
Member

@necessarylion necessarylion commented Jul 26, 2023

Add class for file storage with local storage driver

String filename = await Storage().put('images/avatar', bytes);

List<int>? bytes = await Storage().get('/images/avatar.png');

bool exists = await Storage().exists('/images/avatar.png');

await Storage().delete('/images/avatar.png');

DownloadableFile file = await Storage().download('/images/avatar.png');

StreamFile file = await Storage().stream('/images/avatar.png');

@github-actions
Copy link
Contributor

Coverage after merging file-storage into develop

67.63%

Coverage Report
FileBranchesFuncsLinesUncovered Lines
lib
   app.dart100%100%77.27%..., 86, 87, 91, 92
lib/cache
   cache.dart100%100%90.91%18, 19
   cache_driver_interface.dart100%100%0%6
lib/cache/drivers/file
   file_cache_driver.dart100%100%97.87%76
lib/env
   env.dart100%100%100%
lib/exception
   http_exception.dart100%100%100%
   internal_error_exception.dart100%100%100%
   not_found_exception.dart100%100%100%
   query_exception.dart100%100%100%
   unauthorized_exception.dart100%100%100%
   validation_exception.dart100%100%100%
lib/http
   http_controller_handler.dart100%100%89.47%18, 23, 25, 30
   http_cors_handler.dart100%100%87.50%29, 41
   http_error_handler.dart100%100%75%8
   http_response_handler.dart100%100%66.67%..., 50, 72, 73, 77
   http_request_handler.dart100%100%89.47%32, 37
   http_route_handler.dart100%100%83.78%..., 21, 22, 33, 34
   http_websocket_handler.dart100%100%75%15, 18
lib/http/request
   form_request.dart100%100%13.95%..., 92, 93, 97, 98
   dox_request.dart100%100%56.76%..., 230, 231, 233, 81
   request_file.dart100%100%0%..., 77, 81, 82, 9
   http_request_body.dart100%100%76.92%14, 15, 16
   form_data_visitor.dart100%100%0%..., 75, 78, 79, 82
lib/http/response
   dox_cookie.dart100%100%100%
   dox_response.dart100%100%79.41%..., 27, 28, 41, 42
   serializer.dart100%100%86.67%18, 19
lib/interfaces
   router.dart100%100%50%2
   app_config.dart100%100%18.18%..., 21, 27, 29, 62
   auth.dart100%100%0%14, 26, 5, 7
   dox_service.dart100%100%0%2
lib/ioc
   ioc_container.dart100%100%100%
lib/isolate
   dox_isolate.dart100%100%0%..., 47, 51, 52, 9
   isolate_handler.dart100%100%0%..., 6, 7, 8, 9
   isolate_interfaces.dart100%100%0%11
lib/router
   route.dart100%100%89.42%..., 94, 95, 96, 99
   route_data.dart100%100%100%
lib/server
   dox_server.dart100%100%93.75%35
lib/storage
   storage.dart100%100%0%..., 85, 86, 93, 94
   local_storage_driver.dart100%100%0%..., 53, 57, 58, 59
lib/utils
   logger.dart100%100%25%..., 48, 5, 51, 6
   aes_encryptor.dart100%100%100%
   extensions.dart100%100%100%
   hash.dart100%100%100%
   json.dart100%100%25%..., 15, 17, 8, 9
   utils.dart100%100%100%
lib/utils/extensions
   num.dart100%100%0%4, 5, 6
lib/validation
   dox_validator.dart100%100%93.02%102, 33, 38
   nested_validation_visitor.dart100%100%100%
   validation_item.dart100%100%100%
   validation_rules.dart100%100%78.57%..., 286, 95, 97, 98
lib/websocket
   socket_emitter.dart100%100%6.25%..., 56, 57, 59, 60
   dox_websocket.dart100%100%88%70, 78, 81
   socket_storage.dart100%100%89.29%60, 69, 70
   web_socket_info.dart100%100%100%

@necessarylion necessarylion merged commit 800bc22 into develop Jul 26, 2023
2 checks passed
@necessarylion necessarylion deleted the file-storage branch July 26, 2023 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant