Skip to content

Add privacy methods to the TrackerMode enum#871

Merged
josecelano merged 3 commits intotorrust:developfrom
josecelano:870-align-trackermode-with-index
May 21, 2024
Merged

Add privacy methods to the TrackerMode enum#871
josecelano merged 3 commits intotorrust:developfrom
josecelano:870-align-trackermode-with-index

Conversation

@josecelano
Copy link
Copy Markdown
Member

@josecelano josecelano commented May 17, 2024

The tracker mode can be:

  • Public (Non-whitelisted)
  • Listed (Whitelisted)
  • Private (Non-whitelisted)
  • PrivateListed (Whitelisted)

There should have been two different flags (in my opinion):

  • Visibility: public or private
  • Whitelisted: true or false

So we would have the same four combinations:

  • Not whitelisted:
    • Public
    • Private
  • Whitelisted
    • Public
    • Private

That's a pending refactor. For this PR, the goal is just to align this enum with what we added to the Index so we can use it in the Index via the primitive crate.

See https://github.com/torrust/torrust-index/blob/develop/src/config.rs#L140-L171

@josecelano josecelano self-assigned this May 17, 2024
@josecelano josecelano added this to the v3.0.0 milestone May 17, 2024
@josecelano josecelano linked an issue May 17, 2024 that may be closed by this pull request
@josecelano
Copy link
Copy Markdown
Member Author

josecelano commented May 17, 2024

ACK 08179e3

@josecelano josecelano requested a review from da2ce7 May 17, 2024 14:51
@codecov
Copy link
Copy Markdown

codecov bot commented May 17, 2024

Codecov Report

Attention: Patch coverage is 7.40741% with 25 lines in your changes are missing coverage. Please review.

Project coverage is 78.62%. Comparing base (d4eaea9) to head (0c9da2f).

Files Patch % Lines
packages/primitives/src/lib.rs 3.84% 25 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #871      +/-   ##
===========================================
- Coverage    78.83%   78.62%   -0.21%     
===========================================
  Files          170      170              
  Lines         9394     9419      +25     
===========================================
  Hits          7406     7406              
- Misses        1988     2013      +25     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@josecelano josecelano added the Needs Rebase Base Branch has Incompatibilities label May 20, 2024
The tracker mode can be:

- Public (Non-whitelisted)
- Listed (Whitelisted)
- Private (Non-whitelisted)
- PrivateListed (Whitelisted)

They should have been two different flags (in my opinion):

- Visibility: public or private
- Whitelisted: true or false

So we would have the same four convinations:

- Not whitelisted:
 - Public
 - Private
- Whitelisted
 - Public
 - Private

That's a pending refactor. For this commits, the goal is just to align
this enum with what we added to the Index so we can use this enum in the
Index via the primmitives crate.
@josecelano josecelano force-pushed the 870-align-trackermode-with-index branch from 08179e3 to 0c9da2f Compare May 21, 2024 15:16
@josecelano
Copy link
Copy Markdown
Member Author

ACK 0c9da2f

@josecelano josecelano merged commit b92401f into torrust:develop May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Rebase Base Branch has Incompatibilities

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Align TrackerMode with Index

1 participant