Documentation ¶
Index ¶
- Constants
- Variables
- func IsRestErr(err error, sentinel OntapRestCode) bool
- func New(innerError error, message string, opts ...Option) error
- func NewStorageGridErr(statusCode int, jsonText []byte) error
- type HarvestError
- type Message
- type OntapRestCode
- type Option
- type RestError
- type RestErrorBuilder
- func (b *RestErrorBuilder) API(api string) *RestErrorBuilder
- func (b *RestErrorBuilder) Build() error
- func (b *RestErrorBuilder) Code(code int64) *RestErrorBuilder
- func (b *RestErrorBuilder) Error(err error) *RestErrorBuilder
- func (b *RestErrorBuilder) Message(message string) *RestErrorBuilder
- func (b *RestErrorBuilder) StatusCode(statusCode int) *RestErrorBuilder
- func (b *RestErrorBuilder) Target(target string) *RestErrorBuilder
- type StorageGridError
Constants ¶
View Source
const ( ErrAPIRequestRejected = harvestError("API request rejected") ErrAPIResponse = harvestError("error reading api response") ErrAttributeNotFound = harvestError("attribute not found") ErrAuthFailed = harvestError("auth failed") ErrConfig = harvestError("configuration error") ErrConnection = harvestError("connection error") ErrImplement = harvestError("implementation error") ErrInvalidItem = harvestError("invalid item") ErrInvalidParam = harvestError("invalid parameter") ErrMissingParam = harvestError("missing parameter") ErrNoCollector = harvestError("no collectors") ErrNoInstance = harvestError("no instances") ErrNoMetric = harvestError("no metrics") ErrPermissionDenied = harvestError("Permission denied") ErrResponseNotFound = harvestError("response not found") ErrWrongTemplate = harvestError("wrong template") ErrMetroClusterNotConfigured = harvestError("MetroCluster is not configured in cluster") )
View Source
const ( ErrNumZAPISuspended = "61253" ZAPIPermissionDenied = "13003" )
Variables ¶
View Source
var ( APINotFound = OntapRestCode{"API not found", 3} TableNotFound = OntapRestCode{"Table is not found", 8585320} MetroClusterNotConfigured = OntapRestCode{"MetroCluster is not configured in cluster", 2426405} CMReject = OntapRestCode{"CM reject", 8585368} )
Functions ¶
func IsRestErr ¶
func IsRestErr(err error, sentinel OntapRestCode) bool
func NewStorageGridErr ¶
Types ¶
type HarvestError ¶
func (HarvestError) Error ¶
func (e HarvestError) Error() string
func (HarvestError) Unwrap ¶
func (e HarvestError) Unwrap() error
type OntapRestCode ¶
type RestError ¶
type RestErrorBuilder ¶
type RestErrorBuilder struct {
// contains filtered or unexported fields
}
func NewRest ¶
func NewRest() *RestErrorBuilder
func (*RestErrorBuilder) API ¶
func (b *RestErrorBuilder) API(api string) *RestErrorBuilder
func (*RestErrorBuilder) Build ¶
func (b *RestErrorBuilder) Build() error
func (*RestErrorBuilder) Code ¶
func (b *RestErrorBuilder) Code(code int64) *RestErrorBuilder
func (*RestErrorBuilder) Error ¶
func (b *RestErrorBuilder) Error(err error) *RestErrorBuilder
func (*RestErrorBuilder) Message ¶
func (b *RestErrorBuilder) Message(message string) *RestErrorBuilder
func (*RestErrorBuilder) StatusCode ¶
func (b *RestErrorBuilder) StatusCode(statusCode int) *RestErrorBuilder
func (*RestErrorBuilder) Target ¶
func (b *RestErrorBuilder) Target(target string) *RestErrorBuilder
type StorageGridError ¶
type StorageGridError struct { Message Message `json:"message"` Code int `json:"code"` Status string `json:"status"` }
func (StorageGridError) Error ¶
func (s StorageGridError) Error() string
func (StorageGridError) IsAuthErr ¶
func (s StorageGridError) IsAuthErr() bool
Click to show internal directories.
Click to hide internal directories.