trpc.group/trpc-go/trpc-go@v1.0.3/restful/errors/errors.pb.go (about)

     1  //
     2  //
     3  // Tencent is pleased to support the open source community by making tRPC available.
     4  //
     5  // Copyright (C) 2023 THL A29 Limited, a Tencent company.
     6  // All rights reserved.
     7  //
     8  // If you have downloaded a copy of the tRPC source code from Tencent,
     9  // please note that tRPC source code is licensed under the  Apache 2.0 License,
    10  // A copy of the Apache 2.0 License is included in this file.
    11  //
    12  //
    13  
    14  // Code generated by protoc-gen-go. DO NOT EDIT.
    15  // versions:
    16  // 	protoc-gen-go v1.28.1
    17  // 	protoc        v3.19.1
    18  // source: errors.proto
    19  
    20  package errors
    21  
    22  import (
    23  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    24  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    25  	reflect "reflect"
    26  	sync "sync"
    27  )
    28  
    29  const (
    30  	// Verify that this generated code is sufficiently up-to-date.
    31  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    32  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    33  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    34  )
    35  
    36  // tRPC error represented in protobuf
    37  type Err struct {
    38  	state         protoimpl.MessageState
    39  	sizeCache     protoimpl.SizeCache
    40  	unknownFields protoimpl.UnknownFields
    41  
    42  	// error code
    43  	Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
    44  	// error message
    45  	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
    46  }
    47  
    48  func (x *Err) Reset() {
    49  	*x = Err{}
    50  	if protoimpl.UnsafeEnabled {
    51  		mi := &file_errors_proto_msgTypes[0]
    52  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    53  		ms.StoreMessageInfo(mi)
    54  	}
    55  }
    56  
    57  func (x *Err) String() string {
    58  	return protoimpl.X.MessageStringOf(x)
    59  }
    60  
    61  func (*Err) ProtoMessage() {}
    62  
    63  func (x *Err) ProtoReflect() protoreflect.Message {
    64  	mi := &file_errors_proto_msgTypes[0]
    65  	if protoimpl.UnsafeEnabled && x != nil {
    66  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    67  		if ms.LoadMessageInfo() == nil {
    68  			ms.StoreMessageInfo(mi)
    69  		}
    70  		return ms
    71  	}
    72  	return mi.MessageOf(x)
    73  }
    74  
    75  // Deprecated: Use Err.ProtoReflect.Descriptor instead.
    76  func (*Err) Descriptor() ([]byte, []int) {
    77  	return file_errors_proto_rawDescGZIP(), []int{0}
    78  }
    79  
    80  func (x *Err) GetCode() int32 {
    81  	if x != nil {
    82  		return x.Code
    83  	}
    84  	return 0
    85  }
    86  
    87  func (x *Err) GetMessage() string {
    88  	if x != nil {
    89  		return x.Message
    90  	}
    91  	return ""
    92  }
    93  
    94  var File_errors_proto protoreflect.FileDescriptor
    95  
    96  var file_errors_proto_rawDesc = []byte{
    97  	0x0a, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06,
    98  	0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0x33, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x12, 0x12, 0x0a,
    99  	0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64,
   100  	0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01,
   101  	0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x0a, 0x5a, 0x08, 0x2e,
   102  	0x3b, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
   103  }
   104  
   105  var (
   106  	file_errors_proto_rawDescOnce sync.Once
   107  	file_errors_proto_rawDescData = file_errors_proto_rawDesc
   108  )
   109  
   110  func file_errors_proto_rawDescGZIP() []byte {
   111  	file_errors_proto_rawDescOnce.Do(func() {
   112  		file_errors_proto_rawDescData = protoimpl.X.CompressGZIP(file_errors_proto_rawDescData)
   113  	})
   114  	return file_errors_proto_rawDescData
   115  }
   116  
   117  var file_errors_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
   118  var file_errors_proto_goTypes = []interface{}{
   119  	(*Err)(nil), // 0: errors.err
   120  }
   121  var file_errors_proto_depIdxs = []int32{
   122  	0, // [0:0] is the sub-list for method output_type
   123  	0, // [0:0] is the sub-list for method input_type
   124  	0, // [0:0] is the sub-list for extension type_name
   125  	0, // [0:0] is the sub-list for extension extendee
   126  	0, // [0:0] is the sub-list for field type_name
   127  }
   128  
   129  func init() { file_errors_proto_init() }
   130  func file_errors_proto_init() {
   131  	if File_errors_proto != nil {
   132  		return
   133  	}
   134  	if !protoimpl.UnsafeEnabled {
   135  		file_errors_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   136  			switch v := v.(*Err); i {
   137  			case 0:
   138  				return &v.state
   139  			case 1:
   140  				return &v.sizeCache
   141  			case 2:
   142  				return &v.unknownFields
   143  			default:
   144  				return nil
   145  			}
   146  		}
   147  	}
   148  	type x struct{}
   149  	out := protoimpl.TypeBuilder{
   150  		File: protoimpl.DescBuilder{
   151  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   152  			RawDescriptor: file_errors_proto_rawDesc,
   153  			NumEnums:      0,
   154  			NumMessages:   1,
   155  			NumExtensions: 0,
   156  			NumServices:   0,
   157  		},
   158  		GoTypes:           file_errors_proto_goTypes,
   159  		DependencyIndexes: file_errors_proto_depIdxs,
   160  		MessageInfos:      file_errors_proto_msgTypes,
   161  	}.Build()
   162  	File_errors_proto = out.File
   163  	file_errors_proto_rawDesc = nil
   164  	file_errors_proto_goTypes = nil
   165  	file_errors_proto_depIdxs = nil
   166  }