diff --git a/pkg/api/api.go b/pkg/api/api.go index f08a7f684..27f7000eb 100644 --- a/pkg/api/api.go +++ b/pkg/api/api.go @@ -487,6 +487,8 @@ type DownOptions struct { } // ConfigOptions group options of the Config API +// +// Deprecated: no operation of Compose takes these options, they will be removed. type ConfigOptions struct { // Format define the output format used to dump converted application model (json|yaml) Format string @@ -765,6 +767,8 @@ type ImageSummary struct { } // ServiceStatus hold status about a service +// +// Deprecated: no operation of Compose returns it, it will be removed. type ServiceStatus struct { ID string Name string @@ -823,16 +827,28 @@ type GenerateOptions struct { const ( // STARTING indicates that stack is being deployed + // + // Deprecated: Stack.Status never takes this value, it will be removed. STARTING string = "Starting" // RUNNING indicates that stack is deployed and services are running + // + // Deprecated: Stack.Status never takes this value, it will be removed. RUNNING string = "Running" // UPDATING indicates that some stack resources are being recreated + // + // Deprecated: Stack.Status never takes this value, it will be removed. UPDATING string = "Updating" // REMOVING indicates that stack is being deleted + // + // Deprecated: Stack.Status never takes this value, it will be removed. REMOVING string = "Removing" // UNKNOWN indicates unknown stack state + // + // Deprecated: Stack.Status never takes this value, it will be removed. UNKNOWN string = "Unknown" // FAILED indicates that stack deployment failed + // + // Deprecated: Stack.Status never takes this value, it will be removed. FAILED string = "Failed" ) diff --git a/pkg/api/errors.go b/pkg/api/errors.go index af88b79c8..ebe16c353 100644 --- a/pkg/api/errors.go +++ b/pkg/api/errors.go @@ -24,6 +24,8 @@ import ( const ( // ExitCodeLoginRequired exit code when command cannot execute because it requires cloud login // This will be used by VSCode to detect when creating context if the user needs to login first + // + // Deprecated: Compose has no cloud login anymore and never exits with this code, it will be removed. ExitCodeLoginRequired = 5 ) @@ -31,14 +33,22 @@ var ( // ErrNotFound is returned when an object is not found ErrNotFound = errors.New("not found") // ErrAlreadyExists is returned when an object already exists + // + // Deprecated: Compose never returns it, it will be removed. ErrAlreadyExists = errors.New("already exists") // ErrForbidden is returned when an operation is not permitted + // + // Deprecated: Compose never returns it, it will be removed. ErrForbidden = errors.New("forbidden") // ErrUnknown is returned when the error type is unmapped + // + // Deprecated: Compose never returns it, it will be removed. ErrUnknown = errors.New("unknown") // ErrNotImplemented is returned when a backend doesn't implement an action ErrNotImplemented = errors.New("not implemented") // ErrUnsupportedFlag is returned when a backend doesn't support a flag + // + // Deprecated: Compose never returns it, it will be removed. ErrUnsupportedFlag = errors.New("unsupported flag") // ErrCanceled is returned when the command was canceled by user ErrCanceled = errors.New("canceled") @@ -63,21 +73,29 @@ func IsNotFoundError(err error) bool { } // IsAlreadyExistsError returns true if the unwrapped error is ErrAlreadyExists +// +// Deprecated: ErrAlreadyExists is never returned, it will be removed. func IsAlreadyExistsError(err error) bool { return errors.Is(err, ErrAlreadyExists) } // IsForbiddenError returns true if the unwrapped error is ErrForbidden +// +// Deprecated: ErrForbidden is never returned, it will be removed. func IsForbiddenError(err error) bool { return errors.Is(err, ErrForbidden) } // IsUnknownError returns true if the unwrapped error is ErrUnknown +// +// Deprecated: ErrUnknown is never returned, it will be removed. func IsUnknownError(err error) bool { return errors.Is(err, ErrUnknown) } // IsErrUnsupportedFlag returns true if the unwrapped error is ErrUnsupportedFlag +// +// Deprecated: ErrUnsupportedFlag is never returned, it will be removed. func IsErrUnsupportedFlag(err error) bool { return errors.Is(err, ErrUnsupportedFlag) }