Documentation
¶
Index ¶
- func FromError(err error, extraDetails ...*anypb.Any) error
- func FromRPCError(err error, md *metadata.MD, extraDetails ...*anypb.Any) error
- func StreamClientInterceptor(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, ...) (grpc.ClientStream, error)
- func UnaryClientInterceptor(ctx context.Context, method string, req, reply any, cc *grpc.ClientConn, ...) error
- type BadRequest
- type BadResourceState
- func (e *BadResourceState) Code() string
- func (e *BadResourceState) Message() string
- func (e *BadResourceState) Proto() *common.ServiceError
- func (e *BadResourceState) ResourceID() string
- func (e *BadResourceState) RetryType() common.ServiceError_RetryType
- func (e *BadResourceState) Service() string
- func (e *BadResourceState) String() string
- type Detail
- type Error
- type Internal
- type NotEnoughResources
- func (e *NotEnoughResources) Code() string
- func (e *NotEnoughResources) Proto() *common.ServiceError
- func (e *NotEnoughResources) RetryType() common.ServiceError_RetryType
- func (e *NotEnoughResources) Service() string
- func (e *NotEnoughResources) String() string
- func (e *NotEnoughResources) Violations() []*common.NotEnoughResources_Violation
- type OperationAborted
- func (e *OperationAborted) AbortedOperationID() string
- func (e *OperationAborted) Code() string
- func (e *OperationAborted) NewOperationID() string
- func (e *OperationAborted) Proto() *common.ServiceError
- func (e *OperationAborted) ResourceID() string
- func (e *OperationAborted) RetryType() common.ServiceError_RetryType
- func (e *OperationAborted) Service() string
- func (e *OperationAborted) String() string
- type OutOfRange
- type PermissionDenied
- type QuotaFailure
- func (e *QuotaFailure) Code() string
- func (e *QuotaFailure) Proto() *common.ServiceError
- func (e *QuotaFailure) RetryType() common.ServiceError_RetryType
- func (e *QuotaFailure) Service() string
- func (e *QuotaFailure) String() string
- func (e *QuotaFailure) Violations() []*common.QuotaFailure_Violation
- type ResourceAlreadyExists
- func (e *ResourceAlreadyExists) Code() string
- func (e *ResourceAlreadyExists) Proto() *common.ServiceError
- func (e *ResourceAlreadyExists) ResourceID() string
- func (e *ResourceAlreadyExists) RetryType() common.ServiceError_RetryType
- func (e *ResourceAlreadyExists) Service() string
- func (e *ResourceAlreadyExists) String() string
- type ResourceConflict
- func (e *ResourceConflict) Code() string
- func (e *ResourceConflict) Message() string
- func (e *ResourceConflict) Proto() *common.ServiceError
- func (e *ResourceConflict) ResourceID() string
- func (e *ResourceConflict) RetryType() common.ServiceError_RetryType
- func (e *ResourceConflict) Service() string
- func (e *ResourceConflict) String() string
- type ResourceNotFound
- type TooManyRequests
- type Unknown
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromError ¶
FromError converts wraps an error with Error if necessary. The client should not use this function. It is called by built-in interceptor.
func FromRPCError ¶
FromRPCError converts wraps an error with Error if necessary. It also extracts request ID from metadata if available. The client should not use this function. It is called by a built-in interceptor.
func StreamClientInterceptor ¶
func StreamClientInterceptor( ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, streamer grpc.Streamer, opts ...grpc.CallOption, ) (grpc.ClientStream, error)
func UnaryClientInterceptor ¶
func UnaryClientInterceptor( ctx context.Context, method string, req, reply any, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption, ) error
Types ¶
type BadRequest ¶
type BadRequest struct {
// contains filtered or unexported fields
}
func (*BadRequest) Proto ¶
func (e *BadRequest) Proto() *common.ServiceError
func (*BadRequest) RetryType ¶
func (e *BadRequest) RetryType() common.ServiceError_RetryType
func (*BadRequest) String ¶
func (e *BadRequest) String() string
func (*BadRequest) Violations ¶
func (e *BadRequest) Violations() []*common.BadRequest_Violation
type BadResourceState ¶
type BadResourceState struct {
// contains filtered or unexported fields
}
func (*BadResourceState) Message ¶
func (e *BadResourceState) Message() string
func (*BadResourceState) Proto ¶
func (e *BadResourceState) Proto() *common.ServiceError
func (*BadResourceState) ResourceID ¶
func (e *BadResourceState) ResourceID() string
func (*BadResourceState) RetryType ¶
func (e *BadResourceState) RetryType() common.ServiceError_RetryType
func (*BadResourceState) String ¶
func (e *BadResourceState) String() string
type Detail ¶
type Detail interface {
String() string
Proto() *common.ServiceError
Service() string
Code() string
RetryType() common.ServiceError_RetryType
}
Detail is a wrapper for protobuf message nebius.common.v1.ServiceError.
Here is the list of possible detail types:
type Error ¶
Error is a wrapper returned by gRPC services if an original error contains Detail. It also contains request ID if it is present.
type Internal ¶
type Internal struct {
// contains filtered or unexported fields
}
func (*Internal) Proto ¶
func (e *Internal) Proto() *common.ServiceError
func (*Internal) RetryType ¶
func (e *Internal) RetryType() common.ServiceError_RetryType
type NotEnoughResources ¶
type NotEnoughResources struct {
// contains filtered or unexported fields
}
func (*NotEnoughResources) Proto ¶
func (e *NotEnoughResources) Proto() *common.ServiceError
func (*NotEnoughResources) RetryType ¶
func (e *NotEnoughResources) RetryType() common.ServiceError_RetryType
func (*NotEnoughResources) String ¶
func (e *NotEnoughResources) String() string
func (*NotEnoughResources) Violations ¶
func (e *NotEnoughResources) Violations() []*common.NotEnoughResources_Violation
type OperationAborted ¶
type OperationAborted struct {
// contains filtered or unexported fields
}
func (*OperationAborted) AbortedOperationID ¶
func (e *OperationAborted) AbortedOperationID() string
func (*OperationAborted) NewOperationID ¶
func (e *OperationAborted) NewOperationID() string
func (*OperationAborted) Proto ¶
func (e *OperationAborted) Proto() *common.ServiceError
func (*OperationAborted) ResourceID ¶
func (e *OperationAborted) ResourceID() string
func (*OperationAborted) RetryType ¶
func (e *OperationAborted) RetryType() common.ServiceError_RetryType
func (*OperationAborted) String ¶
func (e *OperationAborted) String() string
type OutOfRange ¶
type OutOfRange struct {
// contains filtered or unexported fields
}
func (*OutOfRange) Limit ¶
func (e *OutOfRange) Limit() string
func (*OutOfRange) Proto ¶
func (e *OutOfRange) Proto() *common.ServiceError
func (*OutOfRange) Requested ¶
func (e *OutOfRange) Requested() string
func (*OutOfRange) RetryType ¶
func (e *OutOfRange) RetryType() common.ServiceError_RetryType
func (*OutOfRange) String ¶
func (e *OutOfRange) String() string
type PermissionDenied ¶
type PermissionDenied struct {
// contains filtered or unexported fields
}
func (*PermissionDenied) Proto ¶
func (e *PermissionDenied) Proto() *common.ServiceError
func (*PermissionDenied) ResourceID ¶
func (e *PermissionDenied) ResourceID() string
func (*PermissionDenied) RetryType ¶
func (e *PermissionDenied) RetryType() common.ServiceError_RetryType
func (*PermissionDenied) String ¶
func (e *PermissionDenied) String() string
type QuotaFailure ¶
type QuotaFailure struct {
// contains filtered or unexported fields
}
func (*QuotaFailure) Proto ¶
func (e *QuotaFailure) Proto() *common.ServiceError
func (*QuotaFailure) RetryType ¶
func (e *QuotaFailure) RetryType() common.ServiceError_RetryType
func (*QuotaFailure) String ¶
func (e *QuotaFailure) String() string
func (*QuotaFailure) Violations ¶
func (e *QuotaFailure) Violations() []*common.QuotaFailure_Violation
type ResourceAlreadyExists ¶
type ResourceAlreadyExists struct {
// contains filtered or unexported fields
}
func (*ResourceAlreadyExists) Proto ¶
func (e *ResourceAlreadyExists) Proto() *common.ServiceError
func (*ResourceAlreadyExists) ResourceID ¶
func (e *ResourceAlreadyExists) ResourceID() string
func (*ResourceAlreadyExists) RetryType ¶
func (e *ResourceAlreadyExists) RetryType() common.ServiceError_RetryType
func (*ResourceAlreadyExists) String ¶
func (e *ResourceAlreadyExists) String() string
type ResourceConflict ¶
type ResourceConflict struct {
// contains filtered or unexported fields
}
func (*ResourceConflict) Message ¶
func (e *ResourceConflict) Message() string
func (*ResourceConflict) Proto ¶
func (e *ResourceConflict) Proto() *common.ServiceError
func (*ResourceConflict) ResourceID ¶
func (e *ResourceConflict) ResourceID() string
func (*ResourceConflict) RetryType ¶
func (e *ResourceConflict) RetryType() common.ServiceError_RetryType
func (*ResourceConflict) String ¶
func (e *ResourceConflict) String() string
type ResourceNotFound ¶
type ResourceNotFound struct {
// contains filtered or unexported fields
}
func (*ResourceNotFound) Proto ¶
func (e *ResourceNotFound) Proto() *common.ServiceError
func (*ResourceNotFound) ResourceID ¶
func (e *ResourceNotFound) ResourceID() string
func (*ResourceNotFound) RetryType ¶
func (e *ResourceNotFound) RetryType() common.ServiceError_RetryType
func (*ResourceNotFound) String ¶
func (e *ResourceNotFound) String() string
type TooManyRequests ¶
type TooManyRequests struct {
// contains filtered or unexported fields
}
func (*TooManyRequests) Proto ¶
func (e *TooManyRequests) Proto() *common.ServiceError
func (*TooManyRequests) RetryType ¶
func (e *TooManyRequests) RetryType() common.ServiceError_RetryType
func (*TooManyRequests) String ¶
func (e *TooManyRequests) String() string
func (*TooManyRequests) Violation ¶
func (e *TooManyRequests) Violation() string
type Unknown ¶
type Unknown struct {
// contains filtered or unexported fields
}
func (*Unknown) Proto ¶
func (e *Unknown) Proto() *common.ServiceError
func (*Unknown) RetryType ¶
func (e *Unknown) RetryType() common.ServiceError_RetryType
Source Files
¶
Click to show internal directories.
Click to hide internal directories.