25 lines
1.1 KiB
Go
25 lines
1.1 KiB
Go
package media
|
|
|
|
import "time"
|
|
|
|
type RouteResponse struct {
|
|
ID string `json:"id"`
|
|
DeviceID string `json:"deviceId"`
|
|
ProfileToken string `json:"profileToken"`
|
|
Path string `json:"path"`
|
|
Desired string `json:"desired"`
|
|
Actual string `json:"actual"`
|
|
Readers int `json:"readers"`
|
|
SourceReady bool `json:"sourceReady"`
|
|
FailureCount int `json:"failureCount"`
|
|
NextRetryAt *time.Time `json:"nextRetryAt,omitempty"`
|
|
LastErrorCode string `json:"lastErrorCode,omitempty"`
|
|
Detail string `json:"detail"`
|
|
Version int64 `json:"version"`
|
|
UpdatedAt time.Time `json:"updatedAt"`
|
|
}
|
|
|
|
func routeResponse(r Route) RouteResponse {
|
|
return RouteResponse{ID: r.ID, DeviceID: r.DeviceID, ProfileToken: r.ProfileToken, Path: r.Path, Desired: r.Desired, Actual: r.Actual, Readers: r.Readers, SourceReady: r.SourceReady, FailureCount: r.FailureCount, NextRetryAt: r.NextRetryAt, LastErrorCode: r.LastErrorCode, Detail: r.Detail, Version: r.Version, UpdatedAt: r.UpdatedAt}
|
|
}
|