-
-
Notifications
You must be signed in to change notification settings - Fork 731
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Decode rolesrights and vehicle status
- Loading branch information
Showing
6 changed files
with
177 additions
and
120 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package vw | ||
|
||
const StatusService = "statusreport_v1" | ||
|
||
// RolesRights is the /rolesrights/operationlist response | ||
type RolesRights struct { | ||
OperationList struct { | ||
VIN, UserId, Role, Status string | ||
ServiceInfo []ServiceInfo | ||
} | ||
} | ||
|
||
func (rr RolesRights) ServiceByID(id string) *ServiceInfo { | ||
for _, s := range rr.OperationList.ServiceInfo { | ||
if s.ServiceId == id { | ||
return &s | ||
} | ||
} | ||
return nil | ||
} | ||
|
||
// ServiceInfo is the rolesrights service information | ||
type ServiceInfo struct { | ||
ServiceId string | ||
ServiceType string | ||
ServiceStatus struct { | ||
Status string | ||
} | ||
LicenseRequired bool | ||
CumulatedLicense map[string]interface{} | ||
PrimaryUserRequired bool | ||
TermsAndConditionsRequired bool | ||
ServiceEol string | ||
RolesAndRightsRequired bool | ||
InvocationUrl struct { | ||
Content string | ||
} | ||
Operation []map[string]interface{} | ||
} |
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