frostfs-sdk-go/object/error.go
Anton Nikiforov 20ab57bf7e [#214] object: Implement Get\Head requests for EC object
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
2024-04-24 11:07:26 +03:00

37 lines
674 B
Go

package object
type SplitInfoError struct {
si *SplitInfo
}
const splitInfoErrorMsg = "object not found, split info has been provided"
func (s *SplitInfoError) Error() string {
return splitInfoErrorMsg
}
func (s *SplitInfoError) SplitInfo() *SplitInfo {
return s.si
}
func NewSplitInfoError(v *SplitInfo) *SplitInfoError {
return &SplitInfoError{si: v}
}
type ECInfoError struct {
ei *ECInfo
}
const ecInfoErrorMsg = "object not found, ec info has been provided"
func (e *ECInfoError) Error() string {
return ecInfoErrorMsg
}
func (e *ECInfoError) ECInfo() *ECInfo {
return e.ei
}
func NewECInfoError(v *ECInfo) *ECInfoError {
return &ECInfoError{ei: v}
}