JeffDeCola/my-go-examples

View on GitHub
inter-process-communication-ipc/message-passing/operating-system/synchronous/grpc-os/pbmessage/pbmessage.pb.go

Summary

Maintainability
A
1 hr
Test Coverage
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
//     protoc-gen-go v1.27.1
//     protoc        v3.6.1
// source: pbmessage.proto

package pbmessage

import (
    protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    reflect "reflect"
    sync "sync"
)

const (
    // Verify that this generated code is sufficiently up-to-date.
    _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    // Verify that runtime/protoimpl is sufficiently up-to-date.
    _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

type HelloRequestMessage struct {
    state         protoimpl.MessageState
    sizeCache     protoimpl.SizeCache
    unknownFields protoimpl.UnknownFields

    Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}

func (x *HelloRequestMessage) Reset() {
    *x = HelloRequestMessage{}
    if protoimpl.UnsafeEnabled {
        mi := &file_pbmessage_proto_msgTypes[0]
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        ms.StoreMessageInfo(mi)
    }
}

func (x *HelloRequestMessage) String() string {
    return protoimpl.X.MessageStringOf(x)
}

func (*HelloRequestMessage) ProtoMessage() {}

func (x *HelloRequestMessage) ProtoReflect() protoreflect.Message {
    mi := &file_pbmessage_proto_msgTypes[0]
    if protoimpl.UnsafeEnabled && x != nil {
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        if ms.LoadMessageInfo() == nil {
            ms.StoreMessageInfo(mi)
        }
        return ms
    }
    return mi.MessageOf(x)
}

// Deprecated: Use HelloRequestMessage.ProtoReflect.Descriptor instead.
func (*HelloRequestMessage) Descriptor() ([]byte, []int) {
    return file_pbmessage_proto_rawDescGZIP(), []int{0}
}

func (x *HelloRequestMessage) GetName() string {
    if x != nil {
        return x.Name
    }
    return ""
}

type HelloReplyMessage struct {
    state         protoimpl.MessageState
    sizeCache     protoimpl.SizeCache
    unknownFields protoimpl.UnknownFields

    Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
}

func (x *HelloReplyMessage) Reset() {
    *x = HelloReplyMessage{}
    if protoimpl.UnsafeEnabled {
        mi := &file_pbmessage_proto_msgTypes[1]
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        ms.StoreMessageInfo(mi)
    }
}

func (x *HelloReplyMessage) String() string {
    return protoimpl.X.MessageStringOf(x)
}

func (*HelloReplyMessage) ProtoMessage() {}

func (x *HelloReplyMessage) ProtoReflect() protoreflect.Message {
    mi := &file_pbmessage_proto_msgTypes[1]
    if protoimpl.UnsafeEnabled && x != nil {
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        if ms.LoadMessageInfo() == nil {
            ms.StoreMessageInfo(mi)
        }
        return ms
    }
    return mi.MessageOf(x)
}

// Deprecated: Use HelloReplyMessage.ProtoReflect.Descriptor instead.
func (*HelloReplyMessage) Descriptor() ([]byte, []int) {
    return file_pbmessage_proto_rawDescGZIP(), []int{1}
}

func (x *HelloReplyMessage) GetMessage() string {
    if x != nil {
        return x.Message
    }
    return ""
}

type PersonRequestMessage struct {
    state         protoimpl.MessageState
    sizeCache     protoimpl.SizeCache
    unknownFields protoimpl.UnknownFields

    Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}

func (x *PersonRequestMessage) Reset() {
    *x = PersonRequestMessage{}
    if protoimpl.UnsafeEnabled {
        mi := &file_pbmessage_proto_msgTypes[2]
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        ms.StoreMessageInfo(mi)
    }
}

func (x *PersonRequestMessage) String() string {
    return protoimpl.X.MessageStringOf(x)
}

func (*PersonRequestMessage) ProtoMessage() {}

func (x *PersonRequestMessage) ProtoReflect() protoreflect.Message {
    mi := &file_pbmessage_proto_msgTypes[2]
    if protoimpl.UnsafeEnabled && x != nil {
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        if ms.LoadMessageInfo() == nil {
            ms.StoreMessageInfo(mi)
        }
        return ms
    }
    return mi.MessageOf(x)
}

// Deprecated: Use PersonRequestMessage.ProtoReflect.Descriptor instead.
func (*PersonRequestMessage) Descriptor() ([]byte, []int) {
    return file_pbmessage_proto_rawDescGZIP(), []int{2}
}

func (x *PersonRequestMessage) GetName() string {
    if x != nil {
        return x.Name
    }
    return ""
}

type PersonReplyMessage struct {
    state         protoimpl.MessageState
    sizeCache     protoimpl.SizeCache
    unknownFields protoimpl.UnknownFields

    Name  string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
    Age   int32  `protobuf:"varint,2,opt,name=Age,proto3" json:"Age,omitempty"`
    Email string `protobuf:"bytes,3,opt,name=Email,proto3" json:"Email,omitempty"`
    Phone string `protobuf:"bytes,4,opt,name=Phone,proto3" json:"Phone,omitempty"`
}

func (x *PersonReplyMessage) Reset() {
    *x = PersonReplyMessage{}
    if protoimpl.UnsafeEnabled {
        mi := &file_pbmessage_proto_msgTypes[3]
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        ms.StoreMessageInfo(mi)
    }
}

func (x *PersonReplyMessage) String() string {
    return protoimpl.X.MessageStringOf(x)
}

func (*PersonReplyMessage) ProtoMessage() {}

func (x *PersonReplyMessage) ProtoReflect() protoreflect.Message {
    mi := &file_pbmessage_proto_msgTypes[3]
    if protoimpl.UnsafeEnabled && x != nil {
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        if ms.LoadMessageInfo() == nil {
            ms.StoreMessageInfo(mi)
        }
        return ms
    }
    return mi.MessageOf(x)
}

// Deprecated: Use PersonReplyMessage.ProtoReflect.Descriptor instead.
func (*PersonReplyMessage) Descriptor() ([]byte, []int) {
    return file_pbmessage_proto_rawDescGZIP(), []int{3}
}

func (x *PersonReplyMessage) GetName() string {
    if x != nil {
        return x.Name
    }
    return ""
}

func (x *PersonReplyMessage) GetAge() int32 {
    if x != nil {
        return x.Age
    }
    return 0
}

func (x *PersonReplyMessage) GetEmail() string {
    if x != nil {
        return x.Email
    }
    return ""
}

func (x *PersonReplyMessage) GetPhone() string {
    if x != nil {
        return x.Phone
    }
    return ""
}

var File_pbmessage_proto protoreflect.FileDescriptor

var file_pbmessage_proto_rawDesc = []byte{
    0x0a, 0x0f, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
    0x6f, 0x12, 0x09, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x29, 0x0a, 0x13,
    0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73,
    0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
    0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x2d, 0x0a, 0x11, 0x48, 0x65, 0x6c, 0x6c, 0x6f,
    0x52, 0x65, 0x70, 0x6c, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07,
    0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d,
    0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x2a, 0x0a, 0x14, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e,
    0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12,
    0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
    0x6d, 0x65, 0x22, 0x66, 0x0a, 0x12, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6c,
    0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65,
    0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03,
    0x41, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x41, 0x67, 0x65, 0x12, 0x14,
    0x0a, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x45,
    0x6d, 0x61, 0x69, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x04, 0x20,
    0x01, 0x28, 0x09, 0x52, 0x05, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x32, 0xf9, 0x01, 0x0a, 0x07, 0x47,
    0x72, 0x65, 0x65, 0x74, 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x08, 0x53, 0x61, 0x79, 0x48, 0x65, 0x6c,
    0x6c, 0x6f, 0x12, 0x1e, 0x2e, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x48,
    0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61,
    0x67, 0x65, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x48,
    0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
    0x22, 0x00, 0x12, 0x4f, 0x0a, 0x0d, 0x53, 0x61, 0x79, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x41, 0x67,
    0x61, 0x69, 0x6e, 0x12, 0x1e, 0x2e, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e,
    0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73,
    0x61, 0x67, 0x65, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e,
    0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
    0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x0d, 0x67, 0x65, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e,
    0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1f, 0x2e, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
    0x2e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65,
    0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
    0x65, 0x2e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x4d, 0x65, 0x73,
    0x73, 0x61, 0x67, 0x65, 0x22, 0x00, 0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x3b, 0x70, 0x62, 0x6d, 0x65,
    0x73, 0x73, 0x61, 0x67, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}

var (
    file_pbmessage_proto_rawDescOnce sync.Once
    file_pbmessage_proto_rawDescData = file_pbmessage_proto_rawDesc
)

func file_pbmessage_proto_rawDescGZIP() []byte {
    file_pbmessage_proto_rawDescOnce.Do(func() {
        file_pbmessage_proto_rawDescData = protoimpl.X.CompressGZIP(file_pbmessage_proto_rawDescData)
    })
    return file_pbmessage_proto_rawDescData
}

var file_pbmessage_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_pbmessage_proto_goTypes = []interface{}{
    (*HelloRequestMessage)(nil),  // 0: pbmessage.HelloRequestMessage
    (*HelloReplyMessage)(nil),    // 1: pbmessage.HelloReplyMessage
    (*PersonRequestMessage)(nil), // 2: pbmessage.PersonRequestMessage
    (*PersonReplyMessage)(nil),   // 3: pbmessage.PersonReplyMessage
}
var file_pbmessage_proto_depIdxs = []int32{
    0, // 0: pbmessage.Greeter.SayHello:input_type -> pbmessage.HelloRequestMessage
    0, // 1: pbmessage.Greeter.SayHelloAgain:input_type -> pbmessage.HelloRequestMessage
    2, // 2: pbmessage.Greeter.getPersonInfo:input_type -> pbmessage.PersonRequestMessage
    1, // 3: pbmessage.Greeter.SayHello:output_type -> pbmessage.HelloReplyMessage
    1, // 4: pbmessage.Greeter.SayHelloAgain:output_type -> pbmessage.HelloReplyMessage
    3, // 5: pbmessage.Greeter.getPersonInfo:output_type -> pbmessage.PersonReplyMessage
    3, // [3:6] is the sub-list for method output_type
    0, // [0:3] is the sub-list for method input_type
    0, // [0:0] is the sub-list for extension type_name
    0, // [0:0] is the sub-list for extension extendee
    0, // [0:0] is the sub-list for field type_name
}

func init() { file_pbmessage_proto_init() }
func file_pbmessage_proto_init() {
    if File_pbmessage_proto != nil {
        return
    }
    if !protoimpl.UnsafeEnabled {
        file_pbmessage_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
            switch v := v.(*HelloRequestMessage); i {
            case 0:
                return &v.state
            case 1:
                return &v.sizeCache
            case 2:
                return &v.unknownFields
            default:
                return nil
            }
        }
        file_pbmessage_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
            switch v := v.(*HelloReplyMessage); i {
            case 0:
                return &v.state
            case 1:
                return &v.sizeCache
            case 2:
                return &v.unknownFields
            default:
                return nil
            }
        }
        file_pbmessage_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
            switch v := v.(*PersonRequestMessage); i {
            case 0:
                return &v.state
            case 1:
                return &v.sizeCache
            case 2:
                return &v.unknownFields
            default:
                return nil
            }
        }
        file_pbmessage_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
            switch v := v.(*PersonReplyMessage); i {
            case 0:
                return &v.state
            case 1:
                return &v.sizeCache
            case 2:
                return &v.unknownFields
            default:
                return nil
            }
        }
    }
    type x struct{}
    out := protoimpl.TypeBuilder{
        File: protoimpl.DescBuilder{
            GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
            RawDescriptor: file_pbmessage_proto_rawDesc,
            NumEnums:      0,
            NumMessages:   4,
            NumExtensions: 0,
            NumServices:   1,
        },
        GoTypes:           file_pbmessage_proto_goTypes,
        DependencyIndexes: file_pbmessage_proto_depIdxs,
        MessageInfos:      file_pbmessage_proto_msgTypes,
    }.Build()
    File_pbmessage_proto = out.File
    file_pbmessage_proto_rawDesc = nil
    file_pbmessage_proto_goTypes = nil
    file_pbmessage_proto_depIdxs = nil
}