x
This commit is contained in:
@@ -0,0 +1,211 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc (unknown)
|
||||
// source: pet/v1/pet.proto
|
||||
|
||||
package petv1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
// PetStoreServiceClient is the client API for PetStoreService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type PetStoreServiceClient interface {
|
||||
GetPet(ctx context.Context, in *GetPetRequest, opts ...grpc.CallOption) (*GetPetResponse, error)
|
||||
PutPet(ctx context.Context, in *PutPetRequest, opts ...grpc.CallOption) (*PutPetResponse, error)
|
||||
DeletePet(ctx context.Context, in *DeletePetRequest, opts ...grpc.CallOption) (*DeletePetResponse, error)
|
||||
PurchasePet(ctx context.Context, in *PurchasePetRequest, opts ...grpc.CallOption) (*PurchasePetResponse, error)
|
||||
}
|
||||
|
||||
type petStoreServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewPetStoreServiceClient(cc grpc.ClientConnInterface) PetStoreServiceClient {
|
||||
return &petStoreServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *petStoreServiceClient) GetPet(ctx context.Context, in *GetPetRequest, opts ...grpc.CallOption) (*GetPetResponse, error) {
|
||||
out := new(GetPetResponse)
|
||||
err := c.cc.Invoke(ctx, "/pet.v1.PetStoreService/GetPet", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *petStoreServiceClient) PutPet(ctx context.Context, in *PutPetRequest, opts ...grpc.CallOption) (*PutPetResponse, error) {
|
||||
out := new(PutPetResponse)
|
||||
err := c.cc.Invoke(ctx, "/pet.v1.PetStoreService/PutPet", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *petStoreServiceClient) DeletePet(ctx context.Context, in *DeletePetRequest, opts ...grpc.CallOption) (*DeletePetResponse, error) {
|
||||
out := new(DeletePetResponse)
|
||||
err := c.cc.Invoke(ctx, "/pet.v1.PetStoreService/DeletePet", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *petStoreServiceClient) PurchasePet(ctx context.Context, in *PurchasePetRequest, opts ...grpc.CallOption) (*PurchasePetResponse, error) {
|
||||
out := new(PurchasePetResponse)
|
||||
err := c.cc.Invoke(ctx, "/pet.v1.PetStoreService/PurchasePet", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// PetStoreServiceServer is the server API for PetStoreService service.
|
||||
// All implementations should embed UnimplementedPetStoreServiceServer
|
||||
// for forward compatibility
|
||||
type PetStoreServiceServer interface {
|
||||
GetPet(context.Context, *GetPetRequest) (*GetPetResponse, error)
|
||||
PutPet(context.Context, *PutPetRequest) (*PutPetResponse, error)
|
||||
DeletePet(context.Context, *DeletePetRequest) (*DeletePetResponse, error)
|
||||
PurchasePet(context.Context, *PurchasePetRequest) (*PurchasePetResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedPetStoreServiceServer should be embedded to have forward compatible implementations.
|
||||
type UnimplementedPetStoreServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedPetStoreServiceServer) GetPet(context.Context, *GetPetRequest) (*GetPetResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetPet not implemented")
|
||||
}
|
||||
func (UnimplementedPetStoreServiceServer) PutPet(context.Context, *PutPetRequest) (*PutPetResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method PutPet not implemented")
|
||||
}
|
||||
func (UnimplementedPetStoreServiceServer) DeletePet(context.Context, *DeletePetRequest) (*DeletePetResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeletePet not implemented")
|
||||
}
|
||||
func (UnimplementedPetStoreServiceServer) PurchasePet(context.Context, *PurchasePetRequest) (*PurchasePetResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method PurchasePet not implemented")
|
||||
}
|
||||
|
||||
// UnsafePetStoreServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to PetStoreServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafePetStoreServiceServer interface {
|
||||
mustEmbedUnimplementedPetStoreServiceServer()
|
||||
}
|
||||
|
||||
func RegisterPetStoreServiceServer(s grpc.ServiceRegistrar, srv PetStoreServiceServer) {
|
||||
s.RegisterService(&PetStoreService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _PetStoreService_GetPet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetPetRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(PetStoreServiceServer).GetPet(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pet.v1.PetStoreService/GetPet",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PetStoreServiceServer).GetPet(ctx, req.(*GetPetRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _PetStoreService_PutPet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(PutPetRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(PetStoreServiceServer).PutPet(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pet.v1.PetStoreService/PutPet",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PetStoreServiceServer).PutPet(ctx, req.(*PutPetRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _PetStoreService_DeletePet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeletePetRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(PetStoreServiceServer).DeletePet(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pet.v1.PetStoreService/DeletePet",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PetStoreServiceServer).DeletePet(ctx, req.(*DeletePetRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _PetStoreService_PurchasePet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(PurchasePetRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(PetStoreServiceServer).PurchasePet(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pet.v1.PetStoreService/PurchasePet",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PetStoreServiceServer).PurchasePet(ctx, req.(*PurchasePetRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// PetStoreService_ServiceDesc is the grpc.ServiceDesc for PetStoreService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var PetStoreService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "pet.v1.PetStoreService",
|
||||
HandlerType: (*PetStoreServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetPet",
|
||||
Handler: _PetStoreService_GetPet_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "PutPet",
|
||||
Handler: _PetStoreService_PutPet_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeletePet",
|
||||
Handler: _PetStoreService_DeletePet_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "PurchasePet",
|
||||
Handler: _PetStoreService_PurchasePet_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "pet/v1/pet.proto",
|
||||
}
|
||||
@@ -0,0 +1,170 @@
|
||||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: printer/v1/pdf_invoice.proto
|
||||
|
||||
/*
|
||||
Package v1 is a reverse proxy.
|
||||
|
||||
It translates gRPC into RESTful JSON APIs.
|
||||
*/
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
extV1 "git.deineagentur.biz/payment-backoffice/protobuf/gen/proto/go/printer/v1"
|
||||
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
||||
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/grpclog"
|
||||
"google.golang.org/grpc/metadata"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
// Suppress "imported and not used" errors
|
||||
var _ codes.Code
|
||||
var _ io.Reader
|
||||
var _ status.Status
|
||||
var _ = runtime.String
|
||||
var _ = utilities.NewDoubleArray
|
||||
var _ = metadata.Join
|
||||
|
||||
func request_PrinterService_InvoiceGen_0(ctx context.Context, marshaler runtime.Marshaler, client extV1.PrinterServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq extV1.Invoice
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||
if berr != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||
}
|
||||
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.InvoiceGen(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_PrinterService_InvoiceGen_0(ctx context.Context, marshaler runtime.Marshaler, server extV1.PrinterServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq extV1.Invoice
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||
if berr != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||
}
|
||||
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.InvoiceGen(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
// RegisterPrinterServiceHandlerServer registers the http handlers for service PrinterService to "mux".
|
||||
// UnaryRPC :call PrinterServiceServer directly.
|
||||
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
||||
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPrinterServiceHandlerFromEndpoint instead.
|
||||
func RegisterPrinterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server extV1.PrinterServiceServer) error {
|
||||
|
||||
mux.Handle("POST", pattern_PrinterService_InvoiceGen_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/printer.v1.invoice.PrinterService/InvoiceGen", runtime.WithHTTPPathPattern("/v1/printer/invoice"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_PrinterService_InvoiceGen_0(ctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_PrinterService_InvoiceGen_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RegisterPrinterServiceHandlerFromEndpoint is same as RegisterPrinterServiceHandler but
|
||||
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
|
||||
func RegisterPrinterServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
|
||||
conn, err := grpc.Dial(endpoint, opts...)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer func() {
|
||||
if err != nil {
|
||||
if cerr := conn.Close(); cerr != nil {
|
||||
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
|
||||
}
|
||||
return
|
||||
}
|
||||
go func() {
|
||||
<-ctx.Done()
|
||||
if cerr := conn.Close(); cerr != nil {
|
||||
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
|
||||
}
|
||||
}()
|
||||
}()
|
||||
|
||||
return RegisterPrinterServiceHandler(ctx, mux, conn)
|
||||
}
|
||||
|
||||
// RegisterPrinterServiceHandler registers the http handlers for service PrinterService to "mux".
|
||||
// The handlers forward requests to the grpc endpoint over "conn".
|
||||
func RegisterPrinterServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
|
||||
return RegisterPrinterServiceHandlerClient(ctx, mux, extV1.NewPrinterServiceClient(conn))
|
||||
}
|
||||
|
||||
// RegisterPrinterServiceHandlerClient registers the http handlers for service PrinterService
|
||||
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "extV1.PrinterServiceClient".
|
||||
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "extV1.PrinterServiceClient"
|
||||
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
|
||||
// "extV1.PrinterServiceClient" to call the correct interceptors.
|
||||
func RegisterPrinterServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client extV1.PrinterServiceClient) error {
|
||||
|
||||
mux.Handle("POST", pattern_PrinterService_InvoiceGen_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateContext(ctx, mux, req, "/printer.v1.invoice.PrinterService/InvoiceGen", runtime.WithHTTPPathPattern("/v1/printer/invoice"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_PrinterService_InvoiceGen_0(ctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_PrinterService_InvoiceGen_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_PrinterService_InvoiceGen_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "printer", "invoice"}, ""))
|
||||
)
|
||||
|
||||
var (
|
||||
forward_PrinterService_InvoiceGen_0 = runtime.ForwardResponseMessage
|
||||
)
|
||||
@@ -0,0 +1,103 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc (unknown)
|
||||
// source: printer/v1/pdf_invoice.proto
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
// PrinterServiceClient is the client API for PrinterService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type PrinterServiceClient interface {
|
||||
InvoiceGen(ctx context.Context, in *Invoice, opts ...grpc.CallOption) (*DocumentResponse, error)
|
||||
}
|
||||
|
||||
type printerServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewPrinterServiceClient(cc grpc.ClientConnInterface) PrinterServiceClient {
|
||||
return &printerServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *printerServiceClient) InvoiceGen(ctx context.Context, in *Invoice, opts ...grpc.CallOption) (*DocumentResponse, error) {
|
||||
out := new(DocumentResponse)
|
||||
err := c.cc.Invoke(ctx, "/printer.v1.invoice.PrinterService/InvoiceGen", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// PrinterServiceServer is the server API for PrinterService service.
|
||||
// All implementations should embed UnimplementedPrinterServiceServer
|
||||
// for forward compatibility
|
||||
type PrinterServiceServer interface {
|
||||
InvoiceGen(context.Context, *Invoice) (*DocumentResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedPrinterServiceServer should be embedded to have forward compatible implementations.
|
||||
type UnimplementedPrinterServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedPrinterServiceServer) InvoiceGen(context.Context, *Invoice) (*DocumentResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method InvoiceGen not implemented")
|
||||
}
|
||||
|
||||
// UnsafePrinterServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to PrinterServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafePrinterServiceServer interface {
|
||||
mustEmbedUnimplementedPrinterServiceServer()
|
||||
}
|
||||
|
||||
func RegisterPrinterServiceServer(s grpc.ServiceRegistrar, srv PrinterServiceServer) {
|
||||
s.RegisterService(&PrinterService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _PrinterService_InvoiceGen_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Invoice)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(PrinterServiceServer).InvoiceGen(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/printer.v1.invoice.PrinterService/InvoiceGen",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PrinterServiceServer).InvoiceGen(ctx, req.(*Invoice))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// PrinterService_ServiceDesc is the grpc.ServiceDesc for PrinterService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var PrinterService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "printer.v1.invoice.PrinterService",
|
||||
HandlerType: (*PrinterServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "InvoiceGen",
|
||||
Handler: _PrinterService_InvoiceGen_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "printer/v1/pdf_invoice.proto",
|
||||
}
|
||||
@@ -0,0 +1,211 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc (unknown)
|
||||
// source: shop/v1/shop.proto
|
||||
|
||||
package shopv1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
// ShopServiceClient is the client API for ShopService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type ShopServiceClient interface {
|
||||
List(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error)
|
||||
Add(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error)
|
||||
Update(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error)
|
||||
Delete(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error)
|
||||
}
|
||||
|
||||
type shopServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewShopServiceClient(cc grpc.ClientConnInterface) ShopServiceClient {
|
||||
return &shopServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *shopServiceClient) List(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error) {
|
||||
out := new(Shop)
|
||||
err := c.cc.Invoke(ctx, "/shop.v1.ShopService/List", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *shopServiceClient) Add(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error) {
|
||||
out := new(Shop)
|
||||
err := c.cc.Invoke(ctx, "/shop.v1.ShopService/Add", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *shopServiceClient) Update(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error) {
|
||||
out := new(Shop)
|
||||
err := c.cc.Invoke(ctx, "/shop.v1.ShopService/Update", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *shopServiceClient) Delete(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error) {
|
||||
out := new(Shop)
|
||||
err := c.cc.Invoke(ctx, "/shop.v1.ShopService/Delete", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// ShopServiceServer is the server API for ShopService service.
|
||||
// All implementations should embed UnimplementedShopServiceServer
|
||||
// for forward compatibility
|
||||
type ShopServiceServer interface {
|
||||
List(context.Context, *Shop) (*Shop, error)
|
||||
Add(context.Context, *Shop) (*Shop, error)
|
||||
Update(context.Context, *Shop) (*Shop, error)
|
||||
Delete(context.Context, *Shop) (*Shop, error)
|
||||
}
|
||||
|
||||
// UnimplementedShopServiceServer should be embedded to have forward compatible implementations.
|
||||
type UnimplementedShopServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedShopServiceServer) List(context.Context, *Shop) (*Shop, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
|
||||
}
|
||||
func (UnimplementedShopServiceServer) Add(context.Context, *Shop) (*Shop, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Add not implemented")
|
||||
}
|
||||
func (UnimplementedShopServiceServer) Update(context.Context, *Shop) (*Shop, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
|
||||
}
|
||||
func (UnimplementedShopServiceServer) Delete(context.Context, *Shop) (*Shop, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
|
||||
}
|
||||
|
||||
// UnsafeShopServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to ShopServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeShopServiceServer interface {
|
||||
mustEmbedUnimplementedShopServiceServer()
|
||||
}
|
||||
|
||||
func RegisterShopServiceServer(s grpc.ServiceRegistrar, srv ShopServiceServer) {
|
||||
s.RegisterService(&ShopService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _ShopService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Shop)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ShopServiceServer).List(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/shop.v1.ShopService/List",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ShopServiceServer).List(ctx, req.(*Shop))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ShopService_Add_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Shop)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ShopServiceServer).Add(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/shop.v1.ShopService/Add",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ShopServiceServer).Add(ctx, req.(*Shop))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ShopService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Shop)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ShopServiceServer).Update(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/shop.v1.ShopService/Update",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ShopServiceServer).Update(ctx, req.(*Shop))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ShopService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Shop)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ShopServiceServer).Delete(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/shop.v1.ShopService/Delete",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ShopServiceServer).Delete(ctx, req.(*Shop))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// ShopService_ServiceDesc is the grpc.ServiceDesc for ShopService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var ShopService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "shop.v1.ShopService",
|
||||
HandlerType: (*ShopServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "List",
|
||||
Handler: _ShopService_List_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Add",
|
||||
Handler: _ShopService_Add_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Update",
|
||||
Handler: _ShopService_Update_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Delete",
|
||||
Handler: _ShopService_Delete_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "shop/v1/shop.proto",
|
||||
}
|
||||
939
gen/proto/go/printer/v1/pdf_invoice.pb.go
Normal file
939
gen/proto/go/printer/v1/pdf_invoice.pb.go
Normal file
@@ -0,0 +1,939 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.0
|
||||
// protoc (unknown)
|
||||
// source: printer/v1/pdf_invoice.proto
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
datetime "google.golang.org/genproto/googleapis/type/datetime"
|
||||
_ "google.golang.org/genproto/googleapis/type/money"
|
||||
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)
|
||||
)
|
||||
|
||||
// PaymentProvider represents the supported set
|
||||
// of payment providers.
|
||||
type InvoiceType int32
|
||||
|
||||
const (
|
||||
InvoiceType_INVOICE_TYPE_UNSPECIFIED InvoiceType = 0
|
||||
InvoiceType_INVOICE_TYPE_PAID InvoiceType = 1
|
||||
InvoiceType_INVOICE_TYPE_OPEN InvoiceType = 2
|
||||
)
|
||||
|
||||
// Enum value maps for InvoiceType.
|
||||
var (
|
||||
InvoiceType_name = map[int32]string{
|
||||
0: "INVOICE_TYPE_UNSPECIFIED",
|
||||
1: "INVOICE_TYPE_PAID",
|
||||
2: "INVOICE_TYPE_OPEN",
|
||||
}
|
||||
InvoiceType_value = map[string]int32{
|
||||
"INVOICE_TYPE_UNSPECIFIED": 0,
|
||||
"INVOICE_TYPE_PAID": 1,
|
||||
"INVOICE_TYPE_OPEN": 2,
|
||||
}
|
||||
)
|
||||
|
||||
func (x InvoiceType) Enum() *InvoiceType {
|
||||
p := new(InvoiceType)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x InvoiceType) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (InvoiceType) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_printer_v1_pdf_invoice_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (InvoiceType) Type() protoreflect.EnumType {
|
||||
return &file_printer_v1_pdf_invoice_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x InvoiceType) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use InvoiceType.Descriptor instead.
|
||||
func (InvoiceType) EnumDescriptor() ([]byte, []int) {
|
||||
return file_printer_v1_pdf_invoice_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
type OrderType int32
|
||||
|
||||
const (
|
||||
OrderType_ORDER_TYPE_UNSPECIFIED OrderType = 0
|
||||
OrderType_ORDER_TYPE_PHONE OrderType = 1
|
||||
OrderType_ORDER_TYPE_WWW OrderType = 2
|
||||
OrderType_ORDER_TYPE_EMAIL OrderType = 3
|
||||
)
|
||||
|
||||
// Enum value maps for OrderType.
|
||||
var (
|
||||
OrderType_name = map[int32]string{
|
||||
0: "ORDER_TYPE_UNSPECIFIED",
|
||||
1: "ORDER_TYPE_PHONE",
|
||||
2: "ORDER_TYPE_WWW",
|
||||
3: "ORDER_TYPE_EMAIL",
|
||||
}
|
||||
OrderType_value = map[string]int32{
|
||||
"ORDER_TYPE_UNSPECIFIED": 0,
|
||||
"ORDER_TYPE_PHONE": 1,
|
||||
"ORDER_TYPE_WWW": 2,
|
||||
"ORDER_TYPE_EMAIL": 3,
|
||||
}
|
||||
)
|
||||
|
||||
func (x OrderType) Enum() *OrderType {
|
||||
p := new(OrderType)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x OrderType) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (OrderType) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_printer_v1_pdf_invoice_proto_enumTypes[1].Descriptor()
|
||||
}
|
||||
|
||||
func (OrderType) Type() protoreflect.EnumType {
|
||||
return &file_printer_v1_pdf_invoice_proto_enumTypes[1]
|
||||
}
|
||||
|
||||
func (x OrderType) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use OrderType.Descriptor instead.
|
||||
func (OrderType) EnumDescriptor() ([]byte, []int) {
|
||||
return file_printer_v1_pdf_invoice_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
type InvoiceInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
InvoiceId string `protobuf:"bytes,1,opt,name=invoice_id,json=invoiceId,proto3" json:"invoice_id,omitempty"`
|
||||
InvoiceDate *datetime.DateTime `protobuf:"bytes,2,opt,name=invoice_date,json=invoiceDate,proto3" json:"invoice_date,omitempty"`
|
||||
InvoiceDueDate *datetime.DateTime `protobuf:"bytes,3,opt,name=invoice_due_date,json=invoiceDueDate,proto3" json:"invoice_due_date,omitempty"`
|
||||
InvoiceType InvoiceType `protobuf:"varint,4,opt,name=invoice_type,json=invoiceType,proto3,enum=printer.v1.invoice.InvoiceType" json:"invoice_type,omitempty"`
|
||||
}
|
||||
|
||||
func (x *InvoiceInfo) Reset() {
|
||||
*x = InvoiceInfo{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_printer_v1_pdf_invoice_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *InvoiceInfo) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*InvoiceInfo) ProtoMessage() {}
|
||||
|
||||
func (x *InvoiceInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_printer_v1_pdf_invoice_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 InvoiceInfo.ProtoReflect.Descriptor instead.
|
||||
func (*InvoiceInfo) Descriptor() ([]byte, []int) {
|
||||
return file_printer_v1_pdf_invoice_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *InvoiceInfo) GetInvoiceId() string {
|
||||
if x != nil {
|
||||
return x.InvoiceId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *InvoiceInfo) GetInvoiceDate() *datetime.DateTime {
|
||||
if x != nil {
|
||||
return x.InvoiceDate
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *InvoiceInfo) GetInvoiceDueDate() *datetime.DateTime {
|
||||
if x != nil {
|
||||
return x.InvoiceDueDate
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *InvoiceInfo) GetInvoiceType() InvoiceType {
|
||||
if x != nil {
|
||||
return x.InvoiceType
|
||||
}
|
||||
return InvoiceType_INVOICE_TYPE_UNSPECIFIED
|
||||
}
|
||||
|
||||
type OrderInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
OrderId string `protobuf:"bytes,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
|
||||
OrderDate *datetime.DateTime `protobuf:"bytes,2,opt,name=order_date,json=orderDate,proto3" json:"order_date,omitempty"`
|
||||
OrderDueDate *datetime.DateTime `protobuf:"bytes,3,opt,name=order_due_date,json=orderDueDate,proto3" json:"order_due_date,omitempty"`
|
||||
OrderType OrderType `protobuf:"varint,4,opt,name=order_type,json=orderType,proto3,enum=printer.v1.invoice.OrderType" json:"order_type,omitempty"`
|
||||
OrderItems []*OrderItem `protobuf:"bytes,5,rep,name=order_items,json=orderItems,proto3" json:"order_items,omitempty"`
|
||||
OrderVatItems []*OrderVatItem `protobuf:"bytes,6,rep,name=order_vat_items,json=orderVatItems,proto3" json:"order_vat_items,omitempty"`
|
||||
Deposit *float64 `protobuf:"fixed64,7,opt,name=deposit,proto3,oneof" json:"deposit,omitempty"`
|
||||
}
|
||||
|
||||
func (x *OrderInfo) Reset() {
|
||||
*x = OrderInfo{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_printer_v1_pdf_invoice_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *OrderInfo) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*OrderInfo) ProtoMessage() {}
|
||||
|
||||
func (x *OrderInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_printer_v1_pdf_invoice_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 OrderInfo.ProtoReflect.Descriptor instead.
|
||||
func (*OrderInfo) Descriptor() ([]byte, []int) {
|
||||
return file_printer_v1_pdf_invoice_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *OrderInfo) GetOrderId() string {
|
||||
if x != nil {
|
||||
return x.OrderId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *OrderInfo) GetOrderDate() *datetime.DateTime {
|
||||
if x != nil {
|
||||
return x.OrderDate
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *OrderInfo) GetOrderDueDate() *datetime.DateTime {
|
||||
if x != nil {
|
||||
return x.OrderDueDate
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *OrderInfo) GetOrderType() OrderType {
|
||||
if x != nil {
|
||||
return x.OrderType
|
||||
}
|
||||
return OrderType_ORDER_TYPE_UNSPECIFIED
|
||||
}
|
||||
|
||||
func (x *OrderInfo) GetOrderItems() []*OrderItem {
|
||||
if x != nil {
|
||||
return x.OrderItems
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *OrderInfo) GetOrderVatItems() []*OrderVatItem {
|
||||
if x != nil {
|
||||
return x.OrderVatItems
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *OrderInfo) GetDeposit() float64 {
|
||||
if x != nil && x.Deposit != nil {
|
||||
return *x.Deposit
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type OfferInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
OfferId string `protobuf:"bytes,1,opt,name=offer_id,json=offerId,proto3" json:"offer_id,omitempty"`
|
||||
OfferDate *datetime.DateTime `protobuf:"bytes,2,opt,name=offer_date,json=offerDate,proto3" json:"offer_date,omitempty"`
|
||||
OfferDueDate *datetime.DateTime `protobuf:"bytes,3,opt,name=offer_due_date,json=offerDueDate,proto3" json:"offer_due_date,omitempty"`
|
||||
}
|
||||
|
||||
func (x *OfferInfo) Reset() {
|
||||
*x = OfferInfo{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_printer_v1_pdf_invoice_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *OfferInfo) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*OfferInfo) ProtoMessage() {}
|
||||
|
||||
func (x *OfferInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_printer_v1_pdf_invoice_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 OfferInfo.ProtoReflect.Descriptor instead.
|
||||
func (*OfferInfo) Descriptor() ([]byte, []int) {
|
||||
return file_printer_v1_pdf_invoice_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *OfferInfo) GetOfferId() string {
|
||||
if x != nil {
|
||||
return x.OfferId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *OfferInfo) GetOfferDate() *datetime.DateTime {
|
||||
if x != nil {
|
||||
return x.OfferDate
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *OfferInfo) GetOfferDueDate() *datetime.DateTime {
|
||||
if x != nil {
|
||||
return x.OfferDueDate
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type OrderItem struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
|
||||
Vat float64 `protobuf:"fixed64,2,opt,name=vat,proto3" json:"vat,omitempty"`
|
||||
Count uint64 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"`
|
||||
PriceSingle float64 `protobuf:"fixed64,4,opt,name=price_single,json=priceSingle,proto3" json:"price_single,omitempty"`
|
||||
PriceSum float64 `protobuf:"fixed64,5,opt,name=price_sum,json=priceSum,proto3" json:"price_sum,omitempty"`
|
||||
PriceNet bool `protobuf:"varint,6,opt,name=price_net,json=priceNet,proto3" json:"price_net,omitempty"`
|
||||
}
|
||||
|
||||
func (x *OrderItem) Reset() {
|
||||
*x = OrderItem{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_printer_v1_pdf_invoice_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *OrderItem) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*OrderItem) ProtoMessage() {}
|
||||
|
||||
func (x *OrderItem) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_printer_v1_pdf_invoice_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 OrderItem.ProtoReflect.Descriptor instead.
|
||||
func (*OrderItem) Descriptor() ([]byte, []int) {
|
||||
return file_printer_v1_pdf_invoice_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *OrderItem) GetDescription() string {
|
||||
if x != nil {
|
||||
return x.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *OrderItem) GetVat() float64 {
|
||||
if x != nil {
|
||||
return x.Vat
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *OrderItem) GetCount() uint64 {
|
||||
if x != nil {
|
||||
return x.Count
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *OrderItem) GetPriceSingle() float64 {
|
||||
if x != nil {
|
||||
return x.PriceSingle
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *OrderItem) GetPriceSum() float64 {
|
||||
if x != nil {
|
||||
return x.PriceSum
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *OrderItem) GetPriceNet() bool {
|
||||
if x != nil {
|
||||
return x.PriceNet
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type OrderVatItem struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
|
||||
Vat float64 `protobuf:"fixed64,2,opt,name=vat,proto3" json:"vat,omitempty"`
|
||||
VatMoneySum float64 `protobuf:"fixed64,3,opt,name=vat_money_sum,json=vatMoneySum,proto3" json:"vat_money_sum,omitempty"`
|
||||
ItemsCount uint64 `protobuf:"varint,4,opt,name=items_count,json=itemsCount,proto3" json:"items_count,omitempty"`
|
||||
}
|
||||
|
||||
func (x *OrderVatItem) Reset() {
|
||||
*x = OrderVatItem{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_printer_v1_pdf_invoice_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *OrderVatItem) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*OrderVatItem) ProtoMessage() {}
|
||||
|
||||
func (x *OrderVatItem) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_printer_v1_pdf_invoice_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 OrderVatItem.ProtoReflect.Descriptor instead.
|
||||
func (*OrderVatItem) Descriptor() ([]byte, []int) {
|
||||
return file_printer_v1_pdf_invoice_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *OrderVatItem) GetDescription() string {
|
||||
if x != nil {
|
||||
return x.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *OrderVatItem) GetVat() float64 {
|
||||
if x != nil {
|
||||
return x.Vat
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *OrderVatItem) GetVatMoneySum() float64 {
|
||||
if x != nil {
|
||||
return x.VatMoneySum
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *OrderVatItem) GetItemsCount() uint64 {
|
||||
if x != nil {
|
||||
return x.ItemsCount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// Invoice
|
||||
type Invoice struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Order *OrderInfo `protobuf:"bytes,1,opt,name=order,proto3" json:"order,omitempty"`
|
||||
Offer *OfferInfo `protobuf:"bytes,2,opt,name=offer,proto3" json:"offer,omitempty"`
|
||||
Info *InvoiceInfo `protobuf:"bytes,3,opt,name=info,proto3" json:"info,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Invoice) Reset() {
|
||||
*x = Invoice{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_printer_v1_pdf_invoice_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Invoice) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Invoice) ProtoMessage() {}
|
||||
|
||||
func (x *Invoice) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_printer_v1_pdf_invoice_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 Invoice.ProtoReflect.Descriptor instead.
|
||||
func (*Invoice) Descriptor() ([]byte, []int) {
|
||||
return file_printer_v1_pdf_invoice_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *Invoice) GetOrder() *OrderInfo {
|
||||
if x != nil {
|
||||
return x.Order
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Invoice) GetOffer() *OfferInfo {
|
||||
if x != nil {
|
||||
return x.Offer
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Invoice) GetInfo() *InvoiceInfo {
|
||||
if x != nil {
|
||||
return x.Info
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// PDF Response
|
||||
type DocumentResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Document []byte `protobuf:"bytes,1,opt,name=document,proto3" json:"document,omitempty"`
|
||||
Signature string `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
|
||||
Sha512 string `protobuf:"bytes,3,opt,name=sha512,proto3" json:"sha512,omitempty"`
|
||||
}
|
||||
|
||||
func (x *DocumentResponse) Reset() {
|
||||
*x = DocumentResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_printer_v1_pdf_invoice_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DocumentResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DocumentResponse) ProtoMessage() {}
|
||||
|
||||
func (x *DocumentResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_printer_v1_pdf_invoice_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 DocumentResponse.ProtoReflect.Descriptor instead.
|
||||
func (*DocumentResponse) Descriptor() ([]byte, []int) {
|
||||
return file_printer_v1_pdf_invoice_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *DocumentResponse) GetDocument() []byte {
|
||||
if x != nil {
|
||||
return x.Document
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *DocumentResponse) GetSignature() string {
|
||||
if x != nil {
|
||||
return x.Signature
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DocumentResponse) GetSha512() string {
|
||||
if x != nil {
|
||||
return x.Sha512
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_printer_v1_pdf_invoice_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_printer_v1_pdf_invoice_proto_rawDesc = []byte{
|
||||
0x0a, 0x1c, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x64, 0x66,
|
||||
0x5f, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12,
|
||||
0x70, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x69,
|
||||
0x63, 0x65, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f,
|
||||
0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x67, 0x6f, 0x6f,
|
||||
0x67, 0x6c, 0x65, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x64, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d,
|
||||
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
|
||||
0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xeb, 0x01, 0x0a, 0x0b, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63,
|
||||
0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65,
|
||||
0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x76, 0x6f, 0x69,
|
||||
0x63, 0x65, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x0c, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x5f,
|
||||
0x64, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f,
|
||||
0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d,
|
||||
0x65, 0x52, 0x0b, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x44, 0x61, 0x74, 0x65, 0x12, 0x3f,
|
||||
0x0a, 0x10, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x5f, 0x64, 0x75, 0x65, 0x5f, 0x64, 0x61,
|
||||
0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
|
||||
0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x52,
|
||||
0x0e, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x44, 0x75, 0x65, 0x44, 0x61, 0x74, 0x65, 0x12,
|
||||
0x42, 0x0a, 0x0c, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x69,
|
||||
0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x54,
|
||||
0x79, 0x70, 0x65, 0x22, 0x8c, 0x03, 0x0a, 0x09, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66,
|
||||
0x6f, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x0a,
|
||||
0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44,
|
||||
0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x44, 0x61,
|
||||
0x74, 0x65, 0x12, 0x3b, 0x0a, 0x0e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x64, 0x75, 0x65, 0x5f,
|
||||
0x64, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f,
|
||||
0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d,
|
||||
0x65, 0x52, 0x0c, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x44, 0x75, 0x65, 0x44, 0x61, 0x74, 0x65, 0x12,
|
||||
0x3c, 0x0a, 0x0a, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20,
|
||||
0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31,
|
||||
0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x79,
|
||||
0x70, 0x65, 0x52, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3e, 0x0a,
|
||||
0x0b, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x74, 0x65,
|
||||
0x6d, 0x52, 0x0a, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x48, 0x0a,
|
||||
0x0f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x74, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73,
|
||||
0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72,
|
||||
0x2e, 0x76, 0x31, 0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65,
|
||||
0x72, 0x56, 0x61, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x0d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x56,
|
||||
0x61, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x1d, 0x0a, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73,
|
||||
0x69, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x07, 0x64, 0x65, 0x70, 0x6f,
|
||||
0x73, 0x69, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73,
|
||||
0x69, 0x74, 0x22, 0x99, 0x01, 0x0a, 0x09, 0x4f, 0x66, 0x66, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f,
|
||||
0x12, 0x19, 0x0a, 0x08, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x07, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x0a, 0x6f,
|
||||
0x66, 0x66, 0x65, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x61,
|
||||
0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x09, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x44, 0x61, 0x74,
|
||||
0x65, 0x12, 0x3b, 0x0a, 0x0e, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x64, 0x75, 0x65, 0x5f, 0x64,
|
||||
0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
|
||||
0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65,
|
||||
0x52, 0x0c, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x44, 0x75, 0x65, 0x44, 0x61, 0x74, 0x65, 0x22, 0xb2,
|
||||
0x01, 0x0a, 0x09, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x20, 0x0a, 0x0b,
|
||||
0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10,
|
||||
0x0a, 0x03, 0x76, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x76, 0x61, 0x74,
|
||||
0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52,
|
||||
0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f,
|
||||
0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x70, 0x72,
|
||||
0x69, 0x63, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x72, 0x69,
|
||||
0x63, 0x65, 0x5f, 0x73, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x70, 0x72,
|
||||
0x69, 0x63, 0x65, 0x53, 0x75, 0x6d, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f,
|
||||
0x6e, 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x70, 0x72, 0x69, 0x63, 0x65,
|
||||
0x4e, 0x65, 0x74, 0x22, 0x87, 0x01, 0x0a, 0x0c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x56, 0x61, 0x74,
|
||||
0x49, 0x74, 0x65, 0x6d, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72,
|
||||
0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x61, 0x74, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x01, 0x52, 0x03, 0x76, 0x61, 0x74, 0x12, 0x22, 0x0a, 0x0d, 0x76, 0x61, 0x74, 0x5f,
|
||||
0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x5f, 0x73, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52,
|
||||
0x0b, 0x76, 0x61, 0x74, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x53, 0x75, 0x6d, 0x12, 0x1f, 0x0a, 0x0b,
|
||||
0x69, 0x74, 0x65, 0x6d, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x04, 0x52, 0x0a, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xa8, 0x01,
|
||||
0x0a, 0x07, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x05, 0x6f, 0x72, 0x64,
|
||||
0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74,
|
||||
0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x4f, 0x72,
|
||||
0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x33,
|
||||
0x0a, 0x05, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e,
|
||||
0x70, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x69,
|
||||
0x63, 0x65, 0x2e, 0x4f, 0x66, 0x66, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x6f, 0x66,
|
||||
0x66, 0x65, 0x72, 0x12, 0x33, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x69,
|
||||
0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x49, 0x6e,
|
||||
0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x64, 0x0a, 0x10, 0x44, 0x6f, 0x63, 0x75,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08,
|
||||
0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08,
|
||||
0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e,
|
||||
0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67,
|
||||
0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x35, 0x31, 0x32,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x68, 0x61, 0x35, 0x31, 0x32, 0x2a, 0x59,
|
||||
0x0a, 0x0b, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a,
|
||||
0x18, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e,
|
||||
0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x49,
|
||||
0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x41, 0x49, 0x44,
|
||||
0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x54, 0x59,
|
||||
0x50, 0x45, 0x5f, 0x4f, 0x50, 0x45, 0x4e, 0x10, 0x02, 0x2a, 0x67, 0x0a, 0x09, 0x4f, 0x72, 0x64,
|
||||
0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f,
|
||||
0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44,
|
||||
0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45,
|
||||
0x5f, 0x50, 0x48, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x4f, 0x52, 0x44, 0x45,
|
||||
0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x57, 0x57, 0x57, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10,
|
||||
0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4d, 0x41, 0x49, 0x4c,
|
||||
0x10, 0x03, 0x32, 0x81, 0x01, 0x0a, 0x0e, 0x50, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x53, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6f, 0x0a, 0x0a, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65,
|
||||
0x47, 0x65, 0x6e, 0x12, 0x1b, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31,
|
||||
0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65,
|
||||
0x1a, 0x24, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x69, 0x6e,
|
||||
0x76, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x22, 0x13,
|
||||
0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x76, 0x6f,
|
||||
0x69, 0x63, 0x65, 0x3a, 0x01, 0x2a, 0x42, 0xdd, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x70,
|
||||
0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63,
|
||||
0x65, 0x42, 0x0f, 0x50, 0x64, 0x66, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x2e, 0x64, 0x65, 0x69, 0x6e, 0x65, 0x61,
|
||||
0x67, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x2e, 0x62, 0x69, 0x7a, 0x2f, 0x70, 0x61, 0x79, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x2d, 0x62, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2f, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x2f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x31, 0xa2, 0x02,
|
||||
0x03, 0x50, 0x56, 0x49, 0xaa, 0x02, 0x12, 0x50, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x56,
|
||||
0x31, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0xca, 0x02, 0x12, 0x50, 0x72, 0x69, 0x6e,
|
||||
0x74, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0xe2, 0x02,
|
||||
0x1e, 0x50, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x49, 0x6e, 0x76, 0x6f,
|
||||
0x69, 0x63, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea,
|
||||
0x02, 0x14, 0x50, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x3a, 0x3a, 0x49,
|
||||
0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_printer_v1_pdf_invoice_proto_rawDescOnce sync.Once
|
||||
file_printer_v1_pdf_invoice_proto_rawDescData = file_printer_v1_pdf_invoice_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_printer_v1_pdf_invoice_proto_rawDescGZIP() []byte {
|
||||
file_printer_v1_pdf_invoice_proto_rawDescOnce.Do(func() {
|
||||
file_printer_v1_pdf_invoice_proto_rawDescData = protoimpl.X.CompressGZIP(file_printer_v1_pdf_invoice_proto_rawDescData)
|
||||
})
|
||||
return file_printer_v1_pdf_invoice_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_printer_v1_pdf_invoice_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
||||
var file_printer_v1_pdf_invoice_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
||||
var file_printer_v1_pdf_invoice_proto_goTypes = []interface{}{
|
||||
(InvoiceType)(0), // 0: printer.v1.invoice.InvoiceType
|
||||
(OrderType)(0), // 1: printer.v1.invoice.OrderType
|
||||
(*InvoiceInfo)(nil), // 2: printer.v1.invoice.InvoiceInfo
|
||||
(*OrderInfo)(nil), // 3: printer.v1.invoice.OrderInfo
|
||||
(*OfferInfo)(nil), // 4: printer.v1.invoice.OfferInfo
|
||||
(*OrderItem)(nil), // 5: printer.v1.invoice.OrderItem
|
||||
(*OrderVatItem)(nil), // 6: printer.v1.invoice.OrderVatItem
|
||||
(*Invoice)(nil), // 7: printer.v1.invoice.Invoice
|
||||
(*DocumentResponse)(nil), // 8: printer.v1.invoice.DocumentResponse
|
||||
(*datetime.DateTime)(nil), // 9: google.type.DateTime
|
||||
}
|
||||
var file_printer_v1_pdf_invoice_proto_depIdxs = []int32{
|
||||
9, // 0: printer.v1.invoice.InvoiceInfo.invoice_date:type_name -> google.type.DateTime
|
||||
9, // 1: printer.v1.invoice.InvoiceInfo.invoice_due_date:type_name -> google.type.DateTime
|
||||
0, // 2: printer.v1.invoice.InvoiceInfo.invoice_type:type_name -> printer.v1.invoice.InvoiceType
|
||||
9, // 3: printer.v1.invoice.OrderInfo.order_date:type_name -> google.type.DateTime
|
||||
9, // 4: printer.v1.invoice.OrderInfo.order_due_date:type_name -> google.type.DateTime
|
||||
1, // 5: printer.v1.invoice.OrderInfo.order_type:type_name -> printer.v1.invoice.OrderType
|
||||
5, // 6: printer.v1.invoice.OrderInfo.order_items:type_name -> printer.v1.invoice.OrderItem
|
||||
6, // 7: printer.v1.invoice.OrderInfo.order_vat_items:type_name -> printer.v1.invoice.OrderVatItem
|
||||
9, // 8: printer.v1.invoice.OfferInfo.offer_date:type_name -> google.type.DateTime
|
||||
9, // 9: printer.v1.invoice.OfferInfo.offer_due_date:type_name -> google.type.DateTime
|
||||
3, // 10: printer.v1.invoice.Invoice.order:type_name -> printer.v1.invoice.OrderInfo
|
||||
4, // 11: printer.v1.invoice.Invoice.offer:type_name -> printer.v1.invoice.OfferInfo
|
||||
2, // 12: printer.v1.invoice.Invoice.info:type_name -> printer.v1.invoice.InvoiceInfo
|
||||
7, // 13: printer.v1.invoice.PrinterService.InvoiceGen:input_type -> printer.v1.invoice.Invoice
|
||||
8, // 14: printer.v1.invoice.PrinterService.InvoiceGen:output_type -> printer.v1.invoice.DocumentResponse
|
||||
14, // [14:15] is the sub-list for method output_type
|
||||
13, // [13:14] is the sub-list for method input_type
|
||||
13, // [13:13] is the sub-list for extension type_name
|
||||
13, // [13:13] is the sub-list for extension extendee
|
||||
0, // [0:13] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_printer_v1_pdf_invoice_proto_init() }
|
||||
func file_printer_v1_pdf_invoice_proto_init() {
|
||||
if File_printer_v1_pdf_invoice_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_printer_v1_pdf_invoice_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*InvoiceInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_printer_v1_pdf_invoice_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*OrderInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_printer_v1_pdf_invoice_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*OfferInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_printer_v1_pdf_invoice_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*OrderItem); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_printer_v1_pdf_invoice_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*OrderVatItem); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_printer_v1_pdf_invoice_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Invoice); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_printer_v1_pdf_invoice_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DocumentResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
file_printer_v1_pdf_invoice_proto_msgTypes[1].OneofWrappers = []interface{}{}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_printer_v1_pdf_invoice_proto_rawDesc,
|
||||
NumEnums: 2,
|
||||
NumMessages: 7,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_printer_v1_pdf_invoice_proto_goTypes,
|
||||
DependencyIndexes: file_printer_v1_pdf_invoice_proto_depIdxs,
|
||||
EnumInfos: file_printer_v1_pdf_invoice_proto_enumTypes,
|
||||
MessageInfos: file_printer_v1_pdf_invoice_proto_msgTypes,
|
||||
}.Build()
|
||||
File_printer_v1_pdf_invoice_proto = out.File
|
||||
file_printer_v1_pdf_invoice_proto_rawDesc = nil
|
||||
file_printer_v1_pdf_invoice_proto_goTypes = nil
|
||||
file_printer_v1_pdf_invoice_proto_depIdxs = nil
|
||||
}
|
||||
170
gen/proto/go/printer/v1/pdf_invoice.pb.gw.go
Normal file
170
gen/proto/go/printer/v1/pdf_invoice.pb.gw.go
Normal file
@@ -0,0 +1,170 @@
|
||||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: printer/v1/pdf_invoice.proto
|
||||
|
||||
/*
|
||||
Package v1 is a reverse proxy.
|
||||
|
||||
It translates gRPC into RESTful JSON APIs.
|
||||
*/
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
extV1 "git.deineagentur.biz/payment-backoffice/protobuf/gen/proto/go/printer/v1"
|
||||
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
||||
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/grpclog"
|
||||
"google.golang.org/grpc/metadata"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
// Suppress "imported and not used" errors
|
||||
var _ codes.Code
|
||||
var _ io.Reader
|
||||
var _ status.Status
|
||||
var _ = runtime.String
|
||||
var _ = utilities.NewDoubleArray
|
||||
var _ = metadata.Join
|
||||
|
||||
func request_PrinterService_InvoiceGen_0(ctx context.Context, marshaler runtime.Marshaler, client extV1.PrinterServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq extV1.Invoice
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||
if berr != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||
}
|
||||
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.InvoiceGen(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_PrinterService_InvoiceGen_0(ctx context.Context, marshaler runtime.Marshaler, server extV1.PrinterServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq extV1.Invoice
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||
if berr != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||
}
|
||||
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.InvoiceGen(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
// RegisterPrinterServiceHandlerServer registers the http handlers for service PrinterService to "mux".
|
||||
// UnaryRPC :call PrinterServiceServer directly.
|
||||
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
||||
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPrinterServiceHandlerFromEndpoint instead.
|
||||
func RegisterPrinterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server extV1.PrinterServiceServer) error {
|
||||
|
||||
mux.Handle("POST", pattern_PrinterService_InvoiceGen_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/printer.v1.invoice.PrinterService/InvoiceGen", runtime.WithHTTPPathPattern("/v1/printer/invoice"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_PrinterService_InvoiceGen_0(ctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_PrinterService_InvoiceGen_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RegisterPrinterServiceHandlerFromEndpoint is same as RegisterPrinterServiceHandler but
|
||||
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
|
||||
func RegisterPrinterServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
|
||||
conn, err := grpc.Dial(endpoint, opts...)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer func() {
|
||||
if err != nil {
|
||||
if cerr := conn.Close(); cerr != nil {
|
||||
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
|
||||
}
|
||||
return
|
||||
}
|
||||
go func() {
|
||||
<-ctx.Done()
|
||||
if cerr := conn.Close(); cerr != nil {
|
||||
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
|
||||
}
|
||||
}()
|
||||
}()
|
||||
|
||||
return RegisterPrinterServiceHandler(ctx, mux, conn)
|
||||
}
|
||||
|
||||
// RegisterPrinterServiceHandler registers the http handlers for service PrinterService to "mux".
|
||||
// The handlers forward requests to the grpc endpoint over "conn".
|
||||
func RegisterPrinterServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
|
||||
return RegisterPrinterServiceHandlerClient(ctx, mux, extV1.NewPrinterServiceClient(conn))
|
||||
}
|
||||
|
||||
// RegisterPrinterServiceHandlerClient registers the http handlers for service PrinterService
|
||||
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "extV1.PrinterServiceClient".
|
||||
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "extV1.PrinterServiceClient"
|
||||
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
|
||||
// "extV1.PrinterServiceClient" to call the correct interceptors.
|
||||
func RegisterPrinterServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client extV1.PrinterServiceClient) error {
|
||||
|
||||
mux.Handle("POST", pattern_PrinterService_InvoiceGen_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateContext(ctx, mux, req, "/printer.v1.invoice.PrinterService/InvoiceGen", runtime.WithHTTPPathPattern("/v1/printer/invoice"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_PrinterService_InvoiceGen_0(ctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_PrinterService_InvoiceGen_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_PrinterService_InvoiceGen_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "printer", "invoice"}, ""))
|
||||
)
|
||||
|
||||
var (
|
||||
forward_PrinterService_InvoiceGen_0 = runtime.ForwardResponseMessage
|
||||
)
|
||||
103
gen/proto/go/printer/v1/pdf_invoice_grpc.pb.go
Normal file
103
gen/proto/go/printer/v1/pdf_invoice_grpc.pb.go
Normal file
@@ -0,0 +1,103 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc (unknown)
|
||||
// source: printer/v1/pdf_invoice.proto
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
// PrinterServiceClient is the client API for PrinterService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type PrinterServiceClient interface {
|
||||
InvoiceGen(ctx context.Context, in *Invoice, opts ...grpc.CallOption) (*DocumentResponse, error)
|
||||
}
|
||||
|
||||
type printerServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewPrinterServiceClient(cc grpc.ClientConnInterface) PrinterServiceClient {
|
||||
return &printerServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *printerServiceClient) InvoiceGen(ctx context.Context, in *Invoice, opts ...grpc.CallOption) (*DocumentResponse, error) {
|
||||
out := new(DocumentResponse)
|
||||
err := c.cc.Invoke(ctx, "/printer.v1.invoice.PrinterService/InvoiceGen", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// PrinterServiceServer is the server API for PrinterService service.
|
||||
// All implementations should embed UnimplementedPrinterServiceServer
|
||||
// for forward compatibility
|
||||
type PrinterServiceServer interface {
|
||||
InvoiceGen(context.Context, *Invoice) (*DocumentResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedPrinterServiceServer should be embedded to have forward compatible implementations.
|
||||
type UnimplementedPrinterServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedPrinterServiceServer) InvoiceGen(context.Context, *Invoice) (*DocumentResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method InvoiceGen not implemented")
|
||||
}
|
||||
|
||||
// UnsafePrinterServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to PrinterServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafePrinterServiceServer interface {
|
||||
mustEmbedUnimplementedPrinterServiceServer()
|
||||
}
|
||||
|
||||
func RegisterPrinterServiceServer(s grpc.ServiceRegistrar, srv PrinterServiceServer) {
|
||||
s.RegisterService(&PrinterService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _PrinterService_InvoiceGen_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Invoice)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(PrinterServiceServer).InvoiceGen(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/printer.v1.invoice.PrinterService/InvoiceGen",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PrinterServiceServer).InvoiceGen(ctx, req.(*Invoice))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// PrinterService_ServiceDesc is the grpc.ServiceDesc for PrinterService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var PrinterService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "printer.v1.invoice.PrinterService",
|
||||
HandlerType: (*PrinterServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "InvoiceGen",
|
||||
Handler: _PrinterService_InvoiceGen_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "printer/v1/pdf_invoice.proto",
|
||||
}
|
||||
333
gen/proto/go/shop/v1/shop.pb.go
Normal file
333
gen/proto/go/shop/v1/shop.pb.go
Normal file
@@ -0,0 +1,333 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.0
|
||||
// protoc (unknown)
|
||||
// source: shop/v1/shop.proto
|
||||
|
||||
package shopv1
|
||||
|
||||
import (
|
||||
_ "google.golang.org/genproto/googleapis/type/datetime"
|
||||
_ "google.golang.org/genproto/googleapis/type/money"
|
||||
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)
|
||||
)
|
||||
|
||||
// PaymentProvider represents the supported set
|
||||
// of payment providers.
|
||||
type ShopType int32
|
||||
|
||||
const (
|
||||
ShopType_SHOP_TYPE_UNSPECIFIED ShopType = 0
|
||||
ShopType_SHOP_TYPE_DIGITAL ShopType = 1
|
||||
ShopType_SHOP_TYPE_RETAIL ShopType = 2
|
||||
)
|
||||
|
||||
// Enum value maps for ShopType.
|
||||
var (
|
||||
ShopType_name = map[int32]string{
|
||||
0: "SHOP_TYPE_UNSPECIFIED",
|
||||
1: "SHOP_TYPE_DIGITAL",
|
||||
2: "SHOP_TYPE_RETAIL",
|
||||
}
|
||||
ShopType_value = map[string]int32{
|
||||
"SHOP_TYPE_UNSPECIFIED": 0,
|
||||
"SHOP_TYPE_DIGITAL": 1,
|
||||
"SHOP_TYPE_RETAIL": 2,
|
||||
}
|
||||
)
|
||||
|
||||
func (x ShopType) Enum() *ShopType {
|
||||
p := new(ShopType)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x ShopType) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (ShopType) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_shop_v1_shop_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (ShopType) Type() protoreflect.EnumType {
|
||||
return &file_shop_v1_shop_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x ShopType) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ShopType.Descriptor instead.
|
||||
func (ShopType) EnumDescriptor() ([]byte, []int) {
|
||||
return file_shop_v1_shop_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
// Order represents a monetary order.
|
||||
type Shop struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
ShopId *string `protobuf:"bytes,1,opt,name=shop_id,json=shopId,proto3,oneof" json:"shop_id,omitempty"`
|
||||
ShopName string `protobuf:"bytes,2,opt,name=shop_name,json=shopName,proto3" json:"shop_name,omitempty"`
|
||||
ShopType ShopType `protobuf:"varint,3,opt,name=shop_type,json=shopType,proto3,enum=shop.v1.ShopType" json:"shop_type,omitempty"`
|
||||
ShopUrlWww string `protobuf:"bytes,4,opt,name=shop_url_www,json=shopUrlWww,proto3" json:"shop_url_www,omitempty"`
|
||||
ShopUrlLogo string `protobuf:"bytes,5,opt,name=shop_url_logo,json=shopUrlLogo,proto3" json:"shop_url_logo,omitempty"`
|
||||
ShopUrlApi string `protobuf:"bytes,6,opt,name=shop_url_api,json=shopUrlApi,proto3" json:"shop_url_api,omitempty"`
|
||||
ShopCurrency string `protobuf:"bytes,7,opt,name=shop_currency,json=shopCurrency,proto3" json:"shop_currency,omitempty"`
|
||||
ShopPrefixOrder string `protobuf:"bytes,8,opt,name=shop_prefix_order,json=shopPrefixOrder,proto3" json:"shop_prefix_order,omitempty"`
|
||||
ShopPrefixInvoice string `protobuf:"bytes,9,opt,name=shop_prefix_invoice,json=shopPrefixInvoice,proto3" json:"shop_prefix_invoice,omitempty"`
|
||||
ShopPrefixOffer string `protobuf:"bytes,10,opt,name=shop_prefix_offer,json=shopPrefixOffer,proto3" json:"shop_prefix_offer,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Shop) Reset() {
|
||||
*x = Shop{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_shop_v1_shop_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Shop) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Shop) ProtoMessage() {}
|
||||
|
||||
func (x *Shop) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_shop_v1_shop_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 Shop.ProtoReflect.Descriptor instead.
|
||||
func (*Shop) Descriptor() ([]byte, []int) {
|
||||
return file_shop_v1_shop_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Shop) GetShopId() string {
|
||||
if x != nil && x.ShopId != nil {
|
||||
return *x.ShopId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Shop) GetShopName() string {
|
||||
if x != nil {
|
||||
return x.ShopName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Shop) GetShopType() ShopType {
|
||||
if x != nil {
|
||||
return x.ShopType
|
||||
}
|
||||
return ShopType_SHOP_TYPE_UNSPECIFIED
|
||||
}
|
||||
|
||||
func (x *Shop) GetShopUrlWww() string {
|
||||
if x != nil {
|
||||
return x.ShopUrlWww
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Shop) GetShopUrlLogo() string {
|
||||
if x != nil {
|
||||
return x.ShopUrlLogo
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Shop) GetShopUrlApi() string {
|
||||
if x != nil {
|
||||
return x.ShopUrlApi
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Shop) GetShopCurrency() string {
|
||||
if x != nil {
|
||||
return x.ShopCurrency
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Shop) GetShopPrefixOrder() string {
|
||||
if x != nil {
|
||||
return x.ShopPrefixOrder
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Shop) GetShopPrefixInvoice() string {
|
||||
if x != nil {
|
||||
return x.ShopPrefixInvoice
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Shop) GetShopPrefixOffer() string {
|
||||
if x != nil {
|
||||
return x.ShopPrefixOffer
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_shop_v1_shop_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_shop_v1_shop_proto_rawDesc = []byte{
|
||||
0x0a, 0x12, 0x73, 0x68, 0x6f, 0x70, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x67,
|
||||
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x65, 0x79,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x74,
|
||||
0x79, 0x70, 0x65, 0x2f, 0x64, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x22, 0x92, 0x03, 0x0a, 0x04, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x1c, 0x0a, 0x07, 0x73,
|
||||
0x68, 0x6f, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06,
|
||||
0x73, 0x68, 0x6f, 0x70, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x68, 0x6f,
|
||||
0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x68,
|
||||
0x6f, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x09, 0x73, 0x68, 0x6f, 0x70, 0x5f, 0x74,
|
||||
0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x73, 0x68, 0x6f, 0x70,
|
||||
0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x73, 0x68,
|
||||
0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0c, 0x73, 0x68, 0x6f, 0x70, 0x5f, 0x75,
|
||||
0x72, 0x6c, 0x5f, 0x77, 0x77, 0x77, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x68,
|
||||
0x6f, 0x70, 0x55, 0x72, 0x6c, 0x57, 0x77, 0x77, 0x12, 0x22, 0x0a, 0x0d, 0x73, 0x68, 0x6f, 0x70,
|
||||
0x5f, 0x75, 0x72, 0x6c, 0x5f, 0x6c, 0x6f, 0x67, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x0b, 0x73, 0x68, 0x6f, 0x70, 0x55, 0x72, 0x6c, 0x4c, 0x6f, 0x67, 0x6f, 0x12, 0x20, 0x0a, 0x0c,
|
||||
0x73, 0x68, 0x6f, 0x70, 0x5f, 0x75, 0x72, 0x6c, 0x5f, 0x61, 0x70, 0x69, 0x18, 0x06, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x0a, 0x73, 0x68, 0x6f, 0x70, 0x55, 0x72, 0x6c, 0x41, 0x70, 0x69, 0x12, 0x23,
|
||||
0x0a, 0x0d, 0x73, 0x68, 0x6f, 0x70, 0x5f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18,
|
||||
0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x68, 0x6f, 0x70, 0x43, 0x75, 0x72, 0x72, 0x65,
|
||||
0x6e, 0x63, 0x79, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x68, 0x6f, 0x70, 0x5f, 0x70, 0x72, 0x65, 0x66,
|
||||
0x69, 0x78, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f,
|
||||
0x73, 0x68, 0x6f, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12,
|
||||
0x2e, 0x0a, 0x13, 0x73, 0x68, 0x6f, 0x70, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x69,
|
||||
0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x73, 0x68,
|
||||
0x6f, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x12,
|
||||
0x2a, 0x0a, 0x11, 0x73, 0x68, 0x6f, 0x70, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6f,
|
||||
0x66, 0x66, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x68, 0x6f, 0x70,
|
||||
0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4f, 0x66, 0x66, 0x65, 0x72, 0x42, 0x0a, 0x0a, 0x08, 0x5f,
|
||||
0x73, 0x68, 0x6f, 0x70, 0x5f, 0x69, 0x64, 0x2a, 0x52, 0x0a, 0x08, 0x53, 0x68, 0x6f, 0x70, 0x54,
|
||||
0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x48, 0x4f, 0x50, 0x5f, 0x54, 0x59, 0x50, 0x45,
|
||||
0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15,
|
||||
0x0a, 0x11, 0x53, 0x48, 0x4f, 0x50, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x49, 0x47, 0x49,
|
||||
0x54, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x48, 0x4f, 0x50, 0x5f, 0x54, 0x59,
|
||||
0x50, 0x45, 0x5f, 0x52, 0x45, 0x54, 0x41, 0x49, 0x4c, 0x10, 0x02, 0x32, 0xa8, 0x01, 0x0a, 0x0b,
|
||||
0x53, 0x68, 0x6f, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x24, 0x0a, 0x04, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x12, 0x0d, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68,
|
||||
0x6f, 0x70, 0x1a, 0x0d, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x6f,
|
||||
0x70, 0x12, 0x23, 0x0a, 0x03, 0x41, 0x64, 0x64, 0x12, 0x0d, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x1a, 0x0d, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x76,
|
||||
0x31, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x26, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x12, 0x0d, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x1a,
|
||||
0x0d, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x26,
|
||||
0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x0d, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x1a, 0x0d, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x76,
|
||||
0x31, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x42, 0xa3, 0x01, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x73,
|
||||
0x68, 0x6f, 0x70, 0x2e, 0x76, 0x31, 0x42, 0x09, 0x53, 0x68, 0x6f, 0x70, 0x50, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x50, 0x01, 0x5a, 0x4c, 0x67, 0x69, 0x74, 0x2e, 0x64, 0x65, 0x69, 0x6e, 0x65, 0x61, 0x67,
|
||||
0x65, 0x6e, 0x74, 0x75, 0x72, 0x2e, 0x62, 0x69, 0x7a, 0x2f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e,
|
||||
0x74, 0x2d, 0x62, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2f, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f,
|
||||
0x67, 0x6f, 0x2f, 0x73, 0x68, 0x6f, 0x70, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x68, 0x6f, 0x70, 0x76,
|
||||
0x31, 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x53, 0x68, 0x6f, 0x70, 0x2e, 0x56,
|
||||
0x31, 0xca, 0x02, 0x07, 0x53, 0x68, 0x6f, 0x70, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x13, 0x53, 0x68,
|
||||
0x6f, 0x70, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
|
||||
0x61, 0xea, 0x02, 0x08, 0x53, 0x68, 0x6f, 0x70, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_shop_v1_shop_proto_rawDescOnce sync.Once
|
||||
file_shop_v1_shop_proto_rawDescData = file_shop_v1_shop_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_shop_v1_shop_proto_rawDescGZIP() []byte {
|
||||
file_shop_v1_shop_proto_rawDescOnce.Do(func() {
|
||||
file_shop_v1_shop_proto_rawDescData = protoimpl.X.CompressGZIP(file_shop_v1_shop_proto_rawDescData)
|
||||
})
|
||||
return file_shop_v1_shop_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_shop_v1_shop_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_shop_v1_shop_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_shop_v1_shop_proto_goTypes = []interface{}{
|
||||
(ShopType)(0), // 0: shop.v1.ShopType
|
||||
(*Shop)(nil), // 1: shop.v1.Shop
|
||||
}
|
||||
var file_shop_v1_shop_proto_depIdxs = []int32{
|
||||
0, // 0: shop.v1.Shop.shop_type:type_name -> shop.v1.ShopType
|
||||
1, // 1: shop.v1.ShopService.List:input_type -> shop.v1.Shop
|
||||
1, // 2: shop.v1.ShopService.Add:input_type -> shop.v1.Shop
|
||||
1, // 3: shop.v1.ShopService.Update:input_type -> shop.v1.Shop
|
||||
1, // 4: shop.v1.ShopService.Delete:input_type -> shop.v1.Shop
|
||||
1, // 5: shop.v1.ShopService.List:output_type -> shop.v1.Shop
|
||||
1, // 6: shop.v1.ShopService.Add:output_type -> shop.v1.Shop
|
||||
1, // 7: shop.v1.ShopService.Update:output_type -> shop.v1.Shop
|
||||
1, // 8: shop.v1.ShopService.Delete:output_type -> shop.v1.Shop
|
||||
5, // [5:9] is the sub-list for method output_type
|
||||
1, // [1:5] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_shop_v1_shop_proto_init() }
|
||||
func file_shop_v1_shop_proto_init() {
|
||||
if File_shop_v1_shop_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_shop_v1_shop_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Shop); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
file_shop_v1_shop_proto_msgTypes[0].OneofWrappers = []interface{}{}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_shop_v1_shop_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_shop_v1_shop_proto_goTypes,
|
||||
DependencyIndexes: file_shop_v1_shop_proto_depIdxs,
|
||||
EnumInfos: file_shop_v1_shop_proto_enumTypes,
|
||||
MessageInfos: file_shop_v1_shop_proto_msgTypes,
|
||||
}.Build()
|
||||
File_shop_v1_shop_proto = out.File
|
||||
file_shop_v1_shop_proto_rawDesc = nil
|
||||
file_shop_v1_shop_proto_goTypes = nil
|
||||
file_shop_v1_shop_proto_depIdxs = nil
|
||||
}
|
||||
211
gen/proto/go/shop/v1/shop_grpc.pb.go
Normal file
211
gen/proto/go/shop/v1/shop_grpc.pb.go
Normal file
@@ -0,0 +1,211 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc (unknown)
|
||||
// source: shop/v1/shop.proto
|
||||
|
||||
package shopv1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
// ShopServiceClient is the client API for ShopService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type ShopServiceClient interface {
|
||||
List(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error)
|
||||
Add(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error)
|
||||
Update(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error)
|
||||
Delete(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error)
|
||||
}
|
||||
|
||||
type shopServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewShopServiceClient(cc grpc.ClientConnInterface) ShopServiceClient {
|
||||
return &shopServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *shopServiceClient) List(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error) {
|
||||
out := new(Shop)
|
||||
err := c.cc.Invoke(ctx, "/shop.v1.ShopService/List", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *shopServiceClient) Add(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error) {
|
||||
out := new(Shop)
|
||||
err := c.cc.Invoke(ctx, "/shop.v1.ShopService/Add", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *shopServiceClient) Update(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error) {
|
||||
out := new(Shop)
|
||||
err := c.cc.Invoke(ctx, "/shop.v1.ShopService/Update", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *shopServiceClient) Delete(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error) {
|
||||
out := new(Shop)
|
||||
err := c.cc.Invoke(ctx, "/shop.v1.ShopService/Delete", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// ShopServiceServer is the server API for ShopService service.
|
||||
// All implementations should embed UnimplementedShopServiceServer
|
||||
// for forward compatibility
|
||||
type ShopServiceServer interface {
|
||||
List(context.Context, *Shop) (*Shop, error)
|
||||
Add(context.Context, *Shop) (*Shop, error)
|
||||
Update(context.Context, *Shop) (*Shop, error)
|
||||
Delete(context.Context, *Shop) (*Shop, error)
|
||||
}
|
||||
|
||||
// UnimplementedShopServiceServer should be embedded to have forward compatible implementations.
|
||||
type UnimplementedShopServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedShopServiceServer) List(context.Context, *Shop) (*Shop, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
|
||||
}
|
||||
func (UnimplementedShopServiceServer) Add(context.Context, *Shop) (*Shop, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Add not implemented")
|
||||
}
|
||||
func (UnimplementedShopServiceServer) Update(context.Context, *Shop) (*Shop, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
|
||||
}
|
||||
func (UnimplementedShopServiceServer) Delete(context.Context, *Shop) (*Shop, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
|
||||
}
|
||||
|
||||
// UnsafeShopServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to ShopServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeShopServiceServer interface {
|
||||
mustEmbedUnimplementedShopServiceServer()
|
||||
}
|
||||
|
||||
func RegisterShopServiceServer(s grpc.ServiceRegistrar, srv ShopServiceServer) {
|
||||
s.RegisterService(&ShopService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _ShopService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Shop)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ShopServiceServer).List(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/shop.v1.ShopService/List",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ShopServiceServer).List(ctx, req.(*Shop))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ShopService_Add_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Shop)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ShopServiceServer).Add(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/shop.v1.ShopService/Add",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ShopServiceServer).Add(ctx, req.(*Shop))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ShopService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Shop)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ShopServiceServer).Update(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/shop.v1.ShopService/Update",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ShopServiceServer).Update(ctx, req.(*Shop))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ShopService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Shop)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ShopServiceServer).Delete(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/shop.v1.ShopService/Delete",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ShopServiceServer).Delete(ctx, req.(*Shop))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// ShopService_ServiceDesc is the grpc.ServiceDesc for ShopService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var ShopService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "shop.v1.ShopService",
|
||||
HandlerType: (*ShopServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "List",
|
||||
Handler: _ShopService_List_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Add",
|
||||
Handler: _ShopService_Add_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Update",
|
||||
Handler: _ShopService_Update_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Delete",
|
||||
Handler: _ShopService_Delete_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "shop/v1/shop.proto",
|
||||
}
|
||||
Reference in New Issue
Block a user