Documentation ¶
Index ¶
- Variables
- type TargetInfo
- func (*TargetInfo) Descriptor() ([]byte, []int)deprecated
- func (x *TargetInfo) GetCode() int32
- func (x *TargetInfo) GetMessage() string
- func (x *TargetInfo) GetTarget() string
- func (ti *TargetInfo) MarshalJSON() ([]byte, error)
- func (*TargetInfo) ProtoMessage()
- func (x *TargetInfo) ProtoReflect() protoreflect.Message
- func (x *TargetInfo) Reset()
- func (x *TargetInfo) String() string
- func (ti *TargetInfo) UnmarshalJSON(data []byte) error
Constants ¶
This section is empty.
Variables ¶
var File_github_com_infobloxopen_atlas_app_toolkit_rpc_errdetails_error_details_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type TargetInfo ¶
type TargetInfo struct { // The status code is an enumerated error code, // which should be an enum value of [google.rpc.Code][google.rpc.Code] Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // The message is a human-readable non-localized message Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // The target is a resource name Target string `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"` // contains filtered or unexported fields }
TargetInfo is a default representation of error details that conforms REST API Syntax Specification
func New ¶
func New(c codes.Code, target string, msg string) *TargetInfo
New returns a TargetInfo representing c, target and msg. Converts provided Code to int32
func Newf ¶
func Newf(c codes.Code, target string, format string, a ...interface{}) *TargetInfo
NewfTargetInfo returns NewTargetInfo(c, fmt.Sprintf(format, a...)).
func (*TargetInfo) Descriptor
deprecated
func (*TargetInfo) Descriptor() ([]byte, []int)
Deprecated: Use TargetInfo.ProtoReflect.Descriptor instead.
func (*TargetInfo) GetCode ¶
func (x *TargetInfo) GetCode() int32
func (*TargetInfo) GetMessage ¶
func (x *TargetInfo) GetMessage() string
func (*TargetInfo) GetTarget ¶
func (x *TargetInfo) GetTarget() string
func (*TargetInfo) MarshalJSON ¶
func (ti *TargetInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler. TargetInfo.Code field is marshaled into string with corresponding value, see [google.rpc.Code][google.rpc.Code], if code is the codes.Unimplemented it is marshaled as "NOT_IMPLEMENTED" string.
func (*TargetInfo) ProtoMessage ¶
func (*TargetInfo) ProtoMessage()
func (*TargetInfo) ProtoReflect ¶
func (x *TargetInfo) ProtoReflect() protoreflect.Message
func (*TargetInfo) Reset ¶
func (x *TargetInfo) Reset()
func (*TargetInfo) String ¶
func (x *TargetInfo) String() string
func (*TargetInfo) UnmarshalJSON ¶
func (ti *TargetInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements json.Unmarshaler. If "code" is not provided in JSON data or is null, the TargetInfo.Code will be set to 0 (OK)