@@ -13,12 +13,6 @@ import (
1313)
1414
1515const (
16- // HeaderOperationID is the unique ID returned by the StartOperation response for async operations.
17- // Must be set on callback headers to support completing operations before the start response is received.
18- //
19- // Deprecated: Use HeaderOperationToken instead.
20- HeaderOperationID = "nexus-operation-id"
21-
2216 // HeaderOperationToken is the unique token returned by the StartOperation response for async operations.
2317 // Must be set on callback headers to support completing operations before the start response is received.
2418 HeaderOperationToken = "nexus-operation-token"
@@ -64,22 +58,6 @@ type OperationError struct {
6458 Cause error
6559}
6660
67- // UnsuccessfulOperationError represents "failed" and "canceled" operation results.
68- //
69- // Deprecated: Use [OperationError] instead.
70- type UnsuccessfulOperationError = OperationError
71-
72- // NewFailedOperationError is shorthand for constructing an [OperationError] with state set to
73- // [OperationStateFailed] and the given err as the cause.
74- //
75- // Deprecated: Use [NewOperationFailedError] or construct an [OperationError] directly instead.
76- func NewFailedOperationError (err error ) * OperationError {
77- return & OperationError {
78- State : OperationStateFailed ,
79- Cause : err ,
80- }
81- }
82-
8361// NewOperationFailedError is shorthand for constructing an [OperationError] with state set to
8462// [OperationStateFailed] and the given error message as the cause.
8563func NewOperationFailedError (message string ) * OperationError {
@@ -98,17 +76,6 @@ func OperationFailedErrorf(format string, args ...any) *OperationError {
9876 }
9977}
10078
101- // NewCanceledOperationError is shorthand for constructing an [OperationError] with state set to
102- // [OperationStateCanceled] and the given err as the cause.
103- //
104- // Deprecated: Use [NewOperationCanceledError] or construct an [OperationError] directly instead.
105- func NewCanceledOperationError (err error ) * OperationError {
106- return & OperationError {
107- State : OperationStateCanceled ,
108- Cause : err ,
109- }
110- }
111-
11279// NewOperationCanceledError is shorthand for constructing an [OperationError] with state set to
11380// [OperationStateCanceled] and the given error message as the cause.
11481func NewOperationCanceledError (message string ) * OperationError {
@@ -270,10 +237,6 @@ func (e *HandlerError) Unwrap() error {
270237
271238// OperationInfo conveys information about an operation.
272239type OperationInfo struct {
273- // ID of the operation.
274- //
275- // Deprecated: Use Token instead.
276- ID string `json:"id"`
277240 // Token for the operation.
278241 Token string `json:"token"`
279242 // State of the operation.
0 commit comments