frostfs-sdk-go/client/status/unrecognized.go
Leonard Lyubich 9dcff95a29 [#83] client: Implement status library
Define base `Status` interface. Provide the functionality to distinguish
success and failure returns. Provide functionality to transport statuses
over NeoFS API V2 protocol. Support success `OK` and failure `INTERNAL`
returns.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-11-23 13:03:40 +03:00

18 lines
380 B
Go

package apistatus
import (
"github.com/nspcc-dev/neofs-api-go/v2/status"
)
type unrecognizedStatusV2 struct {
v2 status.Status
}
func (x unrecognizedStatusV2) Error() string {
return errMessageStatusV2("unrecognized", x.v2.Message())
}
// implements method of the FromStatusV2 local interface.
func (x *unrecognizedStatusV2) fromStatusV2(st *status.Status) {
x.v2 = *st
}