-
Notifications
You must be signed in to change notification settings - Fork 51
API endpoints for storing/retrieving license metadata #5631
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
Open
PhilBastian
wants to merge
10
commits into
master
Choose a base branch
from
licensed_endpoints
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
9c25972
update from max to average monthly throughput and fix calculation
PhilBastian 6936098
create endpoint for supplying endpoint details metadata
PhilBastian a2e0d83
create endpoint for uploading metadata file and handle persistence of…
PhilBastian cf51d11
validate endpoint metadata id and licenseid match
PhilBastian 46820a1
Merge branch 'master' into licensed_endpoints
PhilBastian d8ff460
implement in-memory version and placeholder for EF version
PhilBastian c5ff560
Merge branch 'master' into licensed_endpoints
PhilBastian 2c061ba
update api approval file
PhilBastian d17b304
fix average monthly throughput test
PhilBastian db1e4a0
test error text
PhilBastian File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/Particular.LicensingComponent.Contracts/LicensedEndpointDetails.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| namespace Particular.LicensingComponent.Contracts | ||
| { | ||
| public class LicensedEndpointDetails | ||
| { | ||
| public string? LicenseId { get; set; } | ||
| public LicensedEndpoint[] Endpoints { get; set; } = []; | ||
| public QueueIdentity[] InfrastructureQueues { get; set; } = []; | ||
| public QueueIdentity[] ExcludedQueues { get; set; } = []; | ||
| public string? ServiceEndDate { get; set; } | ||
| public Product[] Products { get; set; } = []; | ||
| public bool ValidId { get; set; } | ||
| } | ||
|
|
||
| public class Product | ||
| { | ||
| public string? ProductCode { get; set; } | ||
| public int? MonthlyThroughput { get; set; } | ||
| } | ||
|
|
||
| public class QueueIdentity | ||
| { | ||
| public string? NameHash { get; set; } | ||
| public string? Scope { get; set; } | ||
| } | ||
|
|
||
| public class LicensedEndpoint | ||
| { | ||
| public string? Name { get; set; } | ||
| public int? Classification { get; set; } | ||
| public string? EndpointSize { get; set; } | ||
| public QueueIdentity[] Queues { get; set; } = []; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| namespace ServiceControl.Licensing | ||
| { | ||
| using ServiceControl.LicenseManagement; | ||
|
|
||
| public class LicenseInfo | ||
| { | ||
| public bool TrialLicense { get; set; } | ||
|
|
||
| public string Edition { get; set; } | ||
|
|
||
| public string RegisteredTo { get; set; } | ||
|
|
||
| public string UpgradeProtectionExpiration { get; set; } | ||
|
|
||
| public string ExpirationDate { get; set; } | ||
|
|
||
| public string Status { get; set; } | ||
|
|
||
| public LicensedProduct[] Products { get; set; } | ||
|
|
||
| public string LicenseType { get; set; } | ||
|
|
||
| public string InstanceName { get; set; } | ||
|
|
||
| public string LicenseStatus { get; set; } | ||
|
|
||
| public string LicenseExtensionUrl { get; set; } | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably don't need the Base64 conversion when we aren't embedding details in the license file.
That means we could hook the BrotliStream directly to the fileStream.
It may be worth trying to pass that into the deserializer as well. That way we avoid creating big in-memory string objects.