-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
allan
committed
Jan 27, 2023
1 parent
2bb86ee
commit a06312a
Showing
8 changed files
with
111 additions
and
107 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package device |
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 device | ||
|
||
type BaseResponseDeviceInfo struct { | ||
Responses []ResponseDeviceInfo | ||
} | ||
|
||
/* | ||
{ | ||
"_id": "[Device ID]", | ||
"type": "gateway", | ||
"ip": "127.0.0.1", | ||
"name": "Haivision Gateway", | ||
"lastConnectedAt": [Date/time shown in Unix time], | ||
"statusCode": "ok", | ||
"status": "Online", | ||
"statusDetails": "Connection has been established in the last 1 minutes.", | ||
"serialNumber": null, | ||
"firmware": "5.0.180611.1530", | ||
"hasAdminError": false, | ||
"pendingSync": false, | ||
"lastConnection": "<1m" | ||
} | ||
*/ | ||
type ResponseDeviceInfo struct { | ||
ID string `json:"_id" validate:"nonzero"` | ||
Type string `json:"type" validate:"nonzero"` | ||
IP string `json:"ip" validate:"nonzero"` | ||
Name string `json:"name" validate:"nonzero"` | ||
LastConnectedAt int64 `json:"lastConnectedAt" validate:"nonzero"` | ||
StatusCode string `json:"statusCode" validate:"nonzero"` | ||
Status string `json:"status" validate:"nonzero"` | ||
StatusDetails string `json:"statusDetails" validate:"nonzero"` | ||
SerialNumber string `json:"serialNumber" validate:"nonzero"` | ||
Firmware string `json:"firmware" validate:"nonzero"` | ||
HasAdminError bool `json:"hasAdminError" validate:"nonzero"` | ||
PendingSync bool `json:"pendingSync" validate:"nonzero"` | ||
LastConnection string `json:"lastConnection" validate:"nonzero"` | ||
LastConnectionAt string `json:"lastConnectionAt" validate:"nonzero"` | ||
} |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,51 @@ | ||
package session | ||
|
||
/* | ||
{ | ||
"response": { | ||
"type": "Session", | ||
"message": "Session successfully started for haiadmin", | ||
"sessionID": "[Session ID]", | ||
"lastLoginDate": 1536777877871, | ||
"numLoginFailures": 0 | ||
} | ||
} | ||
*/ | ||
type BaseResponseInitSession struct { | ||
Response ResponseInitSession `json:"response" validate:"nonzero"` | ||
} | ||
|
||
type ResponseInitSession struct { | ||
Type string `json:"type" validate:"nonzero"` | ||
Message string `json:"message" validate:"nonzero"` | ||
SessionID string `json:"sessionID" validate:"nonzero"` | ||
LastLoginDate int64 `json:"lastLoginDate" validate:"nonzero"` | ||
NumLoginFailures int `json:"numLoginFailures" validate:"nonzero"` | ||
} | ||
|
||
/* | ||
{ | ||
"sessionID": "[Session ID]", | ||
"displayName": "Administrator", | ||
"email": "haiadmin@localhost", | ||
"roles": [ | ||
"Administrator" | ||
], | ||
"startAt": 1536937838919, | ||
"expireAt": 1536938857529, | ||
"lastLoginDate": null, | ||
"numLoginFailures": null, | ||
"isLicensed": true | ||
} | ||
*/ | ||
type ResponseSessionInfo struct { | ||
SessionID string `json:"sessionID" validate:"nonzero"` | ||
DisplayName string `json:"displayName" validate:"nonzero"` | ||
Email string `json:"email" validate:"nonzero"` | ||
Roles []string `json:"roles" validate:"nonzero"` | ||
StartAt int64 `json:"startAt" validate:"nonzero"` | ||
ExpireAt int64 `json:"expireAt" validate:"nonzero"` | ||
LastLoginDate int64 `json:"lastLoginDate" validate:"nonzero"` | ||
NumLoginFailures int `json:"numLoginFailures" validate:"nonzero"` | ||
IsLicensed bool `json:"isLicensed" validate:"nonzero"` | ||
} |
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 +1,12 @@ | ||
package srt | ||
|
||
// https://doc.haivision.com/HMG3.7.5/rest-api-integrator-s-reference/rest-api-reference/object-model-reference/source-object-model?activetab=SRT%7EUDPandRTP | ||
|
||
type RequestSourceModelSRT struct { | ||
Name string `json:"name" required:"true" validate:"nonnil,min=1"` | ||
ID string `json:"id" required:"true" validate:"nonnil,min=1"` | ||
Address string `json:"address" required:"true" validate:"nonnil,min=1"` | ||
Protocol string `json:"protocol" required:"true" validate:"nonnil,min=1"` | ||
Port int `json:"port" required:"true" validate:"nonnil,min=1"` | ||
NetworkInterface string `json:"networkInterface" required:"true" validate:"nonnil,min=1"` | ||
} |