Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Feature/file events #17

Merged
merged 10 commits into from Mar 13, 2019
Merged

Feature/file events #17

merged 10 commits into from Mar 13, 2019

Conversation

dtitov
Copy link
Contributor

@dtitov dtitov commented Mar 13, 2019

Describe the pull request:

  • Bug fix
  • Functional change
  • New feature
  • Code cleanup
  • Build system change
  • Documentation change
  • Language translation

Pull request long description:

Now we track events and send messages about them:

  • File uploaded.
  • File moved/renamed.
  • File removed.

JSON body (as per @silverdaz):

{
                  'user': <str>,
              'filepath': <str>,
             'operation': ('upload' | 'remove' | 'rename' ),
              'filesize': <num>,
               'oldpath': <str>, // Ignored if not "rename"
    'file_last_modified': <num>, // a UNIX timestamp
   'encrypted_checksums': [{ 'type': <str>, 'value': <checksum as HEX> },
                           { 'type': <str>, 'value': <checksum as HEX> },
                            ...
                          ]
 }
The checksum algorithm type is 'md5', or 'sha256'.
'sha256' is prefered.

Related issues:

Fixes #16

@dtitov dtitov added the enhancement New feature or request label Mar 13, 2019
@dtitov dtitov self-assigned this Mar 13, 2019
@dtitov dtitov requested a review from silverdaz March 13, 2019 10:58
@coveralls
Copy link

coveralls commented Mar 13, 2019

Pull Request Test Coverage Report for Build 128

  • 33 of 35 (94.29%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+1.2%) to 73.541%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/main/java/se/nbis/lega/inbox/sftp/InboxSftpEventListener.java 33 35 94.29%
Totals Coverage Status
Change from base Build 112: 1.2%
Covered Lines: 189
Relevant Lines: 257

💛 - Coveralls

@dtitov dtitov requested a review from amgadhanafy March 13, 2019 12:25
Copy link
Contributor

@amgadhanafy amgadhanafy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check for possible static import, to make the lines shorter and more readable

@dtitov dtitov merged commit 9875998 into master Mar 13, 2019
@dtitov dtitov deleted the feature/file-events branch March 13, 2019 15:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Notify CEGA not only about files uploads, but also about other events
3 participants