src.dualinventive.com/go/companies-service/grpc/interface.pb.go

459 lines
17 KiB
Go

// Code generated by protoc-gen-go. DO NOT EDIT.
// source: interface.proto
package grpc
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type GetCompaniesRequest_SortCol int32
const (
GetCompaniesRequest_ID_ASC GetCompaniesRequest_SortCol = 0
GetCompaniesRequest_ID_DESC GetCompaniesRequest_SortCol = 1
GetCompaniesRequest_NAME_ASC GetCompaniesRequest_SortCol = 2
GetCompaniesRequest_NAME_DESC GetCompaniesRequest_SortCol = 3
)
var GetCompaniesRequest_SortCol_name = map[int32]string{
0: "ID_ASC",
1: "ID_DESC",
2: "NAME_ASC",
3: "NAME_DESC",
}
var GetCompaniesRequest_SortCol_value = map[string]int32{
"ID_ASC": 0,
"ID_DESC": 1,
"NAME_ASC": 2,
"NAME_DESC": 3,
}
func (x GetCompaniesRequest_SortCol) String() string {
return proto.EnumName(GetCompaniesRequest_SortCol_name, int32(x))
}
func (GetCompaniesRequest_SortCol) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_interface_17ea634b4ef6db7f, []int{3, 0}
}
type GetCompanyByIDRequest struct {
CompanyID uint64 `protobuf:"varint,1,opt,name=companyID,proto3" json:"companyID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetCompanyByIDRequest) Reset() { *m = GetCompanyByIDRequest{} }
func (m *GetCompanyByIDRequest) String() string { return proto.CompactTextString(m) }
func (*GetCompanyByIDRequest) ProtoMessage() {}
func (*GetCompanyByIDRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_interface_17ea634b4ef6db7f, []int{0}
}
func (m *GetCompanyByIDRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetCompanyByIDRequest.Unmarshal(m, b)
}
func (m *GetCompanyByIDRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetCompanyByIDRequest.Marshal(b, m, deterministic)
}
func (dst *GetCompanyByIDRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetCompanyByIDRequest.Merge(dst, src)
}
func (m *GetCompanyByIDRequest) XXX_Size() int {
return xxx_messageInfo_GetCompanyByIDRequest.Size(m)
}
func (m *GetCompanyByIDRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetCompanyByIDRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetCompanyByIDRequest proto.InternalMessageInfo
func (m *GetCompanyByIDRequest) GetCompanyID() uint64 {
if m != nil {
return m.CompanyID
}
return 0
}
type GetCompanyByIDResponse struct {
Company *Company `protobuf:"bytes,1,opt,name=company,proto3" json:"company,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetCompanyByIDResponse) Reset() { *m = GetCompanyByIDResponse{} }
func (m *GetCompanyByIDResponse) String() string { return proto.CompactTextString(m) }
func (*GetCompanyByIDResponse) ProtoMessage() {}
func (*GetCompanyByIDResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_interface_17ea634b4ef6db7f, []int{1}
}
func (m *GetCompanyByIDResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetCompanyByIDResponse.Unmarshal(m, b)
}
func (m *GetCompanyByIDResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetCompanyByIDResponse.Marshal(b, m, deterministic)
}
func (dst *GetCompanyByIDResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetCompanyByIDResponse.Merge(dst, src)
}
func (m *GetCompanyByIDResponse) XXX_Size() int {
return xxx_messageInfo_GetCompanyByIDResponse.Size(m)
}
func (m *GetCompanyByIDResponse) XXX_DiscardUnknown() {
xxx_messageInfo_GetCompanyByIDResponse.DiscardUnknown(m)
}
var xxx_messageInfo_GetCompanyByIDResponse proto.InternalMessageInfo
func (m *GetCompanyByIDResponse) GetCompany() *Company {
if m != nil {
return m.Company
}
return nil
}
type Company struct {
CompanyID uint64 `protobuf:"varint,1,opt,name=companyID,proto3" json:"companyID,omitempty"`
CompanyCode string `protobuf:"bytes,2,opt,name=companyCode,proto3" json:"companyCode,omitempty"`
CompanyName string `protobuf:"bytes,3,opt,name=companyName,proto3" json:"companyName,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Company) Reset() { *m = Company{} }
func (m *Company) String() string { return proto.CompactTextString(m) }
func (*Company) ProtoMessage() {}
func (*Company) Descriptor() ([]byte, []int) {
return fileDescriptor_interface_17ea634b4ef6db7f, []int{2}
}
func (m *Company) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Company.Unmarshal(m, b)
}
func (m *Company) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Company.Marshal(b, m, deterministic)
}
func (dst *Company) XXX_Merge(src proto.Message) {
xxx_messageInfo_Company.Merge(dst, src)
}
func (m *Company) XXX_Size() int {
return xxx_messageInfo_Company.Size(m)
}
func (m *Company) XXX_DiscardUnknown() {
xxx_messageInfo_Company.DiscardUnknown(m)
}
var xxx_messageInfo_Company proto.InternalMessageInfo
func (m *Company) GetCompanyID() uint64 {
if m != nil {
return m.CompanyID
}
return 0
}
func (m *Company) GetCompanyCode() string {
if m != nil {
return m.CompanyCode
}
return ""
}
func (m *Company) GetCompanyName() string {
if m != nil {
return m.CompanyName
}
return ""
}
type GetCompaniesRequest struct {
Page uint64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`
PerPage uint64 `protobuf:"varint,2,opt,name=per_page,json=perPage,proto3" json:"per_page,omitempty"`
Sort GetCompaniesRequest_SortCol `protobuf:"varint,3,opt,name=sort,proto3,enum=companiesservice.GetCompaniesRequest_SortCol" json:"sort,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetCompaniesRequest) Reset() { *m = GetCompaniesRequest{} }
func (m *GetCompaniesRequest) String() string { return proto.CompactTextString(m) }
func (*GetCompaniesRequest) ProtoMessage() {}
func (*GetCompaniesRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_interface_17ea634b4ef6db7f, []int{3}
}
func (m *GetCompaniesRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetCompaniesRequest.Unmarshal(m, b)
}
func (m *GetCompaniesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetCompaniesRequest.Marshal(b, m, deterministic)
}
func (dst *GetCompaniesRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetCompaniesRequest.Merge(dst, src)
}
func (m *GetCompaniesRequest) XXX_Size() int {
return xxx_messageInfo_GetCompaniesRequest.Size(m)
}
func (m *GetCompaniesRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetCompaniesRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetCompaniesRequest proto.InternalMessageInfo
func (m *GetCompaniesRequest) GetPage() uint64 {
if m != nil {
return m.Page
}
return 0
}
func (m *GetCompaniesRequest) GetPerPage() uint64 {
if m != nil {
return m.PerPage
}
return 0
}
func (m *GetCompaniesRequest) GetSort() GetCompaniesRequest_SortCol {
if m != nil {
return m.Sort
}
return GetCompaniesRequest_ID_ASC
}
type GetCompaniesResponse struct {
Companies []*Company `protobuf:"bytes,1,rep,name=companies,proto3" json:"companies,omitempty"`
Count uint64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetCompaniesResponse) Reset() { *m = GetCompaniesResponse{} }
func (m *GetCompaniesResponse) String() string { return proto.CompactTextString(m) }
func (*GetCompaniesResponse) ProtoMessage() {}
func (*GetCompaniesResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_interface_17ea634b4ef6db7f, []int{4}
}
func (m *GetCompaniesResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetCompaniesResponse.Unmarshal(m, b)
}
func (m *GetCompaniesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetCompaniesResponse.Marshal(b, m, deterministic)
}
func (dst *GetCompaniesResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetCompaniesResponse.Merge(dst, src)
}
func (m *GetCompaniesResponse) XXX_Size() int {
return xxx_messageInfo_GetCompaniesResponse.Size(m)
}
func (m *GetCompaniesResponse) XXX_DiscardUnknown() {
xxx_messageInfo_GetCompaniesResponse.DiscardUnknown(m)
}
var xxx_messageInfo_GetCompaniesResponse proto.InternalMessageInfo
func (m *GetCompaniesResponse) GetCompanies() []*Company {
if m != nil {
return m.Companies
}
return nil
}
func (m *GetCompaniesResponse) GetCount() uint64 {
if m != nil {
return m.Count
}
return 0
}
type Empty struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Empty) Reset() { *m = Empty{} }
func (m *Empty) String() string { return proto.CompactTextString(m) }
func (*Empty) ProtoMessage() {}
func (*Empty) Descriptor() ([]byte, []int) {
return fileDescriptor_interface_17ea634b4ef6db7f, []int{5}
}
func (m *Empty) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Empty.Unmarshal(m, b)
}
func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Empty.Marshal(b, m, deterministic)
}
func (dst *Empty) XXX_Merge(src proto.Message) {
xxx_messageInfo_Empty.Merge(dst, src)
}
func (m *Empty) XXX_Size() int {
return xxx_messageInfo_Empty.Size(m)
}
func (m *Empty) XXX_DiscardUnknown() {
xxx_messageInfo_Empty.DiscardUnknown(m)
}
var xxx_messageInfo_Empty proto.InternalMessageInfo
func init() {
proto.RegisterType((*GetCompanyByIDRequest)(nil), "companiesservice.GetCompanyByIDRequest")
proto.RegisterType((*GetCompanyByIDResponse)(nil), "companiesservice.GetCompanyByIDResponse")
proto.RegisterType((*Company)(nil), "companiesservice.Company")
proto.RegisterType((*GetCompaniesRequest)(nil), "companiesservice.GetCompaniesRequest")
proto.RegisterType((*GetCompaniesResponse)(nil), "companiesservice.GetCompaniesResponse")
proto.RegisterType((*Empty)(nil), "companiesservice.Empty")
proto.RegisterEnum("companiesservice.GetCompaniesRequest_SortCol", GetCompaniesRequest_SortCol_name, GetCompaniesRequest_SortCol_value)
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// 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.SupportPackageIsVersion4
// CompaniesServiceClient is the client API for CompaniesService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type CompaniesServiceClient interface {
GetCompanyByID(ctx context.Context, in *GetCompanyByIDRequest, opts ...grpc.CallOption) (*GetCompanyByIDResponse, error)
GetCompanies(ctx context.Context, in *GetCompaniesRequest, opts ...grpc.CallOption) (*GetCompaniesResponse, error)
}
type companiesServiceClient struct {
cc *grpc.ClientConn
}
func NewCompaniesServiceClient(cc *grpc.ClientConn) CompaniesServiceClient {
return &companiesServiceClient{cc}
}
func (c *companiesServiceClient) GetCompanyByID(ctx context.Context, in *GetCompanyByIDRequest, opts ...grpc.CallOption) (*GetCompanyByIDResponse, error) {
out := new(GetCompanyByIDResponse)
err := c.cc.Invoke(ctx, "/companiesservice.CompaniesService/GetCompanyByID", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *companiesServiceClient) GetCompanies(ctx context.Context, in *GetCompaniesRequest, opts ...grpc.CallOption) (*GetCompaniesResponse, error) {
out := new(GetCompaniesResponse)
err := c.cc.Invoke(ctx, "/companiesservice.CompaniesService/GetCompanies", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// CompaniesServiceServer is the server API for CompaniesService service.
type CompaniesServiceServer interface {
GetCompanyByID(context.Context, *GetCompanyByIDRequest) (*GetCompanyByIDResponse, error)
GetCompanies(context.Context, *GetCompaniesRequest) (*GetCompaniesResponse, error)
}
func RegisterCompaniesServiceServer(s *grpc.Server, srv CompaniesServiceServer) {
s.RegisterService(&_CompaniesService_serviceDesc, srv)
}
func _CompaniesService_GetCompanyByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetCompanyByIDRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CompaniesServiceServer).GetCompanyByID(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/companiesservice.CompaniesService/GetCompanyByID",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CompaniesServiceServer).GetCompanyByID(ctx, req.(*GetCompanyByIDRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CompaniesService_GetCompanies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetCompaniesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CompaniesServiceServer).GetCompanies(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/companiesservice.CompaniesService/GetCompanies",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CompaniesServiceServer).GetCompanies(ctx, req.(*GetCompaniesRequest))
}
return interceptor(ctx, in, info, handler)
}
var _CompaniesService_serviceDesc = grpc.ServiceDesc{
ServiceName: "companiesservice.CompaniesService",
HandlerType: (*CompaniesServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetCompanyByID",
Handler: _CompaniesService_GetCompanyByID_Handler,
},
{
MethodName: "GetCompanies",
Handler: _CompaniesService_GetCompanies_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "interface.proto",
}
func init() { proto.RegisterFile("interface.proto", fileDescriptor_interface_17ea634b4ef6db7f) }
var fileDescriptor_interface_17ea634b4ef6db7f = []byte{
// 380 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0x41, 0xcf, 0xd2, 0x40,
0x10, 0xb5, 0x50, 0x28, 0x0c, 0x88, 0xcd, 0x8a, 0xa6, 0x10, 0x0f, 0x4d, 0x13, 0x95, 0x8b, 0x3d,
0x40, 0x8c, 0x47, 0x03, 0x2d, 0x31, 0x3d, 0x40, 0x4c, 0x7b, 0x33, 0x31, 0xa4, 0xd6, 0x91, 0x34,
0x4a, 0x77, 0xdd, 0x5d, 0x4c, 0xfa, 0x0f, 0xfd, 0x05, 0xfe, 0x1e, 0xc3, 0x76, 0x81, 0x82, 0x06,
0xbe, 0x5b, 0xe7, 0xcd, 0x7b, 0xfb, 0xfa, 0x66, 0x67, 0xe1, 0x49, 0x5e, 0x48, 0xe4, 0xdf, 0xd2,
0x0c, 0x7d, 0xc6, 0xa9, 0xa4, 0xc4, 0xce, 0xe8, 0x8e, 0xa5, 0x45, 0x8e, 0x42, 0x20, 0xff, 0x95,
0x67, 0xe8, 0xbd, 0x85, 0x67, 0x1f, 0x50, 0x06, 0x0a, 0x2e, 0x17, 0x65, 0x14, 0xc6, 0xf8, 0x73,
0x8f, 0x42, 0x92, 0x17, 0xd0, 0xad, 0xc8, 0x65, 0x14, 0x3a, 0x86, 0x6b, 0x4c, 0xcc, 0xf8, 0x0c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