-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changes to onboarding token to include subjectRole in body
Signed-off-by: Rewant Soni <resoni@redhat.com>
- Loading branch information
1 parent
27b0ae9
commit 1c07f07
Showing
5 changed files
with
93 additions
and
38 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 |
---|---|---|
@@ -1,7 +1,28 @@ | ||
package services | ||
|
||
type OnboardingSubjectRole string | ||
|
||
type OnboardingSubjectRoleSpec struct { | ||
Role OnboardingSubjectRole `json:"role"` | ||
ClientOptions ClientRoleOptions `json:"clientRoleOptions,omitempty"` | ||
PeerOptions PeerRoleOptions `json:"peerRoleOptions,omitempty"` | ||
} | ||
|
||
const ( | ||
ClientRole OnboardingSubjectRole = "ocs-client" | ||
PeerRole OnboardingSubjectRole = "ocs-peer" | ||
) | ||
|
||
type ClientRoleOptions struct { | ||
StorageQuotaInGiB uint `json:"storageQuotaInGiB,omitempty"` | ||
} | ||
|
||
type PeerRoleOptions struct{} | ||
|
||
type OnboardingTicket struct { | ||
ID string `json:"id"` | ||
ExpirationDate int64 `json:"expirationDate,string"` | ||
StorageQuotaInGiB uint `json:"storageQuotaInGiB,omitempty"` | ||
ID string `json:"id"` | ||
ExpirationDate int64 `json:"expirationDate,string"` | ||
|
||
// SubjectRole specifies the role and options for the role | ||
SubjectRole OnboardingSubjectRoleSpec `json:"subjectRole"` | ||
} |
This file contains 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