896 lines
27 KiB
Go
896 lines
27 KiB
Go
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||
|
|
// versions:
|
||
|
|
// protoc-gen-go v1.27.1
|
||
|
|
// protoc v3.19.3
|
||
|
|
// source: message.proto
|
||
|
|
|
||
|
|
package pb
|
||
|
|
|
||
|
|
import (
|
||
|
|
context "context"
|
||
|
|
grpc "google.golang.org/grpc"
|
||
|
|
codes "google.golang.org/grpc/codes"
|
||
|
|
status "google.golang.org/grpc/status"
|
||
|
|
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 Employee struct {
|
||
|
|
state protoimpl.MessageState
|
||
|
|
sizeCache protoimpl.SizeCache
|
||
|
|
unknownFields protoimpl.UnknownFields
|
||
|
|
|
||
|
|
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||
|
|
No int32 `protobuf:"varint,2,opt,name=no,proto3" json:"no,omitempty"`
|
||
|
|
FirstName string `protobuf:"bytes,3,opt,name=firstName,proto3" json:"firstName,omitempty"`
|
||
|
|
LastName string `protobuf:"bytes,4,opt,name=lastName,proto3" json:"lastName,omitempty"`
|
||
|
|
Salary float32 `protobuf:"fixed32,5,opt,name=salary,proto3" json:"salary,omitempty"`
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *Employee) Reset() {
|
||
|
|
*x = Employee{}
|
||
|
|
if protoimpl.UnsafeEnabled {
|
||
|
|
mi := &file_message_proto_msgTypes[0]
|
||
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
|
|
ms.StoreMessageInfo(mi)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *Employee) String() string {
|
||
|
|
return protoimpl.X.MessageStringOf(x)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (*Employee) ProtoMessage() {}
|
||
|
|
|
||
|
|
func (x *Employee) ProtoReflect() protoreflect.Message {
|
||
|
|
mi := &file_message_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 Employee.ProtoReflect.Descriptor instead.
|
||
|
|
func (*Employee) Descriptor() ([]byte, []int) {
|
||
|
|
return file_message_proto_rawDescGZIP(), []int{0}
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *Employee) GetId() int32 {
|
||
|
|
if x != nil {
|
||
|
|
return x.Id
|
||
|
|
}
|
||
|
|
return 0
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *Employee) GetNo() int32 {
|
||
|
|
if x != nil {
|
||
|
|
return x.No
|
||
|
|
}
|
||
|
|
return 0
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *Employee) GetFirstName() string {
|
||
|
|
if x != nil {
|
||
|
|
return x.FirstName
|
||
|
|
}
|
||
|
|
return ""
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *Employee) GetLastName() string {
|
||
|
|
if x != nil {
|
||
|
|
return x.LastName
|
||
|
|
}
|
||
|
|
return ""
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *Employee) GetSalary() float32 {
|
||
|
|
if x != nil {
|
||
|
|
return x.Salary
|
||
|
|
}
|
||
|
|
return 0
|
||
|
|
}
|
||
|
|
|
||
|
|
type GetByNoRequset struct {
|
||
|
|
state protoimpl.MessageState
|
||
|
|
sizeCache protoimpl.SizeCache
|
||
|
|
unknownFields protoimpl.UnknownFields
|
||
|
|
|
||
|
|
No int32 `protobuf:"varint,1,opt,name=no,proto3" json:"no,omitempty"`
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *GetByNoRequset) Reset() {
|
||
|
|
*x = GetByNoRequset{}
|
||
|
|
if protoimpl.UnsafeEnabled {
|
||
|
|
mi := &file_message_proto_msgTypes[1]
|
||
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
|
|
ms.StoreMessageInfo(mi)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *GetByNoRequset) String() string {
|
||
|
|
return protoimpl.X.MessageStringOf(x)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (*GetByNoRequset) ProtoMessage() {}
|
||
|
|
|
||
|
|
func (x *GetByNoRequset) ProtoReflect() protoreflect.Message {
|
||
|
|
mi := &file_message_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 GetByNoRequset.ProtoReflect.Descriptor instead.
|
||
|
|
func (*GetByNoRequset) Descriptor() ([]byte, []int) {
|
||
|
|
return file_message_proto_rawDescGZIP(), []int{1}
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *GetByNoRequset) GetNo() int32 {
|
||
|
|
if x != nil {
|
||
|
|
return x.No
|
||
|
|
}
|
||
|
|
return 0
|
||
|
|
}
|
||
|
|
|
||
|
|
type EmployeeResponse struct {
|
||
|
|
state protoimpl.MessageState
|
||
|
|
sizeCache protoimpl.SizeCache
|
||
|
|
unknownFields protoimpl.UnknownFields
|
||
|
|
|
||
|
|
Employee *Employee `protobuf:"bytes,1,opt,name=employee,proto3" json:"employee,omitempty"`
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *EmployeeResponse) Reset() {
|
||
|
|
*x = EmployeeResponse{}
|
||
|
|
if protoimpl.UnsafeEnabled {
|
||
|
|
mi := &file_message_proto_msgTypes[2]
|
||
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
|
|
ms.StoreMessageInfo(mi)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *EmployeeResponse) String() string {
|
||
|
|
return protoimpl.X.MessageStringOf(x)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (*EmployeeResponse) ProtoMessage() {}
|
||
|
|
|
||
|
|
func (x *EmployeeResponse) ProtoReflect() protoreflect.Message {
|
||
|
|
mi := &file_message_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 EmployeeResponse.ProtoReflect.Descriptor instead.
|
||
|
|
func (*EmployeeResponse) Descriptor() ([]byte, []int) {
|
||
|
|
return file_message_proto_rawDescGZIP(), []int{2}
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *EmployeeResponse) GetEmployee() *Employee {
|
||
|
|
if x != nil {
|
||
|
|
return x.Employee
|
||
|
|
}
|
||
|
|
return nil
|
||
|
|
}
|
||
|
|
|
||
|
|
type GetAllRequest struct {
|
||
|
|
state protoimpl.MessageState
|
||
|
|
sizeCache protoimpl.SizeCache
|
||
|
|
unknownFields protoimpl.UnknownFields
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *GetAllRequest) Reset() {
|
||
|
|
*x = GetAllRequest{}
|
||
|
|
if protoimpl.UnsafeEnabled {
|
||
|
|
mi := &file_message_proto_msgTypes[3]
|
||
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
|
|
ms.StoreMessageInfo(mi)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *GetAllRequest) String() string {
|
||
|
|
return protoimpl.X.MessageStringOf(x)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (*GetAllRequest) ProtoMessage() {}
|
||
|
|
|
||
|
|
func (x *GetAllRequest) ProtoReflect() protoreflect.Message {
|
||
|
|
mi := &file_message_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 GetAllRequest.ProtoReflect.Descriptor instead.
|
||
|
|
func (*GetAllRequest) Descriptor() ([]byte, []int) {
|
||
|
|
return file_message_proto_rawDescGZIP(), []int{3}
|
||
|
|
}
|
||
|
|
|
||
|
|
type AddPhotoRequest struct {
|
||
|
|
state protoimpl.MessageState
|
||
|
|
sizeCache protoimpl.SizeCache
|
||
|
|
unknownFields protoimpl.UnknownFields
|
||
|
|
|
||
|
|
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *AddPhotoRequest) Reset() {
|
||
|
|
*x = AddPhotoRequest{}
|
||
|
|
if protoimpl.UnsafeEnabled {
|
||
|
|
mi := &file_message_proto_msgTypes[4]
|
||
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
|
|
ms.StoreMessageInfo(mi)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *AddPhotoRequest) String() string {
|
||
|
|
return protoimpl.X.MessageStringOf(x)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (*AddPhotoRequest) ProtoMessage() {}
|
||
|
|
|
||
|
|
func (x *AddPhotoRequest) ProtoReflect() protoreflect.Message {
|
||
|
|
mi := &file_message_proto_msgTypes[4]
|
||
|
|
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 AddPhotoRequest.ProtoReflect.Descriptor instead.
|
||
|
|
func (*AddPhotoRequest) Descriptor() ([]byte, []int) {
|
||
|
|
return file_message_proto_rawDescGZIP(), []int{4}
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *AddPhotoRequest) GetData() []byte {
|
||
|
|
if x != nil {
|
||
|
|
return x.Data
|
||
|
|
}
|
||
|
|
return nil
|
||
|
|
}
|
||
|
|
|
||
|
|
type AddPhotoResponse struct {
|
||
|
|
state protoimpl.MessageState
|
||
|
|
sizeCache protoimpl.SizeCache
|
||
|
|
unknownFields protoimpl.UnknownFields
|
||
|
|
|
||
|
|
IsOk bool `protobuf:"varint,1,opt,name=isOk,proto3" json:"isOk,omitempty"`
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *AddPhotoResponse) Reset() {
|
||
|
|
*x = AddPhotoResponse{}
|
||
|
|
if protoimpl.UnsafeEnabled {
|
||
|
|
mi := &file_message_proto_msgTypes[5]
|
||
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
|
|
ms.StoreMessageInfo(mi)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *AddPhotoResponse) String() string {
|
||
|
|
return protoimpl.X.MessageStringOf(x)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (*AddPhotoResponse) ProtoMessage() {}
|
||
|
|
|
||
|
|
func (x *AddPhotoResponse) ProtoReflect() protoreflect.Message {
|
||
|
|
mi := &file_message_proto_msgTypes[5]
|
||
|
|
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 AddPhotoResponse.ProtoReflect.Descriptor instead.
|
||
|
|
func (*AddPhotoResponse) Descriptor() ([]byte, []int) {
|
||
|
|
return file_message_proto_rawDescGZIP(), []int{5}
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *AddPhotoResponse) GetIsOk() bool {
|
||
|
|
if x != nil {
|
||
|
|
return x.IsOk
|
||
|
|
}
|
||
|
|
return false
|
||
|
|
}
|
||
|
|
|
||
|
|
type EmployeeRequest struct {
|
||
|
|
state protoimpl.MessageState
|
||
|
|
sizeCache protoimpl.SizeCache
|
||
|
|
unknownFields protoimpl.UnknownFields
|
||
|
|
|
||
|
|
Employee *Employee `protobuf:"bytes,1,opt,name=employee,proto3" json:"employee,omitempty"`
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *EmployeeRequest) Reset() {
|
||
|
|
*x = EmployeeRequest{}
|
||
|
|
if protoimpl.UnsafeEnabled {
|
||
|
|
mi := &file_message_proto_msgTypes[6]
|
||
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
|
|
ms.StoreMessageInfo(mi)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *EmployeeRequest) String() string {
|
||
|
|
return protoimpl.X.MessageStringOf(x)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (*EmployeeRequest) ProtoMessage() {}
|
||
|
|
|
||
|
|
func (x *EmployeeRequest) ProtoReflect() protoreflect.Message {
|
||
|
|
mi := &file_message_proto_msgTypes[6]
|
||
|
|
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 EmployeeRequest.ProtoReflect.Descriptor instead.
|
||
|
|
func (*EmployeeRequest) Descriptor() ([]byte, []int) {
|
||
|
|
return file_message_proto_rawDescGZIP(), []int{6}
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *EmployeeRequest) GetEmployee() *Employee {
|
||
|
|
if x != nil {
|
||
|
|
return x.Employee
|
||
|
|
}
|
||
|
|
return nil
|
||
|
|
}
|
||
|
|
|
||
|
|
var File_message_proto protoreflect.FileDescriptor
|
||
|
|
|
||
|
|
var file_message_proto_rawDesc = []byte{
|
||
|
|
0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
|
||
|
|
0x7c, 0x0a, 0x08, 0x45, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69,
|
||
|
|
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x6e,
|
||
|
|
0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6e, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x66,
|
||
|
|
0x69, 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
|
||
|
|
0x66, 0x69, 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x73,
|
||
|
|
0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x73,
|
||
|
|
0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x61, 0x6c, 0x61, 0x72, 0x79, 0x18,
|
||
|
|
0x05, 0x20, 0x01, 0x28, 0x02, 0x52, 0x06, 0x73, 0x61, 0x6c, 0x61, 0x72, 0x79, 0x22, 0x20, 0x0a,
|
||
|
|
0x0e, 0x47, 0x65, 0x74, 0x42, 0x79, 0x4e, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x73, 0x65, 0x74, 0x12,
|
||
|
|
0x0e, 0x0a, 0x02, 0x6e, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6e, 0x6f, 0x22,
|
||
|
|
0x39, 0x0a, 0x10, 0x45, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||
|
|
0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x08, 0x65, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x18,
|
||
|
|
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x45, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65,
|
||
|
|
0x52, 0x08, 0x65, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x22, 0x0f, 0x0a, 0x0d, 0x47, 0x65,
|
||
|
|
0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x25, 0x0a, 0x0f, 0x41,
|
||
|
|
0x64, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12,
|
||
|
|
0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61,
|
||
|
|
0x74, 0x61, 0x22, 0x26, 0x0a, 0x10, 0x41, 0x64, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x65,
|
||
|
|
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6b, 0x18, 0x01,
|
||
|
|
0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6b, 0x22, 0x38, 0x0a, 0x0f, 0x45, 0x6d,
|
||
|
|
0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a,
|
||
|
|
0x08, 0x65, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||
|
|
0x09, 0x2e, 0x45, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x52, 0x08, 0x65, 0x6d, 0x70, 0x6c,
|
||
|
|
0x6f, 0x79, 0x65, 0x65, 0x32, 0x83, 0x02, 0x0a, 0x0f, 0x45, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65,
|
||
|
|
0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x2d, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x42,
|
||
|
|
0x79, 0x4e, 0x6f, 0x12, 0x0f, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x79, 0x4e, 0x6f, 0x52, 0x65, 0x71,
|
||
|
|
0x75, 0x73, 0x65, 0x74, 0x1a, 0x11, 0x2e, 0x45, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x52,
|
||
|
|
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x41, 0x6c,
|
||
|
|
0x6c, 0x12, 0x0e, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||
|
|
0x74, 0x1a, 0x11, 0x2e, 0x45, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70,
|
||
|
|
0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x31, 0x0a, 0x08, 0x41, 0x64, 0x64, 0x50, 0x68, 0x6f,
|
||
|
|
0x74, 0x6f, 0x12, 0x10, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x65, 0x71,
|
||
|
|
0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52,
|
||
|
|
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x12, 0x2b, 0x0a, 0x04, 0x53, 0x61, 0x76,
|
||
|
|
0x65, 0x12, 0x10, 0x2e, 0x45, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75,
|
||
|
|
0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x45, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x52, 0x65,
|
||
|
|
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x07, 0x53, 0x61, 0x76, 0x65, 0x41, 0x6c,
|
||
|
|
0x6c, 0x12, 0x10, 0x2e, 0x45, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75,
|
||
|
|
0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x45, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x52, 0x65,
|
||
|
|
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x42, 0x07, 0x5a, 0x05, 0x2e, 0x2f,
|
||
|
|
0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||
|
|
}
|
||
|
|
|
||
|
|
var (
|
||
|
|
file_message_proto_rawDescOnce sync.Once
|
||
|
|
file_message_proto_rawDescData = file_message_proto_rawDesc
|
||
|
|
)
|
||
|
|
|
||
|
|
func file_message_proto_rawDescGZIP() []byte {
|
||
|
|
file_message_proto_rawDescOnce.Do(func() {
|
||
|
|
file_message_proto_rawDescData = protoimpl.X.CompressGZIP(file_message_proto_rawDescData)
|
||
|
|
})
|
||
|
|
return file_message_proto_rawDescData
|
||
|
|
}
|
||
|
|
|
||
|
|
var file_message_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
||
|
|
var file_message_proto_goTypes = []interface{}{
|
||
|
|
(*Employee)(nil), // 0: Employee
|
||
|
|
(*GetByNoRequset)(nil), // 1: GetByNoRequset
|
||
|
|
(*EmployeeResponse)(nil), // 2: EmployeeResponse
|
||
|
|
(*GetAllRequest)(nil), // 3: GetAllRequest
|
||
|
|
(*AddPhotoRequest)(nil), // 4: AddPhotoRequest
|
||
|
|
(*AddPhotoResponse)(nil), // 5: AddPhotoResponse
|
||
|
|
(*EmployeeRequest)(nil), // 6: EmployeeRequest
|
||
|
|
}
|
||
|
|
var file_message_proto_depIdxs = []int32{
|
||
|
|
0, // 0: EmployeeResponse.employee:type_name -> Employee
|
||
|
|
0, // 1: EmployeeRequest.employee:type_name -> Employee
|
||
|
|
1, // 2: EmployeeService.GetByNo:input_type -> GetByNoRequset
|
||
|
|
3, // 3: EmployeeService.GetAll:input_type -> GetAllRequest
|
||
|
|
4, // 4: EmployeeService.AddPhoto:input_type -> AddPhotoRequest
|
||
|
|
6, // 5: EmployeeService.Save:input_type -> EmployeeRequest
|
||
|
|
6, // 6: EmployeeService.SaveAll:input_type -> EmployeeRequest
|
||
|
|
2, // 7: EmployeeService.GetByNo:output_type -> EmployeeResponse
|
||
|
|
2, // 8: EmployeeService.GetAll:output_type -> EmployeeResponse
|
||
|
|
5, // 9: EmployeeService.AddPhoto:output_type -> AddPhotoResponse
|
||
|
|
2, // 10: EmployeeService.Save:output_type -> EmployeeResponse
|
||
|
|
2, // 11: EmployeeService.SaveAll:output_type -> EmployeeResponse
|
||
|
|
7, // [7:12] is the sub-list for method output_type
|
||
|
|
2, // [2:7] is the sub-list for method input_type
|
||
|
|
2, // [2:2] is the sub-list for extension type_name
|
||
|
|
2, // [2:2] is the sub-list for extension extendee
|
||
|
|
0, // [0:2] is the sub-list for field type_name
|
||
|
|
}
|
||
|
|
|
||
|
|
func init() { file_message_proto_init() }
|
||
|
|
func file_message_proto_init() {
|
||
|
|
if File_message_proto != nil {
|
||
|
|
return
|
||
|
|
}
|
||
|
|
if !protoimpl.UnsafeEnabled {
|
||
|
|
file_message_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||
|
|
switch v := v.(*Employee); i {
|
||
|
|
case 0:
|
||
|
|
return &v.state
|
||
|
|
case 1:
|
||
|
|
return &v.sizeCache
|
||
|
|
case 2:
|
||
|
|
return &v.unknownFields
|
||
|
|
default:
|
||
|
|
return nil
|
||
|
|
}
|
||
|
|
}
|
||
|
|
file_message_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||
|
|
switch v := v.(*GetByNoRequset); i {
|
||
|
|
case 0:
|
||
|
|
return &v.state
|
||
|
|
case 1:
|
||
|
|
return &v.sizeCache
|
||
|
|
case 2:
|
||
|
|
return &v.unknownFields
|
||
|
|
default:
|
||
|
|
return nil
|
||
|
|
}
|
||
|
|
}
|
||
|
|
file_message_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||
|
|
switch v := v.(*EmployeeResponse); i {
|
||
|
|
case 0:
|
||
|
|
return &v.state
|
||
|
|
case 1:
|
||
|
|
return &v.sizeCache
|
||
|
|
case 2:
|
||
|
|
return &v.unknownFields
|
||
|
|
default:
|
||
|
|
return nil
|
||
|
|
}
|
||
|
|
}
|
||
|
|
file_message_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||
|
|
switch v := v.(*GetAllRequest); i {
|
||
|
|
case 0:
|
||
|
|
return &v.state
|
||
|
|
case 1:
|
||
|
|
return &v.sizeCache
|
||
|
|
case 2:
|
||
|
|
return &v.unknownFields
|
||
|
|
default:
|
||
|
|
return nil
|
||
|
|
}
|
||
|
|
}
|
||
|
|
file_message_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||
|
|
switch v := v.(*AddPhotoRequest); i {
|
||
|
|
case 0:
|
||
|
|
return &v.state
|
||
|
|
case 1:
|
||
|
|
return &v.sizeCache
|
||
|
|
case 2:
|
||
|
|
return &v.unknownFields
|
||
|
|
default:
|
||
|
|
return nil
|
||
|
|
}
|
||
|
|
}
|
||
|
|
file_message_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||
|
|
switch v := v.(*AddPhotoResponse); i {
|
||
|
|
case 0:
|
||
|
|
return &v.state
|
||
|
|
case 1:
|
||
|
|
return &v.sizeCache
|
||
|
|
case 2:
|
||
|
|
return &v.unknownFields
|
||
|
|
default:
|
||
|
|
return nil
|
||
|
|
}
|
||
|
|
}
|
||
|
|
file_message_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||
|
|
switch v := v.(*EmployeeRequest); 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_message_proto_rawDesc,
|
||
|
|
NumEnums: 0,
|
||
|
|
NumMessages: 7,
|
||
|
|
NumExtensions: 0,
|
||
|
|
NumServices: 1,
|
||
|
|
},
|
||
|
|
GoTypes: file_message_proto_goTypes,
|
||
|
|
DependencyIndexes: file_message_proto_depIdxs,
|
||
|
|
MessageInfos: file_message_proto_msgTypes,
|
||
|
|
}.Build()
|
||
|
|
File_message_proto = out.File
|
||
|
|
file_message_proto_rawDesc = nil
|
||
|
|
file_message_proto_goTypes = nil
|
||
|
|
file_message_proto_depIdxs = nil
|
||
|
|
}
|
||
|
|
|
||
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
||
|
|
var _ context.Context
|
||
|
|
var _ grpc.ClientConnInterface
|
||
|
|
|
||
|
|
// This is a compile-time assertion to ensure that this generated file
|
||
|
|
// is compatible with the grpc package it is being compiled against.
|
||
|
|
const _ = grpc.SupportPackageIsVersion6
|
||
|
|
|
||
|
|
// EmployeeServiceClient is the client API for EmployeeService service.
|
||
|
|
//
|
||
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||
|
|
type EmployeeServiceClient interface {
|
||
|
|
GetByNo(ctx context.Context, in *GetByNoRequset, opts ...grpc.CallOption) (*EmployeeResponse, error)
|
||
|
|
GetAll(ctx context.Context, in *GetAllRequest, opts ...grpc.CallOption) (EmployeeService_GetAllClient, error)
|
||
|
|
AddPhoto(ctx context.Context, opts ...grpc.CallOption) (EmployeeService_AddPhotoClient, error)
|
||
|
|
Save(ctx context.Context, in *EmployeeRequest, opts ...grpc.CallOption) (*EmployeeResponse, error)
|
||
|
|
SaveAll(ctx context.Context, opts ...grpc.CallOption) (EmployeeService_SaveAllClient, error)
|
||
|
|
}
|
||
|
|
|
||
|
|
type employeeServiceClient struct {
|
||
|
|
cc grpc.ClientConnInterface
|
||
|
|
}
|
||
|
|
|
||
|
|
func NewEmployeeServiceClient(cc grpc.ClientConnInterface) EmployeeServiceClient {
|
||
|
|
return &employeeServiceClient{cc}
|
||
|
|
}
|
||
|
|
|
||
|
|
func (c *employeeServiceClient) GetByNo(ctx context.Context, in *GetByNoRequset, opts ...grpc.CallOption) (*EmployeeResponse, error) {
|
||
|
|
out := new(EmployeeResponse)
|
||
|
|
err := c.cc.Invoke(ctx, "/EmployeeService/GetByNo", in, out, opts...)
|
||
|
|
if err != nil {
|
||
|
|
return nil, err
|
||
|
|
}
|
||
|
|
return out, nil
|
||
|
|
}
|
||
|
|
|
||
|
|
func (c *employeeServiceClient) GetAll(ctx context.Context, in *GetAllRequest, opts ...grpc.CallOption) (EmployeeService_GetAllClient, error) {
|
||
|
|
stream, err := c.cc.NewStream(ctx, &_EmployeeService_serviceDesc.Streams[0], "/EmployeeService/GetAll", opts...)
|
||
|
|
if err != nil {
|
||
|
|
return nil, err
|
||
|
|
}
|
||
|
|
x := &employeeServiceGetAllClient{stream}
|
||
|
|
if err := x.ClientStream.SendMsg(in); err != nil {
|
||
|
|
return nil, err
|
||
|
|
}
|
||
|
|
if err := x.ClientStream.CloseSend(); err != nil {
|
||
|
|
return nil, err
|
||
|
|
}
|
||
|
|
return x, nil
|
||
|
|
}
|
||
|
|
|
||
|
|
type EmployeeService_GetAllClient interface {
|
||
|
|
Recv() (*EmployeeResponse, error)
|
||
|
|
grpc.ClientStream
|
||
|
|
}
|
||
|
|
|
||
|
|
type employeeServiceGetAllClient struct {
|
||
|
|
grpc.ClientStream
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *employeeServiceGetAllClient) Recv() (*EmployeeResponse, error) {
|
||
|
|
m := new(EmployeeResponse)
|
||
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||
|
|
return nil, err
|
||
|
|
}
|
||
|
|
return m, nil
|
||
|
|
}
|
||
|
|
|
||
|
|
func (c *employeeServiceClient) AddPhoto(ctx context.Context, opts ...grpc.CallOption) (EmployeeService_AddPhotoClient, error) {
|
||
|
|
stream, err := c.cc.NewStream(ctx, &_EmployeeService_serviceDesc.Streams[1], "/EmployeeService/AddPhoto", opts...)
|
||
|
|
if err != nil {
|
||
|
|
return nil, err
|
||
|
|
}
|
||
|
|
x := &employeeServiceAddPhotoClient{stream}
|
||
|
|
return x, nil
|
||
|
|
}
|
||
|
|
|
||
|
|
type EmployeeService_AddPhotoClient interface {
|
||
|
|
Send(*AddPhotoRequest) error
|
||
|
|
CloseAndRecv() (*AddPhotoResponse, error)
|
||
|
|
grpc.ClientStream
|
||
|
|
}
|
||
|
|
|
||
|
|
type employeeServiceAddPhotoClient struct {
|
||
|
|
grpc.ClientStream
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *employeeServiceAddPhotoClient) Send(m *AddPhotoRequest) error {
|
||
|
|
return x.ClientStream.SendMsg(m)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *employeeServiceAddPhotoClient) CloseAndRecv() (*AddPhotoResponse, error) {
|
||
|
|
if err := x.ClientStream.CloseSend(); err != nil {
|
||
|
|
return nil, err
|
||
|
|
}
|
||
|
|
m := new(AddPhotoResponse)
|
||
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||
|
|
return nil, err
|
||
|
|
}
|
||
|
|
return m, nil
|
||
|
|
}
|
||
|
|
|
||
|
|
func (c *employeeServiceClient) Save(ctx context.Context, in *EmployeeRequest, opts ...grpc.CallOption) (*EmployeeResponse, error) {
|
||
|
|
out := new(EmployeeResponse)
|
||
|
|
err := c.cc.Invoke(ctx, "/EmployeeService/Save", in, out, opts...)
|
||
|
|
if err != nil {
|
||
|
|
return nil, err
|
||
|
|
}
|
||
|
|
return out, nil
|
||
|
|
}
|
||
|
|
|
||
|
|
func (c *employeeServiceClient) SaveAll(ctx context.Context, opts ...grpc.CallOption) (EmployeeService_SaveAllClient, error) {
|
||
|
|
stream, err := c.cc.NewStream(ctx, &_EmployeeService_serviceDesc.Streams[2], "/EmployeeService/SaveAll", opts...)
|
||
|
|
if err != nil {
|
||
|
|
return nil, err
|
||
|
|
}
|
||
|
|
x := &employeeServiceSaveAllClient{stream}
|
||
|
|
return x, nil
|
||
|
|
}
|
||
|
|
|
||
|
|
type EmployeeService_SaveAllClient interface {
|
||
|
|
Send(*EmployeeRequest) error
|
||
|
|
Recv() (*EmployeeResponse, error)
|
||
|
|
grpc.ClientStream
|
||
|
|
}
|
||
|
|
|
||
|
|
type employeeServiceSaveAllClient struct {
|
||
|
|
grpc.ClientStream
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *employeeServiceSaveAllClient) Send(m *EmployeeRequest) error {
|
||
|
|
return x.ClientStream.SendMsg(m)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *employeeServiceSaveAllClient) Recv() (*EmployeeResponse, error) {
|
||
|
|
m := new(EmployeeResponse)
|
||
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||
|
|
return nil, err
|
||
|
|
}
|
||
|
|
return m, nil
|
||
|
|
}
|
||
|
|
|
||
|
|
// EmployeeServiceServer is the server API for EmployeeService service.
|
||
|
|
type EmployeeServiceServer interface {
|
||
|
|
GetByNo(context.Context, *GetByNoRequset) (*EmployeeResponse, error)
|
||
|
|
GetAll(*GetAllRequest, EmployeeService_GetAllServer) error
|
||
|
|
AddPhoto(EmployeeService_AddPhotoServer) error
|
||
|
|
Save(context.Context, *EmployeeRequest) (*EmployeeResponse, error)
|
||
|
|
SaveAll(EmployeeService_SaveAllServer) error
|
||
|
|
}
|
||
|
|
|
||
|
|
// UnimplementedEmployeeServiceServer can be embedded to have forward compatible implementations.
|
||
|
|
type UnimplementedEmployeeServiceServer struct {
|
||
|
|
}
|
||
|
|
|
||
|
|
func (*UnimplementedEmployeeServiceServer) GetByNo(context.Context, *GetByNoRequset) (*EmployeeResponse, error) {
|
||
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetByNo not implemented")
|
||
|
|
}
|
||
|
|
func (*UnimplementedEmployeeServiceServer) GetAll(*GetAllRequest, EmployeeService_GetAllServer) error {
|
||
|
|
return status.Errorf(codes.Unimplemented, "method GetAll not implemented")
|
||
|
|
}
|
||
|
|
func (*UnimplementedEmployeeServiceServer) AddPhoto(EmployeeService_AddPhotoServer) error {
|
||
|
|
return status.Errorf(codes.Unimplemented, "method AddPhoto not implemented")
|
||
|
|
}
|
||
|
|
func (*UnimplementedEmployeeServiceServer) Save(context.Context, *EmployeeRequest) (*EmployeeResponse, error) {
|
||
|
|
return nil, status.Errorf(codes.Unimplemented, "method Save not implemented")
|
||
|
|
}
|
||
|
|
func (*UnimplementedEmployeeServiceServer) SaveAll(EmployeeService_SaveAllServer) error {
|
||
|
|
return status.Errorf(codes.Unimplemented, "method SaveAll not implemented")
|
||
|
|
}
|
||
|
|
|
||
|
|
func RegisterEmployeeServiceServer(s *grpc.Server, srv EmployeeServiceServer) {
|
||
|
|
s.RegisterService(&_EmployeeService_serviceDesc, srv)
|
||
|
|
}
|
||
|
|
|
||
|
|
func _EmployeeService_GetByNo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
|
in := new(GetByNoRequset)
|
||
|
|
if err := dec(in); err != nil {
|
||
|
|
return nil, err
|
||
|
|
}
|
||
|
|
if interceptor == nil {
|
||
|
|
return srv.(EmployeeServiceServer).GetByNo(ctx, in)
|
||
|
|
}
|
||
|
|
info := &grpc.UnaryServerInfo{
|
||
|
|
Server: srv,
|
||
|
|
FullMethod: "/EmployeeService/GetByNo",
|
||
|
|
}
|
||
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
|
return srv.(EmployeeServiceServer).GetByNo(ctx, req.(*GetByNoRequset))
|
||
|
|
}
|
||
|
|
return interceptor(ctx, in, info, handler)
|
||
|
|
}
|
||
|
|
|
||
|
|
func _EmployeeService_GetAll_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||
|
|
m := new(GetAllRequest)
|
||
|
|
if err := stream.RecvMsg(m); err != nil {
|
||
|
|
return err
|
||
|
|
}
|
||
|
|
return srv.(EmployeeServiceServer).GetAll(m, &employeeServiceGetAllServer{stream})
|
||
|
|
}
|
||
|
|
|
||
|
|
type EmployeeService_GetAllServer interface {
|
||
|
|
Send(*EmployeeResponse) error
|
||
|
|
grpc.ServerStream
|
||
|
|
}
|
||
|
|
|
||
|
|
type employeeServiceGetAllServer struct {
|
||
|
|
grpc.ServerStream
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *employeeServiceGetAllServer) Send(m *EmployeeResponse) error {
|
||
|
|
return x.ServerStream.SendMsg(m)
|
||
|
|
}
|
||
|
|
|
||
|
|
func _EmployeeService_AddPhoto_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||
|
|
return srv.(EmployeeServiceServer).AddPhoto(&employeeServiceAddPhotoServer{stream})
|
||
|
|
}
|
||
|
|
|
||
|
|
type EmployeeService_AddPhotoServer interface {
|
||
|
|
SendAndClose(*AddPhotoResponse) error
|
||
|
|
Recv() (*AddPhotoRequest, error)
|
||
|
|
grpc.ServerStream
|
||
|
|
}
|
||
|
|
|
||
|
|
type employeeServiceAddPhotoServer struct {
|
||
|
|
grpc.ServerStream
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *employeeServiceAddPhotoServer) SendAndClose(m *AddPhotoResponse) error {
|
||
|
|
return x.ServerStream.SendMsg(m)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *employeeServiceAddPhotoServer) Recv() (*AddPhotoRequest, error) {
|
||
|
|
m := new(AddPhotoRequest)
|
||
|
|
if err := x.ServerStream.RecvMsg(m); err != nil {
|
||
|
|
return nil, err
|
||
|
|
}
|
||
|
|
return m, nil
|
||
|
|
}
|
||
|
|
|
||
|
|
func _EmployeeService_Save_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
|
in := new(EmployeeRequest)
|
||
|
|
if err := dec(in); err != nil {
|
||
|
|
return nil, err
|
||
|
|
}
|
||
|
|
if interceptor == nil {
|
||
|
|
return srv.(EmployeeServiceServer).Save(ctx, in)
|
||
|
|
}
|
||
|
|
info := &grpc.UnaryServerInfo{
|
||
|
|
Server: srv,
|
||
|
|
FullMethod: "/EmployeeService/Save",
|
||
|
|
}
|
||
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
|
return srv.(EmployeeServiceServer).Save(ctx, req.(*EmployeeRequest))
|
||
|
|
}
|
||
|
|
return interceptor(ctx, in, info, handler)
|
||
|
|
}
|
||
|
|
|
||
|
|
func _EmployeeService_SaveAll_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||
|
|
return srv.(EmployeeServiceServer).SaveAll(&employeeServiceSaveAllServer{stream})
|
||
|
|
}
|
||
|
|
|
||
|
|
type EmployeeService_SaveAllServer interface {
|
||
|
|
Send(*EmployeeResponse) error
|
||
|
|
Recv() (*EmployeeRequest, error)
|
||
|
|
grpc.ServerStream
|
||
|
|
}
|
||
|
|
|
||
|
|
type employeeServiceSaveAllServer struct {
|
||
|
|
grpc.ServerStream
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *employeeServiceSaveAllServer) Send(m *EmployeeResponse) error {
|
||
|
|
return x.ServerStream.SendMsg(m)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *employeeServiceSaveAllServer) Recv() (*EmployeeRequest, error) {
|
||
|
|
m := new(EmployeeRequest)
|
||
|
|
if err := x.ServerStream.RecvMsg(m); err != nil {
|
||
|
|
return nil, err
|
||
|
|
}
|
||
|
|
return m, nil
|
||
|
|
}
|
||
|
|
|
||
|
|
var _EmployeeService_serviceDesc = grpc.ServiceDesc{
|
||
|
|
ServiceName: "EmployeeService",
|
||
|
|
HandlerType: (*EmployeeServiceServer)(nil),
|
||
|
|
Methods: []grpc.MethodDesc{
|
||
|
|
{
|
||
|
|
MethodName: "GetByNo",
|
||
|
|
Handler: _EmployeeService_GetByNo_Handler,
|
||
|
|
},
|
||
|
|
{
|
||
|
|
MethodName: "Save",
|
||
|
|
Handler: _EmployeeService_Save_Handler,
|
||
|
|
},
|
||
|
|
},
|
||
|
|
Streams: []grpc.StreamDesc{
|
||
|
|
{
|
||
|
|
StreamName: "GetAll",
|
||
|
|
Handler: _EmployeeService_GetAll_Handler,
|
||
|
|
ServerStreams: true,
|
||
|
|
},
|
||
|
|
{
|
||
|
|
StreamName: "AddPhoto",
|
||
|
|
Handler: _EmployeeService_AddPhoto_Handler,
|
||
|
|
ClientStreams: true,
|
||
|
|
},
|
||
|
|
{
|
||
|
|
StreamName: "SaveAll",
|
||
|
|
Handler: _EmployeeService_SaveAll_Handler,
|
||
|
|
ServerStreams: true,
|
||
|
|
ClientStreams: true,
|
||
|
|
},
|
||
|
|
},
|
||
|
|
Metadata: "message.proto",
|
||
|
|
}
|