@@ -20,7 +20,7 @@ import (
20
20
21
21
"google.golang.org/protobuf/types/known/wrapperspb"
22
22
23
- "github.com/dapr/durabletask-go/api"
23
+ "github.com/dapr/durabletask-go/api/protos "
24
24
"github.com/dapr/durabletask-go/task"
25
25
)
26
26
@@ -44,29 +44,29 @@ type FailureDetails struct {
44
44
IsNonRetriable bool `json:"IsNonRetriable"`
45
45
}
46
46
47
- func convertMetadata (orchestrationMetadata * api .OrchestrationMetadata ) * Metadata {
47
+ func convertMetadata (orchestrationMetadata * protos .OrchestrationMetadata ) * Metadata {
48
48
metadata := Metadata {
49
- InstanceID : string ( orchestrationMetadata .InstanceID ),
50
- Name : orchestrationMetadata .Name ,
51
- RuntimeStatus : Status (orchestrationMetadata .RuntimeStatus .Number ()),
52
- CreatedAt : orchestrationMetadata .CreatedAt ,
53
- LastUpdatedAt : orchestrationMetadata .LastUpdatedAt ,
54
- SerializedInput : orchestrationMetadata .SerializedInput ,
55
- SerializedOutput : orchestrationMetadata .SerializedOutput ,
56
- SerializedCustomStatus : orchestrationMetadata .SerializedCustomStatus ,
49
+ InstanceID : orchestrationMetadata .GetInstanceId ( ),
50
+ Name : orchestrationMetadata .GetName () ,
51
+ RuntimeStatus : Status (orchestrationMetadata .GetRuntimeStatus () .Number ()),
52
+ CreatedAt : orchestrationMetadata .GetCreatedAt (). AsTime () ,
53
+ LastUpdatedAt : orchestrationMetadata .GetLastUpdatedAt (). AsTime () ,
54
+ SerializedInput : orchestrationMetadata .GetInput (). GetValue () ,
55
+ SerializedOutput : orchestrationMetadata .GetOutput (). GetValue () ,
56
+ SerializedCustomStatus : orchestrationMetadata .GetCustomStatus (). GetValue () ,
57
57
}
58
- if orchestrationMetadata .FailureDetails != nil {
58
+ if orchestrationMetadata .GetFailureDetails () != nil {
59
59
metadata .FailureDetails = & FailureDetails {
60
- Type : orchestrationMetadata .FailureDetails .GetErrorType (),
61
- Message : orchestrationMetadata .FailureDetails .GetErrorMessage (),
62
- StackTrace : orchestrationMetadata .FailureDetails .GetStackTrace ().GetValue (),
63
- IsNonRetriable : orchestrationMetadata .FailureDetails .GetIsNonRetriable (),
60
+ Type : orchestrationMetadata .GetFailureDetails () .GetErrorType (),
61
+ Message : orchestrationMetadata .GetFailureDetails () .GetErrorMessage (),
62
+ StackTrace : orchestrationMetadata .GetFailureDetails () .GetStackTrace ().GetValue (),
63
+ IsNonRetriable : orchestrationMetadata .GetFailureDetails () .GetIsNonRetriable (),
64
64
}
65
65
66
- if orchestrationMetadata .FailureDetails .GetInnerFailure () != nil {
66
+ if orchestrationMetadata .GetFailureDetails () .GetInnerFailure () != nil {
67
67
var root * FailureDetails
68
68
current := root
69
- failure := orchestrationMetadata .FailureDetails .GetInnerFailure ()
69
+ failure := orchestrationMetadata .GetFailureDetails () .GetInnerFailure ()
70
70
for {
71
71
current .Type = failure .GetErrorType ()
72
72
current .Message = failure .GetErrorMessage ()
0 commit comments