17 lines
451 B
Go
17 lines
451 B
Go
package rpc
|
|
|
|
// ValidDeviceUID checks if the deviceUID is according to RPC specification
|
|
func ValidDeviceUID(deviceUID string) bool {
|
|
return len(deviceUID) == DeviceUIDLength
|
|
}
|
|
|
|
// ValidProjectID checks if the projectID is according to RPC specification
|
|
func ValidProjectID(projectID uint) bool {
|
|
return projectID > 0
|
|
}
|
|
|
|
// ValidUserID checks if the userID is according to RPC specification
|
|
func ValidUserID(userID uint) bool {
|
|
return userID > 0
|
|
}
|