This commit is contained in:
2022-05-31 09:30:19 +02:00
parent 9de85ee1ec
commit ccc96319a3
72 changed files with 11971 additions and 4 deletions

8
.idea/.gitignore generated vendored Normal file
View File

@@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

6
.idea/misc.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

8
.idea/modules.xml generated Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/protobuf.iml" filepath="$PROJECT_DIR$/.idea/protobuf.iml" />
</modules>
</component>
</project>

10
.idea/protobuf.iml generated Normal file
View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="Go" enabled="true" />
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

106
.idea/protobuf.xml generated Normal file
View File

@@ -0,0 +1,106 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="BufFileManager">
<libraries>
<module>
<name>buf.build/googleapis/googleapis</name>
<path>$USER_HOME$/.cache/buf/v1/module/data/buf.build/googleapis/googleapis/68946673f2d94bb2b24e6e97a208b752</path>
<reference>buf.build/googleapis/googleapis:68946673f2d94bb2b24e6e97a208b752</reference>
<yaml>$USER_HOME$/.cache/buf/v1/module/data/buf.build/googleapis/googleapis/68946673f2d94bb2b24e6e97a208b752/buf.yaml</yaml>
</module>
</libraries>
<modules>
<module>
<dependencies>
<set>
<option value="buf.build/googleapis/googleapis" />
</set>
</dependencies>
<lockedDependencies>
<dependency>
<commit>68946673f2d94bb2b24e6e97a208b752</commit>
<owner>googleapis</owner>
<remote>buf.build</remote>
<repository>googleapis</repository>
</dependency>
</lockedDependencies>
<name>buf.build/acme/paymentapis</name>
<path>$PROJECT_DIR$/paymentapis</path>
<yaml>$PROJECT_DIR$/paymentapis/buf.yaml</yaml>
</module>
<module>
<dependencies>
<set>
<option value="buf.build/acme/paymentapis" />
<option value="buf.build/googleapis/googleapis" />
</set>
</dependencies>
<lockedDependencies>
<dependency>
<commit>6e230f46113f498392c82d12b1a07b70</commit>
<owner>acme</owner>
<remote>buf.build</remote>
<repository>paymentapis</repository>
</dependency>
<dependency>
<commit>68946673f2d94bb2b24e6e97a208b752</commit>
<owner>googleapis</owner>
<remote>buf.build</remote>
<repository>googleapis</repository>
</dependency>
</lockedDependencies>
<name>buf.build/acme/petapis</name>
<path>$PROJECT_DIR$/petapis</path>
<yaml>$PROJECT_DIR$/petapis/buf.yaml</yaml>
</module>
<module>
<dependencies>
<set>
<option value="buf.build/googleapis/googleapis" />
</set>
</dependencies>
<lockedDependencies>
<dependency>
<commit>68946673f2d94bb2b24e6e97a208b752</commit>
<owner>googleapis</owner>
<remote>buf.build</remote>
<repository>googleapis</repository>
</dependency>
</lockedDependencies>
<name>buf.build/acme/printerapis</name>
<path>$PROJECT_DIR$/printerapis</path>
<yaml>$PROJECT_DIR$/printerapis/buf.yaml</yaml>
</module>
<module>
<dependencies>
<set>
<option value="buf.build/googleapis/googleapis" />
</set>
</dependencies>
<lockedDependencies>
<dependency>
<commit>68946673f2d94bb2b24e6e97a208b752</commit>
<owner>googleapis</owner>
<remote>buf.build</remote>
<repository>googleapis</repository>
</dependency>
</lockedDependencies>
<name>buf.build/acme/shopapis</name>
<path>$PROJECT_DIR$/shopapis</path>
<yaml>$PROJECT_DIR$/shopapis/buf.yaml</yaml>
</module>
</modules>
<workspaces>
<workspace>
<path>$PROJECT_DIR$</path>
<roots>
<root value="$PROJECT_DIR$/paymentapis" />
<root value="$PROJECT_DIR$/petapis" />
<root value="$PROJECT_DIR$/printerapis" />
<root value="$PROJECT_DIR$/shopapis" />
</roots>
<yaml>$PROJECT_DIR$/buf.work.yaml</yaml>
</workspace>
</workspaces>
</component>
</project>

6
.idea/vcs.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

View File

@@ -8,9 +8,33 @@ managed:
plugins:
- name: go
out: gen/proto/go
opt: paths=source_relative
opt:
- paths=source_relative
- name: go-grpc
out: gen/proto/go
opt:
- paths=source_relative
- require_unimplemented_servers=false
- name: grpc-gateway
out: gen/proto/go
opt:
- paths=source_relative
- standalone=true
- name: openapiv2
out: gen/openapiv2
opt:
- use_go_templates=true
- name: js
out: gen/web
opt:
- import_style=commonjs,binary
- name: grpc-web
out: gen/web
opt:
- import_style=commonjs+dts,mode=grpcwebtext
- name: php
out: gen/proto/php
- name: node
out: gen/proto/node
opt:
- paths=source_relative

View File

@@ -1,4 +1,6 @@
version: v1
directories:
- shopapis
- printerapis
- paymentapis
- petapis
- petapis

View File

@@ -0,0 +1,43 @@
{
"swagger": "2.0",
"info": {
"title": "payment/v1/payment.proto",
"version": "version not set"
},
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {},
"definitions": {
"protobufAny": {
"type": "object",
"properties": {
"@type": {
"type": "string"
}
},
"additionalProperties": {}
},
"rpcStatus": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"$ref": "#/definitions/protobufAny"
}
}
}
}
}
}

View File

@@ -0,0 +1,212 @@
{
"swagger": "2.0",
"info": {
"title": "pet/v1/pet.proto",
"version": "version not set"
},
"tags": [
{
"name": "PetStoreService"
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {},
"definitions": {
"protobufAny": {
"type": "object",
"properties": {
"@type": {
"type": "string"
}
},
"additionalProperties": {}
},
"rpcStatus": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"$ref": "#/definitions/protobufAny"
}
}
}
},
"typeDateTime": {
"type": "object",
"properties": {
"year": {
"type": "integer",
"format": "int32",
"description": "Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a\ndatetime without a year."
},
"month": {
"type": "integer",
"format": "int32",
"description": "Required. Month of year. Must be from 1 to 12."
},
"day": {
"type": "integer",
"format": "int32",
"description": "Required. Day of month. Must be from 1 to 31 and valid for the year and\nmonth."
},
"hours": {
"type": "integer",
"format": "int32",
"description": "Required. Hours of day in 24 hour format. Should be from 0 to 23. An API\nmay choose to allow the value \"24:00:00\" for scenarios like business\nclosing time."
},
"minutes": {
"type": "integer",
"format": "int32",
"description": "Required. Minutes of hour of day. Must be from 0 to 59."
},
"seconds": {
"type": "integer",
"format": "int32",
"description": "Required. Seconds of minutes of the time. Must normally be from 0 to 59. An\nAPI may allow the value 60 if it allows leap-seconds."
},
"nanos": {
"type": "integer",
"format": "int32",
"description": "Required. Fractions of seconds in nanoseconds. Must be from 0 to\n999,999,999."
},
"utcOffset": {
"type": "string",
"description": "UTC offset. Must be whole seconds, between -18 hours and +18 hours.\nFor example, a UTC offset of -4:00 would be represented as\n{ seconds: -14400 }."
},
"timeZone": {
"$ref": "#/definitions/typeTimeZone",
"description": "Time zone."
}
},
"description": "Represents civil time (or occasionally physical time).\n\nThis type can represent a civil time in one of a few possible ways:\n\n * When utc_offset is set and time_zone is unset: a civil time on a calendar\n day with a particular offset from UTC.\n * When time_zone is set and utc_offset is unset: a civil time on a calendar\n day in a particular time zone.\n * When neither time_zone nor utc_offset is set: a civil time on a calendar\n day in local time.\n\nThe date is relative to the Proleptic Gregorian Calendar.\n\nIf year is 0, the DateTime is considered not to have a specific year. month\nand day must have valid, non-zero values.\n\nThis type may also be used to represent a physical time if all the date and\ntime fields are set and either case of the `time_offset` oneof is set.\nConsider using `Timestamp` message for physical time instead. If your use\ncase also would like to store the user's timezone, that can be done in\nanother field.\n\nThis type is more flexible than some applications may want. Make sure to\ndocument and validate your application's limitations."
},
"typeMoney": {
"type": "object",
"properties": {
"currencyCode": {
"type": "string",
"description": "The three-letter currency code defined in ISO 4217."
},
"units": {
"type": "string",
"format": "int64",
"description": "The whole units of the amount.\nFor example if `currencyCode` is `\"USD\"`, then 1 unit is one US dollar."
},
"nanos": {
"type": "integer",
"format": "int32",
"description": "Number of nano (10^-9) units of the amount.\nThe value must be between -999,999,999 and +999,999,999 inclusive.\nIf `units` is positive, `nanos` must be positive or zero.\nIf `units` is zero, `nanos` can be positive, zero, or negative.\nIf `units` is negative, `nanos` must be negative or zero.\nFor example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000."
}
},
"description": "Represents an amount of money with its currency type."
},
"typeTimeZone": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "IANA Time Zone Database time zone, e.g. \"America/New_York\"."
},
"version": {
"type": "string",
"description": "Optional. IANA Time Zone Database version number, e.g. \"2019a\"."
}
},
"description": "Represents a time zone from the\n[IANA Time Zone Database](https://www.iana.org/time-zones)."
},
"v1DeletePetResponse": {
"type": "object"
},
"v1GetPetResponse": {
"type": "object",
"properties": {
"pet": {
"$ref": "#/definitions/v1Pet"
}
}
},
"v1Order": {
"type": "object",
"properties": {
"orderId": {
"type": "string"
},
"recipientId": {
"type": "string"
},
"amount": {
"$ref": "#/definitions/typeMoney"
},
"paymentProvider": {
"$ref": "#/definitions/v1PaymentProvider"
}
},
"description": "Order represents a monetary order."
},
"v1PaymentProvider": {
"type": "string",
"enum": [
"PAYMENT_PROVIDER_UNSPECIFIED",
"PAYMENT_PROVIDER_STRIPE",
"PAYMENT_PROVIDER_PAYPAL",
"PAYMENT_PROVIDER_APPLE"
],
"default": "PAYMENT_PROVIDER_UNSPECIFIED",
"description": "PaymentProvider represents the supported set\nof payment providers."
},
"v1Pet": {
"type": "object",
"properties": {
"petType": {
"$ref": "#/definitions/v1PetType"
},
"petId": {
"type": "string"
},
"name": {
"type": "string"
},
"createdAt": {
"$ref": "#/definitions/typeDateTime"
}
},
"description": "Pet represents a pet in the pet store."
},
"v1PetType": {
"type": "string",
"enum": [
"PET_TYPE_UNSPECIFIED",
"PET_TYPE_CAT",
"PET_TYPE_DOG",
"PET_TYPE_SNAKE",
"PET_TYPE_HAMSTER"
],
"default": "PET_TYPE_UNSPECIFIED",
"description": "PetType represents the different types of pets in the pet store."
},
"v1PurchasePetResponse": {
"type": "object"
},
"v1PutPetResponse": {
"type": "object",
"properties": {
"pet": {
"$ref": "#/definitions/v1Pet"
}
}
}
}
}

View File

@@ -0,0 +1,306 @@
{
"swagger": "2.0",
"info": {
"title": "printer/v1/pdf_invoice.proto",
"version": "version not set"
},
"tags": [
{
"name": "PrinterService"
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/v1/printer/invoice": {
"post": {
"operationId": "PrinterService_InvoiceGen",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/invoiceDocumentResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/invoiceInvoice"
}
}
],
"tags": [
"PrinterService"
]
}
}
},
"definitions": {
"invoiceDocumentResponse": {
"type": "object",
"properties": {
"document": {
"type": "string",
"format": "byte"
},
"signature": {
"type": "string"
},
"sha512": {
"type": "string"
}
},
"title": "PDF Response"
},
"invoiceInvoice": {
"type": "object",
"properties": {
"order": {
"$ref": "#/definitions/invoiceOrderInfo"
},
"offer": {
"$ref": "#/definitions/invoiceOfferInfo"
},
"info": {
"$ref": "#/definitions/invoiceInvoiceInfo"
}
},
"title": "Invoice"
},
"invoiceInvoiceInfo": {
"type": "object",
"properties": {
"invoiceId": {
"type": "string"
},
"invoiceDate": {
"$ref": "#/definitions/typeDateTime"
},
"invoiceDueDate": {
"$ref": "#/definitions/typeDateTime"
},
"invoiceType": {
"$ref": "#/definitions/invoiceInvoiceType"
}
}
},
"invoiceInvoiceType": {
"type": "string",
"enum": [
"INVOICE_TYPE_UNSPECIFIED",
"INVOICE_TYPE_PAID",
"INVOICE_TYPE_OPEN"
],
"default": "INVOICE_TYPE_UNSPECIFIED",
"description": "PaymentProvider represents the supported set\nof payment providers."
},
"invoiceOfferInfo": {
"type": "object",
"properties": {
"offerId": {
"type": "string"
},
"offerDate": {
"$ref": "#/definitions/typeDateTime"
},
"offerDueDate": {
"$ref": "#/definitions/typeDateTime"
}
}
},
"invoiceOrderInfo": {
"type": "object",
"properties": {
"orderId": {
"type": "string"
},
"orderDate": {
"$ref": "#/definitions/typeDateTime"
},
"orderDueDate": {
"$ref": "#/definitions/typeDateTime"
},
"orderType": {
"$ref": "#/definitions/invoiceOrderType"
},
"orderItems": {
"type": "array",
"items": {
"$ref": "#/definitions/invoiceOrderItem"
}
},
"orderVatItems": {
"type": "array",
"items": {
"$ref": "#/definitions/invoiceOrderVatItem"
}
},
"deposit": {
"type": "number",
"format": "double"
}
}
},
"invoiceOrderItem": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"vat": {
"type": "number",
"format": "double"
},
"count": {
"type": "string",
"format": "uint64"
},
"priceSingle": {
"type": "number",
"format": "double"
},
"priceSum": {
"type": "number",
"format": "double"
},
"priceNet": {
"type": "boolean"
}
}
},
"invoiceOrderType": {
"type": "string",
"enum": [
"ORDER_TYPE_UNSPECIFIED",
"ORDER_TYPE_PHONE",
"ORDER_TYPE_WWW",
"ORDER_TYPE_EMAIL"
],
"default": "ORDER_TYPE_UNSPECIFIED"
},
"invoiceOrderVatItem": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"vat": {
"type": "number",
"format": "double"
},
"vatMoneySum": {
"type": "number",
"format": "double"
},
"itemsCount": {
"type": "string",
"format": "uint64"
}
}
},
"protobufAny": {
"type": "object",
"properties": {
"@type": {
"type": "string"
}
},
"additionalProperties": {}
},
"rpcStatus": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"$ref": "#/definitions/protobufAny"
}
}
}
},
"typeDateTime": {
"type": "object",
"properties": {
"year": {
"type": "integer",
"format": "int32",
"description": "Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a\ndatetime without a year."
},
"month": {
"type": "integer",
"format": "int32",
"description": "Required. Month of year. Must be from 1 to 12."
},
"day": {
"type": "integer",
"format": "int32",
"description": "Required. Day of month. Must be from 1 to 31 and valid for the year and\nmonth."
},
"hours": {
"type": "integer",
"format": "int32",
"description": "Required. Hours of day in 24 hour format. Should be from 0 to 23. An API\nmay choose to allow the value \"24:00:00\" for scenarios like business\nclosing time."
},
"minutes": {
"type": "integer",
"format": "int32",
"description": "Required. Minutes of hour of day. Must be from 0 to 59."
},
"seconds": {
"type": "integer",
"format": "int32",
"description": "Required. Seconds of minutes of the time. Must normally be from 0 to 59. An\nAPI may allow the value 60 if it allows leap-seconds."
},
"nanos": {
"type": "integer",
"format": "int32",
"description": "Required. Fractions of seconds in nanoseconds. Must be from 0 to\n999,999,999."
},
"utcOffset": {
"type": "string",
"description": "UTC offset. Must be whole seconds, between -18 hours and +18 hours.\nFor example, a UTC offset of -4:00 would be represented as\n{ seconds: -14400 }."
},
"timeZone": {
"$ref": "#/definitions/typeTimeZone",
"description": "Time zone."
}
},
"description": "Represents civil time (or occasionally physical time).\n\nThis type can represent a civil time in one of a few possible ways:\n\n * When utc_offset is set and time_zone is unset: a civil time on a calendar\n day with a particular offset from UTC.\n * When time_zone is set and utc_offset is unset: a civil time on a calendar\n day in a particular time zone.\n * When neither time_zone nor utc_offset is set: a civil time on a calendar\n day in local time.\n\nThe date is relative to the Proleptic Gregorian Calendar.\n\nIf year is 0, the DateTime is considered not to have a specific year. month\nand day must have valid, non-zero values.\n\nThis type may also be used to represent a physical time if all the date and\ntime fields are set and either case of the `time_offset` oneof is set.\nConsider using `Timestamp` message for physical time instead. If your use\ncase also would like to store the user's timezone, that can be done in\nanother field.\n\nThis type is more flexible than some applications may want. Make sure to\ndocument and validate your application's limitations."
},
"typeTimeZone": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "IANA Time Zone Database time zone, e.g. \"America/New_York\"."
},
"version": {
"type": "string",
"description": "Optional. IANA Time Zone Database version number, e.g. \"2019a\"."
}
},
"description": "Represents a time zone from the\n[IANA Time Zone Database](https://www.iana.org/time-zones)."
}
}
}

View File

@@ -0,0 +1,94 @@
{
"swagger": "2.0",
"info": {
"title": "shop/v1/shop.proto",
"version": "version not set"
},
"tags": [
{
"name": "ShopService"
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {},
"definitions": {
"protobufAny": {
"type": "object",
"properties": {
"@type": {
"type": "string"
}
},
"additionalProperties": {}
},
"rpcStatus": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"$ref": "#/definitions/protobufAny"
}
}
}
},
"v1Shop": {
"type": "object",
"properties": {
"shopId": {
"type": "string"
},
"shopName": {
"type": "string"
},
"shopType": {
"$ref": "#/definitions/v1ShopType"
},
"shopUrlWww": {
"type": "string"
},
"shopUrlLogo": {
"type": "string"
},
"shopUrlApi": {
"type": "string"
},
"shopCurrency": {
"type": "string"
},
"shopPrefixOrder": {
"type": "string"
},
"shopPrefixInvoice": {
"type": "string"
},
"shopPrefixOffer": {
"type": "string"
}
},
"description": "Order represents a monetary order."
},
"v1ShopType": {
"type": "string",
"enum": [
"SHOP_TYPE_UNSPECIFIED",
"SHOP_TYPE_DIGITAL",
"SHOP_TYPE_RETAIL"
],
"default": "SHOP_TYPE_UNSPECIFIED",
"description": "PaymentProvider represents the supported set\nof payment providers."
}
}
}

View 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: 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",
}

View 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
)

View 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",
}

View 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",
}

View 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
}

View 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
)

View 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",
}

View 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
}

View 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",
}

Binary file not shown.

View File

@@ -0,0 +1,151 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: payment/v1/payment.proto
namespace Payment\V1;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Order represents a monetary order.
*
* Generated from protobuf message <code>payment.v1.Order</code>
*/
class Order extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>string order_id = 1 [json_name = "orderId"];</code>
*/
protected $order_id = '';
/**
* Generated from protobuf field <code>string recipient_id = 2 [json_name = "recipientId"];</code>
*/
protected $recipient_id = '';
/**
* Generated from protobuf field <code>.google.type.Money amount = 3 [json_name = "amount"];</code>
*/
protected $amount = null;
/**
* Generated from protobuf field <code>.payment.v1.PaymentProvider payment_provider = 4 [json_name = "paymentProvider"];</code>
*/
protected $payment_provider = 0;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $order_id
* @type string $recipient_id
* @type \Google\Type\Money $amount
* @type int $payment_provider
* }
*/
public function __construct($data = NULL) {
\Payment\V1\GPBMetadata\Payment::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>string order_id = 1 [json_name = "orderId"];</code>
* @return string
*/
public function getOrderId()
{
return $this->order_id;
}
/**
* Generated from protobuf field <code>string order_id = 1 [json_name = "orderId"];</code>
* @param string $var
* @return $this
*/
public function setOrderId($var)
{
GPBUtil::checkString($var, True);
$this->order_id = $var;
return $this;
}
/**
* Generated from protobuf field <code>string recipient_id = 2 [json_name = "recipientId"];</code>
* @return string
*/
public function getRecipientId()
{
return $this->recipient_id;
}
/**
* Generated from protobuf field <code>string recipient_id = 2 [json_name = "recipientId"];</code>
* @param string $var
* @return $this
*/
public function setRecipientId($var)
{
GPBUtil::checkString($var, True);
$this->recipient_id = $var;
return $this;
}
/**
* Generated from protobuf field <code>.google.type.Money amount = 3 [json_name = "amount"];</code>
* @return \Google\Type\Money|null
*/
public function getAmount()
{
return $this->amount;
}
public function hasAmount()
{
return isset($this->amount);
}
public function clearAmount()
{
unset($this->amount);
}
/**
* Generated from protobuf field <code>.google.type.Money amount = 3 [json_name = "amount"];</code>
* @param \Google\Type\Money $var
* @return $this
*/
public function setAmount($var)
{
GPBUtil::checkMessage($var, \Google\Type\Money::class);
$this->amount = $var;
return $this;
}
/**
* Generated from protobuf field <code>.payment.v1.PaymentProvider payment_provider = 4 [json_name = "paymentProvider"];</code>
* @return int
*/
public function getPaymentProvider()
{
return $this->payment_provider;
}
/**
* Generated from protobuf field <code>.payment.v1.PaymentProvider payment_provider = 4 [json_name = "paymentProvider"];</code>
* @param int $var
* @return $this
*/
public function setPaymentProvider($var)
{
GPBUtil::checkEnum($var, \Payment\V1\PaymentProvider::class);
$this->payment_provider = $var;
return $this;
}
}

View File

@@ -0,0 +1,61 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: payment/v1/payment.proto
namespace Payment\V1;
use UnexpectedValueException;
/**
* PaymentProvider represents the supported set
* of payment providers.
*
* Protobuf type <code>payment.v1.PaymentProvider</code>
*/
class PaymentProvider
{
/**
* Generated from protobuf enum <code>PAYMENT_PROVIDER_UNSPECIFIED = 0;</code>
*/
const PAYMENT_PROVIDER_UNSPECIFIED = 0;
/**
* Generated from protobuf enum <code>PAYMENT_PROVIDER_STRIPE = 1;</code>
*/
const PAYMENT_PROVIDER_STRIPE = 1;
/**
* Generated from protobuf enum <code>PAYMENT_PROVIDER_PAYPAL = 2;</code>
*/
const PAYMENT_PROVIDER_PAYPAL = 2;
/**
* Generated from protobuf enum <code>PAYMENT_PROVIDER_APPLE = 3;</code>
*/
const PAYMENT_PROVIDER_APPLE = 3;
private static $valueToName = [
self::PAYMENT_PROVIDER_UNSPECIFIED => 'PAYMENT_PROVIDER_UNSPECIFIED',
self::PAYMENT_PROVIDER_STRIPE => 'PAYMENT_PROVIDER_STRIPE',
self::PAYMENT_PROVIDER_PAYPAL => 'PAYMENT_PROVIDER_PAYPAL',
self::PAYMENT_PROVIDER_APPLE => 'PAYMENT_PROVIDER_APPLE',
];
public static function name($value)
{
if (!isset(self::$valueToName[$value])) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no name defined for value %s', __CLASS__, $value));
}
return self::$valueToName[$value];
}
public static function value($name)
{
$const = __CLASS__ . '::' . strtoupper($name);
if (!defined($const)) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no value defined for name %s', __CLASS__, $name));
}
return constant($const);
}
}

View File

@@ -0,0 +1,58 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pet/v1/pet.proto
namespace Pet\V1;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>pet.v1.DeletePetRequest</code>
*/
class DeletePetRequest extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>string pet_id = 1 [json_name = "petId"];</code>
*/
protected $pet_id = '';
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $pet_id
* }
*/
public function __construct($data = NULL) {
\Pet\V1\GPBMetadata\Pet::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>string pet_id = 1 [json_name = "petId"];</code>
* @return string
*/
public function getPetId()
{
return $this->pet_id;
}
/**
* Generated from protobuf field <code>string pet_id = 1 [json_name = "petId"];</code>
* @param string $var
* @return $this
*/
public function setPetId($var)
{
GPBUtil::checkString($var, True);
$this->pet_id = $var;
return $this;
}
}

View File

@@ -0,0 +1,31 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pet/v1/pet.proto
namespace Pet\V1;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>pet.v1.DeletePetResponse</code>
*/
class DeletePetResponse extends \Google\Protobuf\Internal\Message
{
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* }
*/
public function __construct($data = NULL) {
\Pet\V1\GPBMetadata\Pet::initOnce();
parent::__construct($data);
}
}

Binary file not shown.

View File

@@ -0,0 +1,58 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pet/v1/pet.proto
namespace Pet\V1;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>pet.v1.GetPetRequest</code>
*/
class GetPetRequest extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>string pet_id = 1 [json_name = "petId"];</code>
*/
protected $pet_id = '';
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $pet_id
* }
*/
public function __construct($data = NULL) {
\Pet\V1\GPBMetadata\Pet::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>string pet_id = 1 [json_name = "petId"];</code>
* @return string
*/
public function getPetId()
{
return $this->pet_id;
}
/**
* Generated from protobuf field <code>string pet_id = 1 [json_name = "petId"];</code>
* @param string $var
* @return $this
*/
public function setPetId($var)
{
GPBUtil::checkString($var, True);
$this->pet_id = $var;
return $this;
}
}

View File

@@ -0,0 +1,68 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pet/v1/pet.proto
namespace Pet\V1;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>pet.v1.GetPetResponse</code>
*/
class GetPetResponse extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>.pet.v1.Pet pet = 1 [json_name = "pet"];</code>
*/
protected $pet = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type \Pet\V1\Pet $pet
* }
*/
public function __construct($data = NULL) {
\Pet\V1\GPBMetadata\Pet::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>.pet.v1.Pet pet = 1 [json_name = "pet"];</code>
* @return \Pet\V1\Pet|null
*/
public function getPet()
{
return $this->pet;
}
public function hasPet()
{
return isset($this->pet);
}
public function clearPet()
{
unset($this->pet);
}
/**
* Generated from protobuf field <code>.pet.v1.Pet pet = 1 [json_name = "pet"];</code>
* @param \Pet\V1\Pet $var
* @return $this
*/
public function setPet($var)
{
GPBUtil::checkMessage($var, \Pet\V1\Pet::class);
$this->pet = $var;
return $this;
}
}

View File

@@ -0,0 +1,151 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pet/v1/pet.proto
namespace Pet\V1;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Pet represents a pet in the pet store.
*
* Generated from protobuf message <code>pet.v1.Pet</code>
*/
class Pet extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>.pet.v1.PetType pet_type = 1 [json_name = "petType"];</code>
*/
protected $pet_type = 0;
/**
* Generated from protobuf field <code>string pet_id = 2 [json_name = "petId"];</code>
*/
protected $pet_id = '';
/**
* Generated from protobuf field <code>string name = 3 [json_name = "name"];</code>
*/
protected $name = '';
/**
* Generated from protobuf field <code>.google.type.DateTime created_at = 4 [json_name = "createdAt"];</code>
*/
protected $created_at = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type int $pet_type
* @type string $pet_id
* @type string $name
* @type \Google\Type\DateTime $created_at
* }
*/
public function __construct($data = NULL) {
\Pet\V1\GPBMetadata\Pet::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>.pet.v1.PetType pet_type = 1 [json_name = "petType"];</code>
* @return int
*/
public function getPetType()
{
return $this->pet_type;
}
/**
* Generated from protobuf field <code>.pet.v1.PetType pet_type = 1 [json_name = "petType"];</code>
* @param int $var
* @return $this
*/
public function setPetType($var)
{
GPBUtil::checkEnum($var, \Pet\V1\PetType::class);
$this->pet_type = $var;
return $this;
}
/**
* Generated from protobuf field <code>string pet_id = 2 [json_name = "petId"];</code>
* @return string
*/
public function getPetId()
{
return $this->pet_id;
}
/**
* Generated from protobuf field <code>string pet_id = 2 [json_name = "petId"];</code>
* @param string $var
* @return $this
*/
public function setPetId($var)
{
GPBUtil::checkString($var, True);
$this->pet_id = $var;
return $this;
}
/**
* Generated from protobuf field <code>string name = 3 [json_name = "name"];</code>
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Generated from protobuf field <code>string name = 3 [json_name = "name"];</code>
* @param string $var
* @return $this
*/
public function setName($var)
{
GPBUtil::checkString($var, True);
$this->name = $var;
return $this;
}
/**
* Generated from protobuf field <code>.google.type.DateTime created_at = 4 [json_name = "createdAt"];</code>
* @return \Google\Type\DateTime|null
*/
public function getCreatedAt()
{
return $this->created_at;
}
public function hasCreatedAt()
{
return isset($this->created_at);
}
public function clearCreatedAt()
{
unset($this->created_at);
}
/**
* Generated from protobuf field <code>.google.type.DateTime created_at = 4 [json_name = "createdAt"];</code>
* @param \Google\Type\DateTime $var
* @return $this
*/
public function setCreatedAt($var)
{
GPBUtil::checkMessage($var, \Google\Type\DateTime::class);
$this->created_at = $var;
return $this;
}
}

View File

@@ -0,0 +1,65 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pet/v1/pet.proto
namespace Pet\V1;
use UnexpectedValueException;
/**
* PetType represents the different types of pets in the pet store.
*
* Protobuf type <code>pet.v1.PetType</code>
*/
class PetType
{
/**
* Generated from protobuf enum <code>PET_TYPE_UNSPECIFIED = 0;</code>
*/
const PET_TYPE_UNSPECIFIED = 0;
/**
* Generated from protobuf enum <code>PET_TYPE_CAT = 1;</code>
*/
const PET_TYPE_CAT = 1;
/**
* Generated from protobuf enum <code>PET_TYPE_DOG = 2;</code>
*/
const PET_TYPE_DOG = 2;
/**
* Generated from protobuf enum <code>PET_TYPE_SNAKE = 3;</code>
*/
const PET_TYPE_SNAKE = 3;
/**
* Generated from protobuf enum <code>PET_TYPE_HAMSTER = 4;</code>
*/
const PET_TYPE_HAMSTER = 4;
private static $valueToName = [
self::PET_TYPE_UNSPECIFIED => 'PET_TYPE_UNSPECIFIED',
self::PET_TYPE_CAT => 'PET_TYPE_CAT',
self::PET_TYPE_DOG => 'PET_TYPE_DOG',
self::PET_TYPE_SNAKE => 'PET_TYPE_SNAKE',
self::PET_TYPE_HAMSTER => 'PET_TYPE_HAMSTER',
];
public static function name($value)
{
if (!isset(self::$valueToName[$value])) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no name defined for value %s', __CLASS__, $value));
}
return self::$valueToName[$value];
}
public static function value($name)
{
$const = __CLASS__ . '::' . strtoupper($name);
if (!defined($const)) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no value defined for name %s', __CLASS__, $name));
}
return constant($const);
}
}

View File

@@ -0,0 +1,95 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pet/v1/pet.proto
namespace Pet\V1;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>pet.v1.PurchasePetRequest</code>
*/
class PurchasePetRequest extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>string pet_id = 1 [json_name = "petId"];</code>
*/
protected $pet_id = '';
/**
* Generated from protobuf field <code>.payment.v1.Order order = 2 [json_name = "order"];</code>
*/
protected $order = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $pet_id
* @type \Payment\V1\Order $order
* }
*/
public function __construct($data = NULL) {
\Pet\V1\GPBMetadata\Pet::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>string pet_id = 1 [json_name = "petId"];</code>
* @return string
*/
public function getPetId()
{
return $this->pet_id;
}
/**
* Generated from protobuf field <code>string pet_id = 1 [json_name = "petId"];</code>
* @param string $var
* @return $this
*/
public function setPetId($var)
{
GPBUtil::checkString($var, True);
$this->pet_id = $var;
return $this;
}
/**
* Generated from protobuf field <code>.payment.v1.Order order = 2 [json_name = "order"];</code>
* @return \Payment\V1\Order|null
*/
public function getOrder()
{
return $this->order;
}
public function hasOrder()
{
return isset($this->order);
}
public function clearOrder()
{
unset($this->order);
}
/**
* Generated from protobuf field <code>.payment.v1.Order order = 2 [json_name = "order"];</code>
* @param \Payment\V1\Order $var
* @return $this
*/
public function setOrder($var)
{
GPBUtil::checkMessage($var, \Payment\V1\Order::class);
$this->order = $var;
return $this;
}
}

View File

@@ -0,0 +1,31 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pet/v1/pet.proto
namespace Pet\V1;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>pet.v1.PurchasePetResponse</code>
*/
class PurchasePetResponse extends \Google\Protobuf\Internal\Message
{
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* }
*/
public function __construct($data = NULL) {
\Pet\V1\GPBMetadata\Pet::initOnce();
parent::__construct($data);
}
}

View File

@@ -0,0 +1,85 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pet/v1/pet.proto
namespace Pet\V1;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>pet.v1.PutPetRequest</code>
*/
class PutPetRequest extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>.pet.v1.PetType pet_type = 1 [json_name = "petType"];</code>
*/
protected $pet_type = 0;
/**
* Generated from protobuf field <code>string name = 2 [json_name = "name"];</code>
*/
protected $name = '';
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type int $pet_type
* @type string $name
* }
*/
public function __construct($data = NULL) {
\Pet\V1\GPBMetadata\Pet::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>.pet.v1.PetType pet_type = 1 [json_name = "petType"];</code>
* @return int
*/
public function getPetType()
{
return $this->pet_type;
}
/**
* Generated from protobuf field <code>.pet.v1.PetType pet_type = 1 [json_name = "petType"];</code>
* @param int $var
* @return $this
*/
public function setPetType($var)
{
GPBUtil::checkEnum($var, \Pet\V1\PetType::class);
$this->pet_type = $var;
return $this;
}
/**
* Generated from protobuf field <code>string name = 2 [json_name = "name"];</code>
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Generated from protobuf field <code>string name = 2 [json_name = "name"];</code>
* @param string $var
* @return $this
*/
public function setName($var)
{
GPBUtil::checkString($var, True);
$this->name = $var;
return $this;
}
}

View File

@@ -0,0 +1,68 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pet/v1/pet.proto
namespace Pet\V1;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>pet.v1.PutPetResponse</code>
*/
class PutPetResponse extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>.pet.v1.Pet pet = 1 [json_name = "pet"];</code>
*/
protected $pet = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type \Pet\V1\Pet $pet
* }
*/
public function __construct($data = NULL) {
\Pet\V1\GPBMetadata\Pet::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>.pet.v1.Pet pet = 1 [json_name = "pet"];</code>
* @return \Pet\V1\Pet|null
*/
public function getPet()
{
return $this->pet;
}
public function hasPet()
{
return isset($this->pet);
}
public function clearPet()
{
unset($this->pet);
}
/**
* Generated from protobuf field <code>.pet.v1.Pet pet = 1 [json_name = "pet"];</code>
* @param \Pet\V1\Pet $var
* @return $this
*/
public function setPet($var)
{
GPBUtil::checkMessage($var, \Pet\V1\Pet::class);
$this->pet = $var;
return $this;
}
}

View File

@@ -0,0 +1,114 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: printer/v1/pdf_invoice.proto
namespace Printer\V1\Invoice;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* PDF Response
*
* Generated from protobuf message <code>printer.v1.invoice.DocumentResponse</code>
*/
class DocumentResponse extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>bytes document = 1 [json_name = "document"];</code>
*/
protected $document = '';
/**
* Generated from protobuf field <code>string signature = 2 [json_name = "signature"];</code>
*/
protected $signature = '';
/**
* Generated from protobuf field <code>string sha512 = 3 [json_name = "sha512"];</code>
*/
protected $sha512 = '';
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $document
* @type string $signature
* @type string $sha512
* }
*/
public function __construct($data = NULL) {
\Printer\V1\Invoice\GPBMetadata\PdfInvoice::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>bytes document = 1 [json_name = "document"];</code>
* @return string
*/
public function getDocument()
{
return $this->document;
}
/**
* Generated from protobuf field <code>bytes document = 1 [json_name = "document"];</code>
* @param string $var
* @return $this
*/
public function setDocument($var)
{
GPBUtil::checkString($var, False);
$this->document = $var;
return $this;
}
/**
* Generated from protobuf field <code>string signature = 2 [json_name = "signature"];</code>
* @return string
*/
public function getSignature()
{
return $this->signature;
}
/**
* Generated from protobuf field <code>string signature = 2 [json_name = "signature"];</code>
* @param string $var
* @return $this
*/
public function setSignature($var)
{
GPBUtil::checkString($var, True);
$this->signature = $var;
return $this;
}
/**
* Generated from protobuf field <code>string sha512 = 3 [json_name = "sha512"];</code>
* @return string
*/
public function getSha512()
{
return $this->sha512;
}
/**
* Generated from protobuf field <code>string sha512 = 3 [json_name = "sha512"];</code>
* @param string $var
* @return $this
*/
public function setSha512($var)
{
GPBUtil::checkString($var, True);
$this->sha512 = $var;
return $this;
}
}

View File

@@ -0,0 +1,144 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: printer/v1/pdf_invoice.proto
namespace Printer\V1\Invoice;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Invoice
*
* Generated from protobuf message <code>printer.v1.invoice.Invoice</code>
*/
class Invoice extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>.printer.v1.invoice.OrderInfo order = 1 [json_name = "order"];</code>
*/
protected $order = null;
/**
* Generated from protobuf field <code>.printer.v1.invoice.OfferInfo offer = 2 [json_name = "offer"];</code>
*/
protected $offer = null;
/**
* Generated from protobuf field <code>.printer.v1.invoice.InvoiceInfo info = 3 [json_name = "info"];</code>
*/
protected $info = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type \Printer\V1\Invoice\OrderInfo $order
* @type \Printer\V1\Invoice\OfferInfo $offer
* @type \Printer\V1\Invoice\InvoiceInfo $info
* }
*/
public function __construct($data = NULL) {
\Printer\V1\Invoice\GPBMetadata\PdfInvoice::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>.printer.v1.invoice.OrderInfo order = 1 [json_name = "order"];</code>
* @return \Printer\V1\Invoice\OrderInfo|null
*/
public function getOrder()
{
return $this->order;
}
public function hasOrder()
{
return isset($this->order);
}
public function clearOrder()
{
unset($this->order);
}
/**
* Generated from protobuf field <code>.printer.v1.invoice.OrderInfo order = 1 [json_name = "order"];</code>
* @param \Printer\V1\Invoice\OrderInfo $var
* @return $this
*/
public function setOrder($var)
{
GPBUtil::checkMessage($var, \Printer\V1\Invoice\OrderInfo::class);
$this->order = $var;
return $this;
}
/**
* Generated from protobuf field <code>.printer.v1.invoice.OfferInfo offer = 2 [json_name = "offer"];</code>
* @return \Printer\V1\Invoice\OfferInfo|null
*/
public function getOffer()
{
return $this->offer;
}
public function hasOffer()
{
return isset($this->offer);
}
public function clearOffer()
{
unset($this->offer);
}
/**
* Generated from protobuf field <code>.printer.v1.invoice.OfferInfo offer = 2 [json_name = "offer"];</code>
* @param \Printer\V1\Invoice\OfferInfo $var
* @return $this
*/
public function setOffer($var)
{
GPBUtil::checkMessage($var, \Printer\V1\Invoice\OfferInfo::class);
$this->offer = $var;
return $this;
}
/**
* Generated from protobuf field <code>.printer.v1.invoice.InvoiceInfo info = 3 [json_name = "info"];</code>
* @return \Printer\V1\Invoice\InvoiceInfo|null
*/
public function getInfo()
{
return $this->info;
}
public function hasInfo()
{
return isset($this->info);
}
public function clearInfo()
{
unset($this->info);
}
/**
* Generated from protobuf field <code>.printer.v1.invoice.InvoiceInfo info = 3 [json_name = "info"];</code>
* @param \Printer\V1\Invoice\InvoiceInfo $var
* @return $this
*/
public function setInfo($var)
{
GPBUtil::checkMessage($var, \Printer\V1\Invoice\InvoiceInfo::class);
$this->info = $var;
return $this;
}
}

View File

@@ -0,0 +1,159 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: printer/v1/pdf_invoice.proto
namespace Printer\V1\Invoice;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>printer.v1.invoice.InvoiceInfo</code>
*/
class InvoiceInfo extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>string invoice_id = 1 [json_name = "invoiceId"];</code>
*/
protected $invoice_id = '';
/**
* Generated from protobuf field <code>.google.type.DateTime invoice_date = 2 [json_name = "invoiceDate"];</code>
*/
protected $invoice_date = null;
/**
* Generated from protobuf field <code>.google.type.DateTime invoice_due_date = 3 [json_name = "invoiceDueDate"];</code>
*/
protected $invoice_due_date = null;
/**
* Generated from protobuf field <code>.printer.v1.invoice.InvoiceType invoice_type = 4 [json_name = "invoiceType"];</code>
*/
protected $invoice_type = 0;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $invoice_id
* @type \Google\Type\DateTime $invoice_date
* @type \Google\Type\DateTime $invoice_due_date
* @type int $invoice_type
* }
*/
public function __construct($data = NULL) {
\Printer\V1\Invoice\GPBMetadata\PdfInvoice::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>string invoice_id = 1 [json_name = "invoiceId"];</code>
* @return string
*/
public function getInvoiceId()
{
return $this->invoice_id;
}
/**
* Generated from protobuf field <code>string invoice_id = 1 [json_name = "invoiceId"];</code>
* @param string $var
* @return $this
*/
public function setInvoiceId($var)
{
GPBUtil::checkString($var, True);
$this->invoice_id = $var;
return $this;
}
/**
* Generated from protobuf field <code>.google.type.DateTime invoice_date = 2 [json_name = "invoiceDate"];</code>
* @return \Google\Type\DateTime|null
*/
public function getInvoiceDate()
{
return $this->invoice_date;
}
public function hasInvoiceDate()
{
return isset($this->invoice_date);
}
public function clearInvoiceDate()
{
unset($this->invoice_date);
}
/**
* Generated from protobuf field <code>.google.type.DateTime invoice_date = 2 [json_name = "invoiceDate"];</code>
* @param \Google\Type\DateTime $var
* @return $this
*/
public function setInvoiceDate($var)
{
GPBUtil::checkMessage($var, \Google\Type\DateTime::class);
$this->invoice_date = $var;
return $this;
}
/**
* Generated from protobuf field <code>.google.type.DateTime invoice_due_date = 3 [json_name = "invoiceDueDate"];</code>
* @return \Google\Type\DateTime|null
*/
public function getInvoiceDueDate()
{
return $this->invoice_due_date;
}
public function hasInvoiceDueDate()
{
return isset($this->invoice_due_date);
}
public function clearInvoiceDueDate()
{
unset($this->invoice_due_date);
}
/**
* Generated from protobuf field <code>.google.type.DateTime invoice_due_date = 3 [json_name = "invoiceDueDate"];</code>
* @param \Google\Type\DateTime $var
* @return $this
*/
public function setInvoiceDueDate($var)
{
GPBUtil::checkMessage($var, \Google\Type\DateTime::class);
$this->invoice_due_date = $var;
return $this;
}
/**
* Generated from protobuf field <code>.printer.v1.invoice.InvoiceType invoice_type = 4 [json_name = "invoiceType"];</code>
* @return int
*/
public function getInvoiceType()
{
return $this->invoice_type;
}
/**
* Generated from protobuf field <code>.printer.v1.invoice.InvoiceType invoice_type = 4 [json_name = "invoiceType"];</code>
* @param int $var
* @return $this
*/
public function setInvoiceType($var)
{
GPBUtil::checkEnum($var, \Printer\V1\Invoice\InvoiceType::class);
$this->invoice_type = $var;
return $this;
}
}

View File

@@ -0,0 +1,56 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: printer/v1/pdf_invoice.proto
namespace Printer\V1\Invoice;
use UnexpectedValueException;
/**
* PaymentProvider represents the supported set
* of payment providers.
*
* Protobuf type <code>printer.v1.invoice.InvoiceType</code>
*/
class InvoiceType
{
/**
* Generated from protobuf enum <code>INVOICE_TYPE_UNSPECIFIED = 0;</code>
*/
const INVOICE_TYPE_UNSPECIFIED = 0;
/**
* Generated from protobuf enum <code>INVOICE_TYPE_PAID = 1;</code>
*/
const INVOICE_TYPE_PAID = 1;
/**
* Generated from protobuf enum <code>INVOICE_TYPE_OPEN = 2;</code>
*/
const INVOICE_TYPE_OPEN = 2;
private static $valueToName = [
self::INVOICE_TYPE_UNSPECIFIED => 'INVOICE_TYPE_UNSPECIFIED',
self::INVOICE_TYPE_PAID => 'INVOICE_TYPE_PAID',
self::INVOICE_TYPE_OPEN => 'INVOICE_TYPE_OPEN',
];
public static function name($value)
{
if (!isset(self::$valueToName[$value])) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no name defined for value %s', __CLASS__, $value));
}
return self::$valueToName[$value];
}
public static function value($name)
{
$const = __CLASS__ . '::' . strtoupper($name);
if (!defined($const)) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no value defined for name %s', __CLASS__, $name));
}
return constant($const);
}
}

View File

@@ -0,0 +1,132 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: printer/v1/pdf_invoice.proto
namespace Printer\V1\Invoice;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>printer.v1.invoice.OfferInfo</code>
*/
class OfferInfo extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>string offer_id = 1 [json_name = "offerId"];</code>
*/
protected $offer_id = '';
/**
* Generated from protobuf field <code>.google.type.DateTime offer_date = 2 [json_name = "offerDate"];</code>
*/
protected $offer_date = null;
/**
* Generated from protobuf field <code>.google.type.DateTime offer_due_date = 3 [json_name = "offerDueDate"];</code>
*/
protected $offer_due_date = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $offer_id
* @type \Google\Type\DateTime $offer_date
* @type \Google\Type\DateTime $offer_due_date
* }
*/
public function __construct($data = NULL) {
\Printer\V1\Invoice\GPBMetadata\PdfInvoice::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>string offer_id = 1 [json_name = "offerId"];</code>
* @return string
*/
public function getOfferId()
{
return $this->offer_id;
}
/**
* Generated from protobuf field <code>string offer_id = 1 [json_name = "offerId"];</code>
* @param string $var
* @return $this
*/
public function setOfferId($var)
{
GPBUtil::checkString($var, True);
$this->offer_id = $var;
return $this;
}
/**
* Generated from protobuf field <code>.google.type.DateTime offer_date = 2 [json_name = "offerDate"];</code>
* @return \Google\Type\DateTime|null
*/
public function getOfferDate()
{
return $this->offer_date;
}
public function hasOfferDate()
{
return isset($this->offer_date);
}
public function clearOfferDate()
{
unset($this->offer_date);
}
/**
* Generated from protobuf field <code>.google.type.DateTime offer_date = 2 [json_name = "offerDate"];</code>
* @param \Google\Type\DateTime $var
* @return $this
*/
public function setOfferDate($var)
{
GPBUtil::checkMessage($var, \Google\Type\DateTime::class);
$this->offer_date = $var;
return $this;
}
/**
* Generated from protobuf field <code>.google.type.DateTime offer_due_date = 3 [json_name = "offerDueDate"];</code>
* @return \Google\Type\DateTime|null
*/
public function getOfferDueDate()
{
return $this->offer_due_date;
}
public function hasOfferDueDate()
{
return isset($this->offer_due_date);
}
public function clearOfferDueDate()
{
unset($this->offer_due_date);
}
/**
* Generated from protobuf field <code>.google.type.DateTime offer_due_date = 3 [json_name = "offerDueDate"];</code>
* @param \Google\Type\DateTime $var
* @return $this
*/
public function setOfferDueDate($var)
{
GPBUtil::checkMessage($var, \Google\Type\DateTime::class);
$this->offer_due_date = $var;
return $this;
}
}

View File

@@ -0,0 +1,250 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: printer/v1/pdf_invoice.proto
namespace Printer\V1\Invoice;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>printer.v1.invoice.OrderInfo</code>
*/
class OrderInfo extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>string order_id = 1 [json_name = "orderId"];</code>
*/
protected $order_id = '';
/**
* Generated from protobuf field <code>.google.type.DateTime order_date = 2 [json_name = "orderDate"];</code>
*/
protected $order_date = null;
/**
* Generated from protobuf field <code>.google.type.DateTime order_due_date = 3 [json_name = "orderDueDate"];</code>
*/
protected $order_due_date = null;
/**
* Generated from protobuf field <code>.printer.v1.invoice.OrderType order_type = 4 [json_name = "orderType"];</code>
*/
protected $order_type = 0;
/**
* Generated from protobuf field <code>repeated .printer.v1.invoice.OrderItem order_items = 5 [json_name = "orderItems"];</code>
*/
private $order_items;
/**
* Generated from protobuf field <code>repeated .printer.v1.invoice.OrderVatItem order_vat_items = 6 [json_name = "orderVatItems"];</code>
*/
private $order_vat_items;
/**
* Generated from protobuf field <code>optional double deposit = 7 [json_name = "deposit"];</code>
*/
protected $deposit = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $order_id
* @type \Google\Type\DateTime $order_date
* @type \Google\Type\DateTime $order_due_date
* @type int $order_type
* @type \Printer\V1\Invoice\OrderItem[]|\Google\Protobuf\Internal\RepeatedField $order_items
* @type \Printer\V1\Invoice\OrderVatItem[]|\Google\Protobuf\Internal\RepeatedField $order_vat_items
* @type float $deposit
* }
*/
public function __construct($data = NULL) {
\Printer\V1\Invoice\GPBMetadata\PdfInvoice::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>string order_id = 1 [json_name = "orderId"];</code>
* @return string
*/
public function getOrderId()
{
return $this->order_id;
}
/**
* Generated from protobuf field <code>string order_id = 1 [json_name = "orderId"];</code>
* @param string $var
* @return $this
*/
public function setOrderId($var)
{
GPBUtil::checkString($var, True);
$this->order_id = $var;
return $this;
}
/**
* Generated from protobuf field <code>.google.type.DateTime order_date = 2 [json_name = "orderDate"];</code>
* @return \Google\Type\DateTime|null
*/
public function getOrderDate()
{
return $this->order_date;
}
public function hasOrderDate()
{
return isset($this->order_date);
}
public function clearOrderDate()
{
unset($this->order_date);
}
/**
* Generated from protobuf field <code>.google.type.DateTime order_date = 2 [json_name = "orderDate"];</code>
* @param \Google\Type\DateTime $var
* @return $this
*/
public function setOrderDate($var)
{
GPBUtil::checkMessage($var, \Google\Type\DateTime::class);
$this->order_date = $var;
return $this;
}
/**
* Generated from protobuf field <code>.google.type.DateTime order_due_date = 3 [json_name = "orderDueDate"];</code>
* @return \Google\Type\DateTime|null
*/
public function getOrderDueDate()
{
return $this->order_due_date;
}
public function hasOrderDueDate()
{
return isset($this->order_due_date);
}
public function clearOrderDueDate()
{
unset($this->order_due_date);
}
/**
* Generated from protobuf field <code>.google.type.DateTime order_due_date = 3 [json_name = "orderDueDate"];</code>
* @param \Google\Type\DateTime $var
* @return $this
*/
public function setOrderDueDate($var)
{
GPBUtil::checkMessage($var, \Google\Type\DateTime::class);
$this->order_due_date = $var;
return $this;
}
/**
* Generated from protobuf field <code>.printer.v1.invoice.OrderType order_type = 4 [json_name = "orderType"];</code>
* @return int
*/
public function getOrderType()
{
return $this->order_type;
}
/**
* Generated from protobuf field <code>.printer.v1.invoice.OrderType order_type = 4 [json_name = "orderType"];</code>
* @param int $var
* @return $this
*/
public function setOrderType($var)
{
GPBUtil::checkEnum($var, \Printer\V1\Invoice\OrderType::class);
$this->order_type = $var;
return $this;
}
/**
* Generated from protobuf field <code>repeated .printer.v1.invoice.OrderItem order_items = 5 [json_name = "orderItems"];</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getOrderItems()
{
return $this->order_items;
}
/**
* Generated from protobuf field <code>repeated .printer.v1.invoice.OrderItem order_items = 5 [json_name = "orderItems"];</code>
* @param \Printer\V1\Invoice\OrderItem[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setOrderItems($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Printer\V1\Invoice\OrderItem::class);
$this->order_items = $arr;
return $this;
}
/**
* Generated from protobuf field <code>repeated .printer.v1.invoice.OrderVatItem order_vat_items = 6 [json_name = "orderVatItems"];</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getOrderVatItems()
{
return $this->order_vat_items;
}
/**
* Generated from protobuf field <code>repeated .printer.v1.invoice.OrderVatItem order_vat_items = 6 [json_name = "orderVatItems"];</code>
* @param \Printer\V1\Invoice\OrderVatItem[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setOrderVatItems($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Printer\V1\Invoice\OrderVatItem::class);
$this->order_vat_items = $arr;
return $this;
}
/**
* Generated from protobuf field <code>optional double deposit = 7 [json_name = "deposit"];</code>
* @return float
*/
public function getDeposit()
{
return isset($this->deposit) ? $this->deposit : 0.0;
}
public function hasDeposit()
{
return isset($this->deposit);
}
public function clearDeposit()
{
unset($this->deposit);
}
/**
* Generated from protobuf field <code>optional double deposit = 7 [json_name = "deposit"];</code>
* @param float $var
* @return $this
*/
public function setDeposit($var)
{
GPBUtil::checkDouble($var);
$this->deposit = $var;
return $this;
}
}

View File

@@ -0,0 +1,193 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: printer/v1/pdf_invoice.proto
namespace Printer\V1\Invoice;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>printer.v1.invoice.OrderItem</code>
*/
class OrderItem extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>string description = 1 [json_name = "description"];</code>
*/
protected $description = '';
/**
* Generated from protobuf field <code>double vat = 2 [json_name = "vat"];</code>
*/
protected $vat = 0.0;
/**
* Generated from protobuf field <code>uint64 count = 3 [json_name = "count"];</code>
*/
protected $count = 0;
/**
* Generated from protobuf field <code>double price_single = 4 [json_name = "priceSingle"];</code>
*/
protected $price_single = 0.0;
/**
* Generated from protobuf field <code>double price_sum = 5 [json_name = "priceSum"];</code>
*/
protected $price_sum = 0.0;
/**
* Generated from protobuf field <code>bool price_net = 6 [json_name = "priceNet"];</code>
*/
protected $price_net = false;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $description
* @type float $vat
* @type int|string $count
* @type float $price_single
* @type float $price_sum
* @type bool $price_net
* }
*/
public function __construct($data = NULL) {
\Printer\V1\Invoice\GPBMetadata\PdfInvoice::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>string description = 1 [json_name = "description"];</code>
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* Generated from protobuf field <code>string description = 1 [json_name = "description"];</code>
* @param string $var
* @return $this
*/
public function setDescription($var)
{
GPBUtil::checkString($var, True);
$this->description = $var;
return $this;
}
/**
* Generated from protobuf field <code>double vat = 2 [json_name = "vat"];</code>
* @return float
*/
public function getVat()
{
return $this->vat;
}
/**
* Generated from protobuf field <code>double vat = 2 [json_name = "vat"];</code>
* @param float $var
* @return $this
*/
public function setVat($var)
{
GPBUtil::checkDouble($var);
$this->vat = $var;
return $this;
}
/**
* Generated from protobuf field <code>uint64 count = 3 [json_name = "count"];</code>
* @return int|string
*/
public function getCount()
{
return $this->count;
}
/**
* Generated from protobuf field <code>uint64 count = 3 [json_name = "count"];</code>
* @param int|string $var
* @return $this
*/
public function setCount($var)
{
GPBUtil::checkUint64($var);
$this->count = $var;
return $this;
}
/**
* Generated from protobuf field <code>double price_single = 4 [json_name = "priceSingle"];</code>
* @return float
*/
public function getPriceSingle()
{
return $this->price_single;
}
/**
* Generated from protobuf field <code>double price_single = 4 [json_name = "priceSingle"];</code>
* @param float $var
* @return $this
*/
public function setPriceSingle($var)
{
GPBUtil::checkDouble($var);
$this->price_single = $var;
return $this;
}
/**
* Generated from protobuf field <code>double price_sum = 5 [json_name = "priceSum"];</code>
* @return float
*/
public function getPriceSum()
{
return $this->price_sum;
}
/**
* Generated from protobuf field <code>double price_sum = 5 [json_name = "priceSum"];</code>
* @param float $var
* @return $this
*/
public function setPriceSum($var)
{
GPBUtil::checkDouble($var);
$this->price_sum = $var;
return $this;
}
/**
* Generated from protobuf field <code>bool price_net = 6 [json_name = "priceNet"];</code>
* @return bool
*/
public function getPriceNet()
{
return $this->price_net;
}
/**
* Generated from protobuf field <code>bool price_net = 6 [json_name = "priceNet"];</code>
* @param bool $var
* @return $this
*/
public function setPriceNet($var)
{
GPBUtil::checkBool($var);
$this->price_net = $var;
return $this;
}
}

View File

@@ -0,0 +1,58 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: printer/v1/pdf_invoice.proto
namespace Printer\V1\Invoice;
use UnexpectedValueException;
/**
* Protobuf type <code>printer.v1.invoice.OrderType</code>
*/
class OrderType
{
/**
* Generated from protobuf enum <code>ORDER_TYPE_UNSPECIFIED = 0;</code>
*/
const ORDER_TYPE_UNSPECIFIED = 0;
/**
* Generated from protobuf enum <code>ORDER_TYPE_PHONE = 1;</code>
*/
const ORDER_TYPE_PHONE = 1;
/**
* Generated from protobuf enum <code>ORDER_TYPE_WWW = 2;</code>
*/
const ORDER_TYPE_WWW = 2;
/**
* Generated from protobuf enum <code>ORDER_TYPE_EMAIL = 3;</code>
*/
const ORDER_TYPE_EMAIL = 3;
private static $valueToName = [
self::ORDER_TYPE_UNSPECIFIED => 'ORDER_TYPE_UNSPECIFIED',
self::ORDER_TYPE_PHONE => 'ORDER_TYPE_PHONE',
self::ORDER_TYPE_WWW => 'ORDER_TYPE_WWW',
self::ORDER_TYPE_EMAIL => 'ORDER_TYPE_EMAIL',
];
public static function name($value)
{
if (!isset(self::$valueToName[$value])) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no name defined for value %s', __CLASS__, $value));
}
return self::$valueToName[$value];
}
public static function value($name)
{
$const = __CLASS__ . '::' . strtoupper($name);
if (!defined($const)) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no value defined for name %s', __CLASS__, $name));
}
return constant($const);
}
}

View File

@@ -0,0 +1,139 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: printer/v1/pdf_invoice.proto
namespace Printer\V1\Invoice;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>printer.v1.invoice.OrderVatItem</code>
*/
class OrderVatItem extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>string description = 1 [json_name = "description"];</code>
*/
protected $description = '';
/**
* Generated from protobuf field <code>double vat = 2 [json_name = "vat"];</code>
*/
protected $vat = 0.0;
/**
* Generated from protobuf field <code>double vat_money_sum = 3 [json_name = "vatMoneySum"];</code>
*/
protected $vat_money_sum = 0.0;
/**
* Generated from protobuf field <code>uint64 items_count = 4 [json_name = "itemsCount"];</code>
*/
protected $items_count = 0;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $description
* @type float $vat
* @type float $vat_money_sum
* @type int|string $items_count
* }
*/
public function __construct($data = NULL) {
\Printer\V1\Invoice\GPBMetadata\PdfInvoice::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>string description = 1 [json_name = "description"];</code>
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* Generated from protobuf field <code>string description = 1 [json_name = "description"];</code>
* @param string $var
* @return $this
*/
public function setDescription($var)
{
GPBUtil::checkString($var, True);
$this->description = $var;
return $this;
}
/**
* Generated from protobuf field <code>double vat = 2 [json_name = "vat"];</code>
* @return float
*/
public function getVat()
{
return $this->vat;
}
/**
* Generated from protobuf field <code>double vat = 2 [json_name = "vat"];</code>
* @param float $var
* @return $this
*/
public function setVat($var)
{
GPBUtil::checkDouble($var);
$this->vat = $var;
return $this;
}
/**
* Generated from protobuf field <code>double vat_money_sum = 3 [json_name = "vatMoneySum"];</code>
* @return float
*/
public function getVatMoneySum()
{
return $this->vat_money_sum;
}
/**
* Generated from protobuf field <code>double vat_money_sum = 3 [json_name = "vatMoneySum"];</code>
* @param float $var
* @return $this
*/
public function setVatMoneySum($var)
{
GPBUtil::checkDouble($var);
$this->vat_money_sum = $var;
return $this;
}
/**
* Generated from protobuf field <code>uint64 items_count = 4 [json_name = "itemsCount"];</code>
* @return int|string
*/
public function getItemsCount()
{
return $this->items_count;
}
/**
* Generated from protobuf field <code>uint64 items_count = 4 [json_name = "itemsCount"];</code>
* @param int|string $var
* @return $this
*/
public function setItemsCount($var)
{
GPBUtil::checkUint64($var);
$this->items_count = $var;
return $this;
}
}

Binary file not shown.

View File

@@ -0,0 +1,313 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: shop/v1/shop.proto
namespace Shop\V1;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Order represents a monetary order.
*
* Generated from protobuf message <code>shop.v1.Shop</code>
*/
class Shop extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>optional string shop_id = 1 [json_name = "shopId"];</code>
*/
protected $shop_id = null;
/**
* Generated from protobuf field <code>string shop_name = 2 [json_name = "shopName"];</code>
*/
protected $shop_name = '';
/**
* Generated from protobuf field <code>.shop.v1.ShopType shop_type = 3 [json_name = "shopType"];</code>
*/
protected $shop_type = 0;
/**
* Generated from protobuf field <code>string shop_url_www = 4 [json_name = "shopUrlWww"];</code>
*/
protected $shop_url_www = '';
/**
* Generated from protobuf field <code>string shop_url_logo = 5 [json_name = "shopUrlLogo"];</code>
*/
protected $shop_url_logo = '';
/**
* Generated from protobuf field <code>string shop_url_api = 6 [json_name = "shopUrlApi"];</code>
*/
protected $shop_url_api = '';
/**
* Generated from protobuf field <code>string shop_currency = 7 [json_name = "shopCurrency"];</code>
*/
protected $shop_currency = '';
/**
* Generated from protobuf field <code>string shop_prefix_order = 8 [json_name = "shopPrefixOrder"];</code>
*/
protected $shop_prefix_order = '';
/**
* Generated from protobuf field <code>string shop_prefix_invoice = 9 [json_name = "shopPrefixInvoice"];</code>
*/
protected $shop_prefix_invoice = '';
/**
* Generated from protobuf field <code>string shop_prefix_offer = 10 [json_name = "shopPrefixOffer"];</code>
*/
protected $shop_prefix_offer = '';
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $shop_id
* @type string $shop_name
* @type int $shop_type
* @type string $shop_url_www
* @type string $shop_url_logo
* @type string $shop_url_api
* @type string $shop_currency
* @type string $shop_prefix_order
* @type string $shop_prefix_invoice
* @type string $shop_prefix_offer
* }
*/
public function __construct($data = NULL) {
\Shop\V1\GPBMetadata\Shop::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>optional string shop_id = 1 [json_name = "shopId"];</code>
* @return string
*/
public function getShopId()
{
return isset($this->shop_id) ? $this->shop_id : '';
}
public function hasShopId()
{
return isset($this->shop_id);
}
public function clearShopId()
{
unset($this->shop_id);
}
/**
* Generated from protobuf field <code>optional string shop_id = 1 [json_name = "shopId"];</code>
* @param string $var
* @return $this
*/
public function setShopId($var)
{
GPBUtil::checkString($var, True);
$this->shop_id = $var;
return $this;
}
/**
* Generated from protobuf field <code>string shop_name = 2 [json_name = "shopName"];</code>
* @return string
*/
public function getShopName()
{
return $this->shop_name;
}
/**
* Generated from protobuf field <code>string shop_name = 2 [json_name = "shopName"];</code>
* @param string $var
* @return $this
*/
public function setShopName($var)
{
GPBUtil::checkString($var, True);
$this->shop_name = $var;
return $this;
}
/**
* Generated from protobuf field <code>.shop.v1.ShopType shop_type = 3 [json_name = "shopType"];</code>
* @return int
*/
public function getShopType()
{
return $this->shop_type;
}
/**
* Generated from protobuf field <code>.shop.v1.ShopType shop_type = 3 [json_name = "shopType"];</code>
* @param int $var
* @return $this
*/
public function setShopType($var)
{
GPBUtil::checkEnum($var, \Shop\V1\ShopType::class);
$this->shop_type = $var;
return $this;
}
/**
* Generated from protobuf field <code>string shop_url_www = 4 [json_name = "shopUrlWww"];</code>
* @return string
*/
public function getShopUrlWww()
{
return $this->shop_url_www;
}
/**
* Generated from protobuf field <code>string shop_url_www = 4 [json_name = "shopUrlWww"];</code>
* @param string $var
* @return $this
*/
public function setShopUrlWww($var)
{
GPBUtil::checkString($var, True);
$this->shop_url_www = $var;
return $this;
}
/**
* Generated from protobuf field <code>string shop_url_logo = 5 [json_name = "shopUrlLogo"];</code>
* @return string
*/
public function getShopUrlLogo()
{
return $this->shop_url_logo;
}
/**
* Generated from protobuf field <code>string shop_url_logo = 5 [json_name = "shopUrlLogo"];</code>
* @param string $var
* @return $this
*/
public function setShopUrlLogo($var)
{
GPBUtil::checkString($var, True);
$this->shop_url_logo = $var;
return $this;
}
/**
* Generated from protobuf field <code>string shop_url_api = 6 [json_name = "shopUrlApi"];</code>
* @return string
*/
public function getShopUrlApi()
{
return $this->shop_url_api;
}
/**
* Generated from protobuf field <code>string shop_url_api = 6 [json_name = "shopUrlApi"];</code>
* @param string $var
* @return $this
*/
public function setShopUrlApi($var)
{
GPBUtil::checkString($var, True);
$this->shop_url_api = $var;
return $this;
}
/**
* Generated from protobuf field <code>string shop_currency = 7 [json_name = "shopCurrency"];</code>
* @return string
*/
public function getShopCurrency()
{
return $this->shop_currency;
}
/**
* Generated from protobuf field <code>string shop_currency = 7 [json_name = "shopCurrency"];</code>
* @param string $var
* @return $this
*/
public function setShopCurrency($var)
{
GPBUtil::checkString($var, True);
$this->shop_currency = $var;
return $this;
}
/**
* Generated from protobuf field <code>string shop_prefix_order = 8 [json_name = "shopPrefixOrder"];</code>
* @return string
*/
public function getShopPrefixOrder()
{
return $this->shop_prefix_order;
}
/**
* Generated from protobuf field <code>string shop_prefix_order = 8 [json_name = "shopPrefixOrder"];</code>
* @param string $var
* @return $this
*/
public function setShopPrefixOrder($var)
{
GPBUtil::checkString($var, True);
$this->shop_prefix_order = $var;
return $this;
}
/**
* Generated from protobuf field <code>string shop_prefix_invoice = 9 [json_name = "shopPrefixInvoice"];</code>
* @return string
*/
public function getShopPrefixInvoice()
{
return $this->shop_prefix_invoice;
}
/**
* Generated from protobuf field <code>string shop_prefix_invoice = 9 [json_name = "shopPrefixInvoice"];</code>
* @param string $var
* @return $this
*/
public function setShopPrefixInvoice($var)
{
GPBUtil::checkString($var, True);
$this->shop_prefix_invoice = $var;
return $this;
}
/**
* Generated from protobuf field <code>string shop_prefix_offer = 10 [json_name = "shopPrefixOffer"];</code>
* @return string
*/
public function getShopPrefixOffer()
{
return $this->shop_prefix_offer;
}
/**
* Generated from protobuf field <code>string shop_prefix_offer = 10 [json_name = "shopPrefixOffer"];</code>
* @param string $var
* @return $this
*/
public function setShopPrefixOffer($var)
{
GPBUtil::checkString($var, True);
$this->shop_prefix_offer = $var;
return $this;
}
}

View File

@@ -0,0 +1,56 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: shop/v1/shop.proto
namespace Shop\V1;
use UnexpectedValueException;
/**
* PaymentProvider represents the supported set
* of payment providers.
*
* Protobuf type <code>shop.v1.ShopType</code>
*/
class ShopType
{
/**
* Generated from protobuf enum <code>SHOP_TYPE_UNSPECIFIED = 0;</code>
*/
const SHOP_TYPE_UNSPECIFIED = 0;
/**
* Generated from protobuf enum <code>SHOP_TYPE_DIGITAL = 1;</code>
*/
const SHOP_TYPE_DIGITAL = 1;
/**
* Generated from protobuf enum <code>SHOP_TYPE_RETAIL = 2;</code>
*/
const SHOP_TYPE_RETAIL = 2;
private static $valueToName = [
self::SHOP_TYPE_UNSPECIFIED => 'SHOP_TYPE_UNSPECIFIED',
self::SHOP_TYPE_DIGITAL => 'SHOP_TYPE_DIGITAL',
self::SHOP_TYPE_RETAIL => 'SHOP_TYPE_RETAIL',
];
public static function name($value)
{
if (!isset(self::$valueToName[$value])) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no name defined for value %s', __CLASS__, $value));
}
return self::$valueToName[$value];
}
public static function value($name)
{
$const = __CLASS__ . '::' . strtoupper($name);
if (!defined($const)) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no value defined for name %s', __CLASS__, $name));
}
return constant($const);
}
}

43
gen/web/payment/v1/payment_pb.d.ts vendored Normal file
View File

@@ -0,0 +1,43 @@
import * as jspb from 'google-protobuf'
import * as google_type_money_pb from '../../google/type/money_pb';
export class Order extends jspb.Message {
getOrderId(): string;
setOrderId(value: string): Order;
getRecipientId(): string;
setRecipientId(value: string): Order;
getAmount(): google_type_money_pb.Money | undefined;
setAmount(value?: google_type_money_pb.Money): Order;
hasAmount(): boolean;
clearAmount(): Order;
getPaymentProvider(): PaymentProvider;
setPaymentProvider(value: PaymentProvider): Order;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Order.AsObject;
static toObject(includeInstance: boolean, msg: Order): Order.AsObject;
static serializeBinaryToWriter(message: Order, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Order;
static deserializeBinaryFromReader(message: Order, reader: jspb.BinaryReader): Order;
}
export namespace Order {
export type AsObject = {
orderId: string,
recipientId: string,
amount?: google_type_money_pb.Money.AsObject,
paymentProvider: PaymentProvider,
}
}
export enum PaymentProvider {
PAYMENT_PROVIDER_UNSPECIFIED = 0,
PAYMENT_PROVIDER_STRIPE = 1,
PAYMENT_PROVIDER_PAYPAL = 2,
PAYMENT_PROVIDER_APPLE = 3,
}

View File

@@ -0,0 +1,300 @@
// source: payment/v1/payment.proto
/**
* @fileoverview
* @enhanceable
* @suppress {missingRequire} reports error on implicit type usages.
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck
var jspb = require('google-protobuf');
var goog = jspb;
var global = (function() {
if (this) { return this; }
if (typeof window !== 'undefined') { return window; }
if (typeof global !== 'undefined') { return global; }
if (typeof self !== 'undefined') { return self; }
return Function('return this')();
}.call(null));
var google_type_money_pb = require('../../google/type/money_pb.js');
goog.object.extend(proto, google_type_money_pb);
goog.exportSymbol('proto.payment.v1.Order', null, global);
goog.exportSymbol('proto.payment.v1.PaymentProvider', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.payment.v1.Order = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.payment.v1.Order, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.payment.v1.Order.displayName = 'proto.payment.v1.Order';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.payment.v1.Order.prototype.toObject = function(opt_includeInstance) {
return proto.payment.v1.Order.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.payment.v1.Order} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.payment.v1.Order.toObject = function(includeInstance, msg) {
var f, obj = {
orderId: jspb.Message.getFieldWithDefault(msg, 1, ""),
recipientId: jspb.Message.getFieldWithDefault(msg, 2, ""),
amount: (f = msg.getAmount()) && google_type_money_pb.Money.toObject(includeInstance, f),
paymentProvider: jspb.Message.getFieldWithDefault(msg, 4, 0)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.payment.v1.Order}
*/
proto.payment.v1.Order.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.payment.v1.Order;
return proto.payment.v1.Order.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.payment.v1.Order} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.payment.v1.Order}
*/
proto.payment.v1.Order.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setOrderId(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setRecipientId(value);
break;
case 3:
var value = new google_type_money_pb.Money;
reader.readMessage(value,google_type_money_pb.Money.deserializeBinaryFromReader);
msg.setAmount(value);
break;
case 4:
var value = /** @type {!proto.payment.v1.PaymentProvider} */ (reader.readEnum());
msg.setPaymentProvider(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.payment.v1.Order.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.payment.v1.Order.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.payment.v1.Order} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.payment.v1.Order.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getOrderId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getRecipientId();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getAmount();
if (f != null) {
writer.writeMessage(
3,
f,
google_type_money_pb.Money.serializeBinaryToWriter
);
}
f = message.getPaymentProvider();
if (f !== 0.0) {
writer.writeEnum(
4,
f
);
}
};
/**
* optional string order_id = 1;
* @return {string}
*/
proto.payment.v1.Order.prototype.getOrderId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.payment.v1.Order} returns this
*/
proto.payment.v1.Order.prototype.setOrderId = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string recipient_id = 2;
* @return {string}
*/
proto.payment.v1.Order.prototype.getRecipientId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.payment.v1.Order} returns this
*/
proto.payment.v1.Order.prototype.setRecipientId = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional google.type.Money amount = 3;
* @return {?proto.google.type.Money}
*/
proto.payment.v1.Order.prototype.getAmount = function() {
return /** @type{?proto.google.type.Money} */ (
jspb.Message.getWrapperField(this, google_type_money_pb.Money, 3));
};
/**
* @param {?proto.google.type.Money|undefined} value
* @return {!proto.payment.v1.Order} returns this
*/
proto.payment.v1.Order.prototype.setAmount = function(value) {
return jspb.Message.setWrapperField(this, 3, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.payment.v1.Order} returns this
*/
proto.payment.v1.Order.prototype.clearAmount = function() {
return this.setAmount(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.payment.v1.Order.prototype.hasAmount = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* optional PaymentProvider payment_provider = 4;
* @return {!proto.payment.v1.PaymentProvider}
*/
proto.payment.v1.Order.prototype.getPaymentProvider = function() {
return /** @type {!proto.payment.v1.PaymentProvider} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/**
* @param {!proto.payment.v1.PaymentProvider} value
* @return {!proto.payment.v1.Order} returns this
*/
proto.payment.v1.Order.prototype.setPaymentProvider = function(value) {
return jspb.Message.setProto3EnumField(this, 4, value);
};
/**
* @enum {number}
*/
proto.payment.v1.PaymentProvider = {
PAYMENT_PROVIDER_UNSPECIFIED: 0,
PAYMENT_PROVIDER_STRIPE: 1,
PAYMENT_PROVIDER_PAYPAL: 2,
PAYMENT_PROVIDER_APPLE: 3
};
goog.object.extend(exports, proto.payment.v1);

67
gen/web/pet/v1/pet_grpc_web_pb.d.ts vendored Normal file
View File

@@ -0,0 +1,67 @@
import * as grpcWeb from 'grpc-web';
import * as pet_v1_pet_pb from '../../pet/v1/pet_pb';
export class PetStoreServiceClient {
constructor (hostname: string,
credentials?: null | { [index: string]: string; },
options?: null | { [index: string]: any; });
getPet(
request: pet_v1_pet_pb.GetPetRequest,
metadata: grpcWeb.Metadata | undefined,
callback: (err: grpcWeb.RpcError,
response: pet_v1_pet_pb.GetPetResponse) => void
): grpcWeb.ClientReadableStream<pet_v1_pet_pb.GetPetResponse>;
putPet(
request: pet_v1_pet_pb.PutPetRequest,
metadata: grpcWeb.Metadata | undefined,
callback: (err: grpcWeb.RpcError,
response: pet_v1_pet_pb.PutPetResponse) => void
): grpcWeb.ClientReadableStream<pet_v1_pet_pb.PutPetResponse>;
deletePet(
request: pet_v1_pet_pb.DeletePetRequest,
metadata: grpcWeb.Metadata | undefined,
callback: (err: grpcWeb.RpcError,
response: pet_v1_pet_pb.DeletePetResponse) => void
): grpcWeb.ClientReadableStream<pet_v1_pet_pb.DeletePetResponse>;
purchasePet(
request: pet_v1_pet_pb.PurchasePetRequest,
metadata: grpcWeb.Metadata | undefined,
callback: (err: grpcWeb.RpcError,
response: pet_v1_pet_pb.PurchasePetResponse) => void
): grpcWeb.ClientReadableStream<pet_v1_pet_pb.PurchasePetResponse>;
}
export class PetStoreServicePromiseClient {
constructor (hostname: string,
credentials?: null | { [index: string]: string; },
options?: null | { [index: string]: any; });
getPet(
request: pet_v1_pet_pb.GetPetRequest,
metadata?: grpcWeb.Metadata
): Promise<pet_v1_pet_pb.GetPetResponse>;
putPet(
request: pet_v1_pet_pb.PutPetRequest,
metadata?: grpcWeb.Metadata
): Promise<pet_v1_pet_pb.PutPetResponse>;
deletePet(
request: pet_v1_pet_pb.DeletePetRequest,
metadata?: grpcWeb.Metadata
): Promise<pet_v1_pet_pb.DeletePetResponse>;
purchasePet(
request: pet_v1_pet_pb.PurchasePetRequest,
metadata?: grpcWeb.Metadata
): Promise<pet_v1_pet_pb.PurchasePetResponse>;
}

View File

@@ -0,0 +1,323 @@
/**
* @fileoverview gRPC-Web generated client stub for pet.v1
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck
const grpc = {};
grpc.web = require('grpc-web');
var payment_v1_payment_pb = require('../../payment/v1/payment_pb.js')
var google_type_datetime_pb = require('../../google/type/datetime_pb.js')
const proto = {};
proto.pet = {};
proto.pet.v1 = require('./pet_pb.js');
/**
* @param {string} hostname
* @param {?Object} credentials
* @param {?grpc.web.ClientOptions} options
* @constructor
* @struct
* @final
*/
proto.pet.v1.PetStoreServiceClient =
function(hostname, credentials, options) {
if (!options) options = {};
options.format = 'text';
/**
* @private @const {!grpc.web.GrpcWebClientBase} The client
*/
this.client_ = new grpc.web.GrpcWebClientBase(options);
/**
* @private @const {string} The hostname
*/
this.hostname_ = hostname;
};
/**
* @param {string} hostname
* @param {?Object} credentials
* @param {?grpc.web.ClientOptions} options
* @constructor
* @struct
* @final
*/
proto.pet.v1.PetStoreServicePromiseClient =
function(hostname, credentials, options) {
if (!options) options = {};
options.format = 'text';
/**
* @private @const {!grpc.web.GrpcWebClientBase} The client
*/
this.client_ = new grpc.web.GrpcWebClientBase(options);
/**
* @private @const {string} The hostname
*/
this.hostname_ = hostname;
};
/**
* @const
* @type {!grpc.web.MethodDescriptor<
* !proto.pet.v1.GetPetRequest,
* !proto.pet.v1.GetPetResponse>}
*/
const methodDescriptor_PetStoreService_GetPet = new grpc.web.MethodDescriptor(
'/pet.v1.PetStoreService/GetPet',
grpc.web.MethodType.UNARY,
proto.pet.v1.GetPetRequest,
proto.pet.v1.GetPetResponse,
/**
* @param {!proto.pet.v1.GetPetRequest} request
* @return {!Uint8Array}
*/
function(request) {
return request.serializeBinary();
},
proto.pet.v1.GetPetResponse.deserializeBinary
);
/**
* @param {!proto.pet.v1.GetPetRequest} request The
* request proto
* @param {?Object<string, string>} metadata User defined
* call metadata
* @param {function(?grpc.web.RpcError, ?proto.pet.v1.GetPetResponse)}
* callback The callback function(error, response)
* @return {!grpc.web.ClientReadableStream<!proto.pet.v1.GetPetResponse>|undefined}
* The XHR Node Readable Stream
*/
proto.pet.v1.PetStoreServiceClient.prototype.getPet =
function(request, metadata, callback) {
return this.client_.rpcCall(this.hostname_ +
'/pet.v1.PetStoreService/GetPet',
request,
metadata || {},
methodDescriptor_PetStoreService_GetPet,
callback);
};
/**
* @param {!proto.pet.v1.GetPetRequest} request The
* request proto
* @param {?Object<string, string>=} metadata User defined
* call metadata
* @return {!Promise<!proto.pet.v1.GetPetResponse>}
* Promise that resolves to the response
*/
proto.pet.v1.PetStoreServicePromiseClient.prototype.getPet =
function(request, metadata) {
return this.client_.unaryCall(this.hostname_ +
'/pet.v1.PetStoreService/GetPet',
request,
metadata || {},
methodDescriptor_PetStoreService_GetPet);
};
/**
* @const
* @type {!grpc.web.MethodDescriptor<
* !proto.pet.v1.PutPetRequest,
* !proto.pet.v1.PutPetResponse>}
*/
const methodDescriptor_PetStoreService_PutPet = new grpc.web.MethodDescriptor(
'/pet.v1.PetStoreService/PutPet',
grpc.web.MethodType.UNARY,
proto.pet.v1.PutPetRequest,
proto.pet.v1.PutPetResponse,
/**
* @param {!proto.pet.v1.PutPetRequest} request
* @return {!Uint8Array}
*/
function(request) {
return request.serializeBinary();
},
proto.pet.v1.PutPetResponse.deserializeBinary
);
/**
* @param {!proto.pet.v1.PutPetRequest} request The
* request proto
* @param {?Object<string, string>} metadata User defined
* call metadata
* @param {function(?grpc.web.RpcError, ?proto.pet.v1.PutPetResponse)}
* callback The callback function(error, response)
* @return {!grpc.web.ClientReadableStream<!proto.pet.v1.PutPetResponse>|undefined}
* The XHR Node Readable Stream
*/
proto.pet.v1.PetStoreServiceClient.prototype.putPet =
function(request, metadata, callback) {
return this.client_.rpcCall(this.hostname_ +
'/pet.v1.PetStoreService/PutPet',
request,
metadata || {},
methodDescriptor_PetStoreService_PutPet,
callback);
};
/**
* @param {!proto.pet.v1.PutPetRequest} request The
* request proto
* @param {?Object<string, string>=} metadata User defined
* call metadata
* @return {!Promise<!proto.pet.v1.PutPetResponse>}
* Promise that resolves to the response
*/
proto.pet.v1.PetStoreServicePromiseClient.prototype.putPet =
function(request, metadata) {
return this.client_.unaryCall(this.hostname_ +
'/pet.v1.PetStoreService/PutPet',
request,
metadata || {},
methodDescriptor_PetStoreService_PutPet);
};
/**
* @const
* @type {!grpc.web.MethodDescriptor<
* !proto.pet.v1.DeletePetRequest,
* !proto.pet.v1.DeletePetResponse>}
*/
const methodDescriptor_PetStoreService_DeletePet = new grpc.web.MethodDescriptor(
'/pet.v1.PetStoreService/DeletePet',
grpc.web.MethodType.UNARY,
proto.pet.v1.DeletePetRequest,
proto.pet.v1.DeletePetResponse,
/**
* @param {!proto.pet.v1.DeletePetRequest} request
* @return {!Uint8Array}
*/
function(request) {
return request.serializeBinary();
},
proto.pet.v1.DeletePetResponse.deserializeBinary
);
/**
* @param {!proto.pet.v1.DeletePetRequest} request The
* request proto
* @param {?Object<string, string>} metadata User defined
* call metadata
* @param {function(?grpc.web.RpcError, ?proto.pet.v1.DeletePetResponse)}
* callback The callback function(error, response)
* @return {!grpc.web.ClientReadableStream<!proto.pet.v1.DeletePetResponse>|undefined}
* The XHR Node Readable Stream
*/
proto.pet.v1.PetStoreServiceClient.prototype.deletePet =
function(request, metadata, callback) {
return this.client_.rpcCall(this.hostname_ +
'/pet.v1.PetStoreService/DeletePet',
request,
metadata || {},
methodDescriptor_PetStoreService_DeletePet,
callback);
};
/**
* @param {!proto.pet.v1.DeletePetRequest} request The
* request proto
* @param {?Object<string, string>=} metadata User defined
* call metadata
* @return {!Promise<!proto.pet.v1.DeletePetResponse>}
* Promise that resolves to the response
*/
proto.pet.v1.PetStoreServicePromiseClient.prototype.deletePet =
function(request, metadata) {
return this.client_.unaryCall(this.hostname_ +
'/pet.v1.PetStoreService/DeletePet',
request,
metadata || {},
methodDescriptor_PetStoreService_DeletePet);
};
/**
* @const
* @type {!grpc.web.MethodDescriptor<
* !proto.pet.v1.PurchasePetRequest,
* !proto.pet.v1.PurchasePetResponse>}
*/
const methodDescriptor_PetStoreService_PurchasePet = new grpc.web.MethodDescriptor(
'/pet.v1.PetStoreService/PurchasePet',
grpc.web.MethodType.UNARY,
proto.pet.v1.PurchasePetRequest,
proto.pet.v1.PurchasePetResponse,
/**
* @param {!proto.pet.v1.PurchasePetRequest} request
* @return {!Uint8Array}
*/
function(request) {
return request.serializeBinary();
},
proto.pet.v1.PurchasePetResponse.deserializeBinary
);
/**
* @param {!proto.pet.v1.PurchasePetRequest} request The
* request proto
* @param {?Object<string, string>} metadata User defined
* call metadata
* @param {function(?grpc.web.RpcError, ?proto.pet.v1.PurchasePetResponse)}
* callback The callback function(error, response)
* @return {!grpc.web.ClientReadableStream<!proto.pet.v1.PurchasePetResponse>|undefined}
* The XHR Node Readable Stream
*/
proto.pet.v1.PetStoreServiceClient.prototype.purchasePet =
function(request, metadata, callback) {
return this.client_.rpcCall(this.hostname_ +
'/pet.v1.PetStoreService/PurchasePet',
request,
metadata || {},
methodDescriptor_PetStoreService_PurchasePet,
callback);
};
/**
* @param {!proto.pet.v1.PurchasePetRequest} request The
* request proto
* @param {?Object<string, string>=} metadata User defined
* call metadata
* @return {!Promise<!proto.pet.v1.PurchasePetResponse>}
* Promise that resolves to the response
*/
proto.pet.v1.PetStoreServicePromiseClient.prototype.purchasePet =
function(request, metadata) {
return this.client_.unaryCall(this.hostname_ +
'/pet.v1.PetStoreService/PurchasePet',
request,
metadata || {},
methodDescriptor_PetStoreService_PurchasePet);
};
module.exports = proto.pet.v1;

195
gen/web/pet/v1/pet_pb.d.ts vendored Normal file
View File

@@ -0,0 +1,195 @@
import * as jspb from 'google-protobuf'
import * as payment_v1_payment_pb from '../../payment/v1/payment_pb';
import * as google_type_datetime_pb from '../../google/type/datetime_pb';
export class Pet extends jspb.Message {
getPetType(): PetType;
setPetType(value: PetType): Pet;
getPetId(): string;
setPetId(value: string): Pet;
getName(): string;
setName(value: string): Pet;
getCreatedAt(): google_type_datetime_pb.DateTime | undefined;
setCreatedAt(value?: google_type_datetime_pb.DateTime): Pet;
hasCreatedAt(): boolean;
clearCreatedAt(): Pet;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Pet.AsObject;
static toObject(includeInstance: boolean, msg: Pet): Pet.AsObject;
static serializeBinaryToWriter(message: Pet, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Pet;
static deserializeBinaryFromReader(message: Pet, reader: jspb.BinaryReader): Pet;
}
export namespace Pet {
export type AsObject = {
petType: PetType,
petId: string,
name: string,
createdAt?: google_type_datetime_pb.DateTime.AsObject,
}
}
export class GetPetRequest extends jspb.Message {
getPetId(): string;
setPetId(value: string): GetPetRequest;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): GetPetRequest.AsObject;
static toObject(includeInstance: boolean, msg: GetPetRequest): GetPetRequest.AsObject;
static serializeBinaryToWriter(message: GetPetRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): GetPetRequest;
static deserializeBinaryFromReader(message: GetPetRequest, reader: jspb.BinaryReader): GetPetRequest;
}
export namespace GetPetRequest {
export type AsObject = {
petId: string,
}
}
export class GetPetResponse extends jspb.Message {
getPet(): Pet | undefined;
setPet(value?: Pet): GetPetResponse;
hasPet(): boolean;
clearPet(): GetPetResponse;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): GetPetResponse.AsObject;
static toObject(includeInstance: boolean, msg: GetPetResponse): GetPetResponse.AsObject;
static serializeBinaryToWriter(message: GetPetResponse, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): GetPetResponse;
static deserializeBinaryFromReader(message: GetPetResponse, reader: jspb.BinaryReader): GetPetResponse;
}
export namespace GetPetResponse {
export type AsObject = {
pet?: Pet.AsObject,
}
}
export class PutPetRequest extends jspb.Message {
getPetType(): PetType;
setPetType(value: PetType): PutPetRequest;
getName(): string;
setName(value: string): PutPetRequest;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): PutPetRequest.AsObject;
static toObject(includeInstance: boolean, msg: PutPetRequest): PutPetRequest.AsObject;
static serializeBinaryToWriter(message: PutPetRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): PutPetRequest;
static deserializeBinaryFromReader(message: PutPetRequest, reader: jspb.BinaryReader): PutPetRequest;
}
export namespace PutPetRequest {
export type AsObject = {
petType: PetType,
name: string,
}
}
export class PutPetResponse extends jspb.Message {
getPet(): Pet | undefined;
setPet(value?: Pet): PutPetResponse;
hasPet(): boolean;
clearPet(): PutPetResponse;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): PutPetResponse.AsObject;
static toObject(includeInstance: boolean, msg: PutPetResponse): PutPetResponse.AsObject;
static serializeBinaryToWriter(message: PutPetResponse, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): PutPetResponse;
static deserializeBinaryFromReader(message: PutPetResponse, reader: jspb.BinaryReader): PutPetResponse;
}
export namespace PutPetResponse {
export type AsObject = {
pet?: Pet.AsObject,
}
}
export class DeletePetRequest extends jspb.Message {
getPetId(): string;
setPetId(value: string): DeletePetRequest;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): DeletePetRequest.AsObject;
static toObject(includeInstance: boolean, msg: DeletePetRequest): DeletePetRequest.AsObject;
static serializeBinaryToWriter(message: DeletePetRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): DeletePetRequest;
static deserializeBinaryFromReader(message: DeletePetRequest, reader: jspb.BinaryReader): DeletePetRequest;
}
export namespace DeletePetRequest {
export type AsObject = {
petId: string,
}
}
export class DeletePetResponse extends jspb.Message {
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): DeletePetResponse.AsObject;
static toObject(includeInstance: boolean, msg: DeletePetResponse): DeletePetResponse.AsObject;
static serializeBinaryToWriter(message: DeletePetResponse, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): DeletePetResponse;
static deserializeBinaryFromReader(message: DeletePetResponse, reader: jspb.BinaryReader): DeletePetResponse;
}
export namespace DeletePetResponse {
export type AsObject = {
}
}
export class PurchasePetRequest extends jspb.Message {
getPetId(): string;
setPetId(value: string): PurchasePetRequest;
getOrder(): payment_v1_payment_pb.Order | undefined;
setOrder(value?: payment_v1_payment_pb.Order): PurchasePetRequest;
hasOrder(): boolean;
clearOrder(): PurchasePetRequest;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): PurchasePetRequest.AsObject;
static toObject(includeInstance: boolean, msg: PurchasePetRequest): PurchasePetRequest.AsObject;
static serializeBinaryToWriter(message: PurchasePetRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): PurchasePetRequest;
static deserializeBinaryFromReader(message: PurchasePetRequest, reader: jspb.BinaryReader): PurchasePetRequest;
}
export namespace PurchasePetRequest {
export type AsObject = {
petId: string,
order?: payment_v1_payment_pb.Order.AsObject,
}
}
export class PurchasePetResponse extends jspb.Message {
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): PurchasePetResponse.AsObject;
static toObject(includeInstance: boolean, msg: PurchasePetResponse): PurchasePetResponse.AsObject;
static serializeBinaryToWriter(message: PurchasePetResponse, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): PurchasePetResponse;
static deserializeBinaryFromReader(message: PurchasePetResponse, reader: jspb.BinaryReader): PurchasePetResponse;
}
export namespace PurchasePetResponse {
export type AsObject = {
}
}
export enum PetType {
PET_TYPE_UNSPECIFIED = 0,
PET_TYPE_CAT = 1,
PET_TYPE_DOG = 2,
PET_TYPE_SNAKE = 3,
PET_TYPE_HAMSTER = 4,
}

1584
gen/web/pet/v1/pet_pb.js Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,31 @@
import * as grpcWeb from 'grpc-web';
import * as printer_v1_pdf_invoice_pb from '../../printer/v1/pdf_invoice_pb';
export class PrinterServiceClient {
constructor (hostname: string,
credentials?: null | { [index: string]: string; },
options?: null | { [index: string]: any; });
invoiceGen(
request: printer_v1_pdf_invoice_pb.Invoice,
metadata: grpcWeb.Metadata | undefined,
callback: (err: grpcWeb.RpcError,
response: printer_v1_pdf_invoice_pb.DocumentResponse) => void
): grpcWeb.ClientReadableStream<printer_v1_pdf_invoice_pb.DocumentResponse>;
}
export class PrinterServicePromiseClient {
constructor (hostname: string,
credentials?: null | { [index: string]: string; },
options?: null | { [index: string]: any; });
invoiceGen(
request: printer_v1_pdf_invoice_pb.Invoice,
metadata?: grpcWeb.Metadata
): Promise<printer_v1_pdf_invoice_pb.DocumentResponse>;
}

View File

@@ -0,0 +1,143 @@
/**
* @fileoverview gRPC-Web generated client stub for printer.v1.invoice
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck
const grpc = {};
grpc.web = require('grpc-web');
var google_type_money_pb = require('../../google/type/money_pb.js')
var google_type_datetime_pb = require('../../google/type/datetime_pb.js')
var google_api_annotations_pb = require('../../google/api/annotations_pb.js')
const proto = {};
proto.printer = {};
proto.printer.v1 = {};
proto.printer.v1.invoice = require('./pdf_invoice_pb.js');
/**
* @param {string} hostname
* @param {?Object} credentials
* @param {?grpc.web.ClientOptions} options
* @constructor
* @struct
* @final
*/
proto.printer.v1.invoice.PrinterServiceClient =
function(hostname, credentials, options) {
if (!options) options = {};
options.format = 'text';
/**
* @private @const {!grpc.web.GrpcWebClientBase} The client
*/
this.client_ = new grpc.web.GrpcWebClientBase(options);
/**
* @private @const {string} The hostname
*/
this.hostname_ = hostname;
};
/**
* @param {string} hostname
* @param {?Object} credentials
* @param {?grpc.web.ClientOptions} options
* @constructor
* @struct
* @final
*/
proto.printer.v1.invoice.PrinterServicePromiseClient =
function(hostname, credentials, options) {
if (!options) options = {};
options.format = 'text';
/**
* @private @const {!grpc.web.GrpcWebClientBase} The client
*/
this.client_ = new grpc.web.GrpcWebClientBase(options);
/**
* @private @const {string} The hostname
*/
this.hostname_ = hostname;
};
/**
* @const
* @type {!grpc.web.MethodDescriptor<
* !proto.printer.v1.invoice.Invoice,
* !proto.printer.v1.invoice.DocumentResponse>}
*/
const methodDescriptor_PrinterService_InvoiceGen = new grpc.web.MethodDescriptor(
'/printer.v1.invoice.PrinterService/InvoiceGen',
grpc.web.MethodType.UNARY,
proto.printer.v1.invoice.Invoice,
proto.printer.v1.invoice.DocumentResponse,
/**
* @param {!proto.printer.v1.invoice.Invoice} request
* @return {!Uint8Array}
*/
function(request) {
return request.serializeBinary();
},
proto.printer.v1.invoice.DocumentResponse.deserializeBinary
);
/**
* @param {!proto.printer.v1.invoice.Invoice} request The
* request proto
* @param {?Object<string, string>} metadata User defined
* call metadata
* @param {function(?grpc.web.RpcError, ?proto.printer.v1.invoice.DocumentResponse)}
* callback The callback function(error, response)
* @return {!grpc.web.ClientReadableStream<!proto.printer.v1.invoice.DocumentResponse>|undefined}
* The XHR Node Readable Stream
*/
proto.printer.v1.invoice.PrinterServiceClient.prototype.invoiceGen =
function(request, metadata, callback) {
return this.client_.rpcCall(this.hostname_ +
'/printer.v1.invoice.PrinterService/InvoiceGen',
request,
metadata || {},
methodDescriptor_PrinterService_InvoiceGen,
callback);
};
/**
* @param {!proto.printer.v1.invoice.Invoice} request The
* request proto
* @param {?Object<string, string>=} metadata User defined
* call metadata
* @return {!Promise<!proto.printer.v1.invoice.DocumentResponse>}
* Promise that resolves to the response
*/
proto.printer.v1.invoice.PrinterServicePromiseClient.prototype.invoiceGen =
function(request, metadata) {
return this.client_.unaryCall(this.hostname_ +
'/printer.v1.invoice.PrinterService/InvoiceGen',
request,
metadata || {},
methodDescriptor_PrinterService_InvoiceGen);
};
module.exports = proto.printer.v1.invoice;

267
gen/web/printer/v1/pdf_invoice_pb.d.ts vendored Normal file
View File

@@ -0,0 +1,267 @@
import * as jspb from 'google-protobuf'
import * as google_type_money_pb from '../../google/type/money_pb';
import * as google_type_datetime_pb from '../../google/type/datetime_pb';
import * as google_api_annotations_pb from '../../google/api/annotations_pb';
export class InvoiceInfo extends jspb.Message {
getInvoiceId(): string;
setInvoiceId(value: string): InvoiceInfo;
getInvoiceDate(): google_type_datetime_pb.DateTime | undefined;
setInvoiceDate(value?: google_type_datetime_pb.DateTime): InvoiceInfo;
hasInvoiceDate(): boolean;
clearInvoiceDate(): InvoiceInfo;
getInvoiceDueDate(): google_type_datetime_pb.DateTime | undefined;
setInvoiceDueDate(value?: google_type_datetime_pb.DateTime): InvoiceInfo;
hasInvoiceDueDate(): boolean;
clearInvoiceDueDate(): InvoiceInfo;
getInvoiceType(): InvoiceType;
setInvoiceType(value: InvoiceType): InvoiceInfo;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): InvoiceInfo.AsObject;
static toObject(includeInstance: boolean, msg: InvoiceInfo): InvoiceInfo.AsObject;
static serializeBinaryToWriter(message: InvoiceInfo, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): InvoiceInfo;
static deserializeBinaryFromReader(message: InvoiceInfo, reader: jspb.BinaryReader): InvoiceInfo;
}
export namespace InvoiceInfo {
export type AsObject = {
invoiceId: string,
invoiceDate?: google_type_datetime_pb.DateTime.AsObject,
invoiceDueDate?: google_type_datetime_pb.DateTime.AsObject,
invoiceType: InvoiceType,
}
}
export class OrderInfo extends jspb.Message {
getOrderId(): string;
setOrderId(value: string): OrderInfo;
getOrderDate(): google_type_datetime_pb.DateTime | undefined;
setOrderDate(value?: google_type_datetime_pb.DateTime): OrderInfo;
hasOrderDate(): boolean;
clearOrderDate(): OrderInfo;
getOrderDueDate(): google_type_datetime_pb.DateTime | undefined;
setOrderDueDate(value?: google_type_datetime_pb.DateTime): OrderInfo;
hasOrderDueDate(): boolean;
clearOrderDueDate(): OrderInfo;
getOrderType(): OrderType;
setOrderType(value: OrderType): OrderInfo;
getOrderItemsList(): Array<OrderItem>;
setOrderItemsList(value: Array<OrderItem>): OrderInfo;
clearOrderItemsList(): OrderInfo;
addOrderItems(value?: OrderItem, index?: number): OrderItem;
getOrderVatItemsList(): Array<OrderVatItem>;
setOrderVatItemsList(value: Array<OrderVatItem>): OrderInfo;
clearOrderVatItemsList(): OrderInfo;
addOrderVatItems(value?: OrderVatItem, index?: number): OrderVatItem;
getDeposit(): number;
setDeposit(value: number): OrderInfo;
hasDeposit(): boolean;
clearDeposit(): OrderInfo;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): OrderInfo.AsObject;
static toObject(includeInstance: boolean, msg: OrderInfo): OrderInfo.AsObject;
static serializeBinaryToWriter(message: OrderInfo, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): OrderInfo;
static deserializeBinaryFromReader(message: OrderInfo, reader: jspb.BinaryReader): OrderInfo;
}
export namespace OrderInfo {
export type AsObject = {
orderId: string,
orderDate?: google_type_datetime_pb.DateTime.AsObject,
orderDueDate?: google_type_datetime_pb.DateTime.AsObject,
orderType: OrderType,
orderItemsList: Array<OrderItem.AsObject>,
orderVatItemsList: Array<OrderVatItem.AsObject>,
deposit?: number,
}
export enum DepositCase {
_DEPOSIT_NOT_SET = 0,
DEPOSIT = 7,
}
}
export class OfferInfo extends jspb.Message {
getOfferId(): string;
setOfferId(value: string): OfferInfo;
getOfferDate(): google_type_datetime_pb.DateTime | undefined;
setOfferDate(value?: google_type_datetime_pb.DateTime): OfferInfo;
hasOfferDate(): boolean;
clearOfferDate(): OfferInfo;
getOfferDueDate(): google_type_datetime_pb.DateTime | undefined;
setOfferDueDate(value?: google_type_datetime_pb.DateTime): OfferInfo;
hasOfferDueDate(): boolean;
clearOfferDueDate(): OfferInfo;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): OfferInfo.AsObject;
static toObject(includeInstance: boolean, msg: OfferInfo): OfferInfo.AsObject;
static serializeBinaryToWriter(message: OfferInfo, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): OfferInfo;
static deserializeBinaryFromReader(message: OfferInfo, reader: jspb.BinaryReader): OfferInfo;
}
export namespace OfferInfo {
export type AsObject = {
offerId: string,
offerDate?: google_type_datetime_pb.DateTime.AsObject,
offerDueDate?: google_type_datetime_pb.DateTime.AsObject,
}
}
export class OrderItem extends jspb.Message {
getDescription(): string;
setDescription(value: string): OrderItem;
getVat(): number;
setVat(value: number): OrderItem;
getCount(): number;
setCount(value: number): OrderItem;
getPriceSingle(): number;
setPriceSingle(value: number): OrderItem;
getPriceSum(): number;
setPriceSum(value: number): OrderItem;
getPriceNet(): boolean;
setPriceNet(value: boolean): OrderItem;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): OrderItem.AsObject;
static toObject(includeInstance: boolean, msg: OrderItem): OrderItem.AsObject;
static serializeBinaryToWriter(message: OrderItem, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): OrderItem;
static deserializeBinaryFromReader(message: OrderItem, reader: jspb.BinaryReader): OrderItem;
}
export namespace OrderItem {
export type AsObject = {
description: string,
vat: number,
count: number,
priceSingle: number,
priceSum: number,
priceNet: boolean,
}
}
export class OrderVatItem extends jspb.Message {
getDescription(): string;
setDescription(value: string): OrderVatItem;
getVat(): number;
setVat(value: number): OrderVatItem;
getVatMoneySum(): number;
setVatMoneySum(value: number): OrderVatItem;
getItemsCount(): number;
setItemsCount(value: number): OrderVatItem;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): OrderVatItem.AsObject;
static toObject(includeInstance: boolean, msg: OrderVatItem): OrderVatItem.AsObject;
static serializeBinaryToWriter(message: OrderVatItem, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): OrderVatItem;
static deserializeBinaryFromReader(message: OrderVatItem, reader: jspb.BinaryReader): OrderVatItem;
}
export namespace OrderVatItem {
export type AsObject = {
description: string,
vat: number,
vatMoneySum: number,
itemsCount: number,
}
}
export class Invoice extends jspb.Message {
getOrder(): OrderInfo | undefined;
setOrder(value?: OrderInfo): Invoice;
hasOrder(): boolean;
clearOrder(): Invoice;
getOffer(): OfferInfo | undefined;
setOffer(value?: OfferInfo): Invoice;
hasOffer(): boolean;
clearOffer(): Invoice;
getInfo(): InvoiceInfo | undefined;
setInfo(value?: InvoiceInfo): Invoice;
hasInfo(): boolean;
clearInfo(): Invoice;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Invoice.AsObject;
static toObject(includeInstance: boolean, msg: Invoice): Invoice.AsObject;
static serializeBinaryToWriter(message: Invoice, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Invoice;
static deserializeBinaryFromReader(message: Invoice, reader: jspb.BinaryReader): Invoice;
}
export namespace Invoice {
export type AsObject = {
order?: OrderInfo.AsObject,
offer?: OfferInfo.AsObject,
info?: InvoiceInfo.AsObject,
}
}
export class DocumentResponse extends jspb.Message {
getDocument(): Uint8Array | string;
getDocument_asU8(): Uint8Array;
getDocument_asB64(): string;
setDocument(value: Uint8Array | string): DocumentResponse;
getSignature(): string;
setSignature(value: string): DocumentResponse;
getSha512(): string;
setSha512(value: string): DocumentResponse;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): DocumentResponse.AsObject;
static toObject(includeInstance: boolean, msg: DocumentResponse): DocumentResponse.AsObject;
static serializeBinaryToWriter(message: DocumentResponse, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): DocumentResponse;
static deserializeBinaryFromReader(message: DocumentResponse, reader: jspb.BinaryReader): DocumentResponse;
}
export namespace DocumentResponse {
export type AsObject = {
document: Uint8Array | string,
signature: string,
sha512: string,
}
}
export enum InvoiceType {
INVOICE_TYPE_UNSPECIFIED = 0,
INVOICE_TYPE_PAID = 1,
INVOICE_TYPE_OPEN = 2,
}
export enum OrderType {
ORDER_TYPE_UNSPECIFIED = 0,
ORDER_TYPE_PHONE = 1,
ORDER_TYPE_WWW = 2,
ORDER_TYPE_EMAIL = 3,
}

File diff suppressed because it is too large Load Diff

67
gen/web/shop/v1/shop_grpc_web_pb.d.ts vendored Normal file
View File

@@ -0,0 +1,67 @@
import * as grpcWeb from 'grpc-web';
import * as shop_v1_shop_pb from '../../shop/v1/shop_pb';
export class ShopServiceClient {
constructor (hostname: string,
credentials?: null | { [index: string]: string; },
options?: null | { [index: string]: any; });
list(
request: shop_v1_shop_pb.Shop,
metadata: grpcWeb.Metadata | undefined,
callback: (err: grpcWeb.RpcError,
response: shop_v1_shop_pb.Shop) => void
): grpcWeb.ClientReadableStream<shop_v1_shop_pb.Shop>;
add(
request: shop_v1_shop_pb.Shop,
metadata: grpcWeb.Metadata | undefined,
callback: (err: grpcWeb.RpcError,
response: shop_v1_shop_pb.Shop) => void
): grpcWeb.ClientReadableStream<shop_v1_shop_pb.Shop>;
update(
request: shop_v1_shop_pb.Shop,
metadata: grpcWeb.Metadata | undefined,
callback: (err: grpcWeb.RpcError,
response: shop_v1_shop_pb.Shop) => void
): grpcWeb.ClientReadableStream<shop_v1_shop_pb.Shop>;
delete(
request: shop_v1_shop_pb.Shop,
metadata: grpcWeb.Metadata | undefined,
callback: (err: grpcWeb.RpcError,
response: shop_v1_shop_pb.Shop) => void
): grpcWeb.ClientReadableStream<shop_v1_shop_pb.Shop>;
}
export class ShopServicePromiseClient {
constructor (hostname: string,
credentials?: null | { [index: string]: string; },
options?: null | { [index: string]: any; });
list(
request: shop_v1_shop_pb.Shop,
metadata?: grpcWeb.Metadata
): Promise<shop_v1_shop_pb.Shop>;
add(
request: shop_v1_shop_pb.Shop,
metadata?: grpcWeb.Metadata
): Promise<shop_v1_shop_pb.Shop>;
update(
request: shop_v1_shop_pb.Shop,
metadata?: grpcWeb.Metadata
): Promise<shop_v1_shop_pb.Shop>;
delete(
request: shop_v1_shop_pb.Shop,
metadata?: grpcWeb.Metadata
): Promise<shop_v1_shop_pb.Shop>;
}

View File

@@ -0,0 +1,323 @@
/**
* @fileoverview gRPC-Web generated client stub for shop.v1
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck
const grpc = {};
grpc.web = require('grpc-web');
var google_type_money_pb = require('../../google/type/money_pb.js')
var google_type_datetime_pb = require('../../google/type/datetime_pb.js')
const proto = {};
proto.shop = {};
proto.shop.v1 = require('./shop_pb.js');
/**
* @param {string} hostname
* @param {?Object} credentials
* @param {?grpc.web.ClientOptions} options
* @constructor
* @struct
* @final
*/
proto.shop.v1.ShopServiceClient =
function(hostname, credentials, options) {
if (!options) options = {};
options.format = 'text';
/**
* @private @const {!grpc.web.GrpcWebClientBase} The client
*/
this.client_ = new grpc.web.GrpcWebClientBase(options);
/**
* @private @const {string} The hostname
*/
this.hostname_ = hostname;
};
/**
* @param {string} hostname
* @param {?Object} credentials
* @param {?grpc.web.ClientOptions} options
* @constructor
* @struct
* @final
*/
proto.shop.v1.ShopServicePromiseClient =
function(hostname, credentials, options) {
if (!options) options = {};
options.format = 'text';
/**
* @private @const {!grpc.web.GrpcWebClientBase} The client
*/
this.client_ = new grpc.web.GrpcWebClientBase(options);
/**
* @private @const {string} The hostname
*/
this.hostname_ = hostname;
};
/**
* @const
* @type {!grpc.web.MethodDescriptor<
* !proto.shop.v1.Shop,
* !proto.shop.v1.Shop>}
*/
const methodDescriptor_ShopService_List = new grpc.web.MethodDescriptor(
'/shop.v1.ShopService/List',
grpc.web.MethodType.UNARY,
proto.shop.v1.Shop,
proto.shop.v1.Shop,
/**
* @param {!proto.shop.v1.Shop} request
* @return {!Uint8Array}
*/
function(request) {
return request.serializeBinary();
},
proto.shop.v1.Shop.deserializeBinary
);
/**
* @param {!proto.shop.v1.Shop} request The
* request proto
* @param {?Object<string, string>} metadata User defined
* call metadata
* @param {function(?grpc.web.RpcError, ?proto.shop.v1.Shop)}
* callback The callback function(error, response)
* @return {!grpc.web.ClientReadableStream<!proto.shop.v1.Shop>|undefined}
* The XHR Node Readable Stream
*/
proto.shop.v1.ShopServiceClient.prototype.list =
function(request, metadata, callback) {
return this.client_.rpcCall(this.hostname_ +
'/shop.v1.ShopService/List',
request,
metadata || {},
methodDescriptor_ShopService_List,
callback);
};
/**
* @param {!proto.shop.v1.Shop} request The
* request proto
* @param {?Object<string, string>=} metadata User defined
* call metadata
* @return {!Promise<!proto.shop.v1.Shop>}
* Promise that resolves to the response
*/
proto.shop.v1.ShopServicePromiseClient.prototype.list =
function(request, metadata) {
return this.client_.unaryCall(this.hostname_ +
'/shop.v1.ShopService/List',
request,
metadata || {},
methodDescriptor_ShopService_List);
};
/**
* @const
* @type {!grpc.web.MethodDescriptor<
* !proto.shop.v1.Shop,
* !proto.shop.v1.Shop>}
*/
const methodDescriptor_ShopService_Add = new grpc.web.MethodDescriptor(
'/shop.v1.ShopService/Add',
grpc.web.MethodType.UNARY,
proto.shop.v1.Shop,
proto.shop.v1.Shop,
/**
* @param {!proto.shop.v1.Shop} request
* @return {!Uint8Array}
*/
function(request) {
return request.serializeBinary();
},
proto.shop.v1.Shop.deserializeBinary
);
/**
* @param {!proto.shop.v1.Shop} request The
* request proto
* @param {?Object<string, string>} metadata User defined
* call metadata
* @param {function(?grpc.web.RpcError, ?proto.shop.v1.Shop)}
* callback The callback function(error, response)
* @return {!grpc.web.ClientReadableStream<!proto.shop.v1.Shop>|undefined}
* The XHR Node Readable Stream
*/
proto.shop.v1.ShopServiceClient.prototype.add =
function(request, metadata, callback) {
return this.client_.rpcCall(this.hostname_ +
'/shop.v1.ShopService/Add',
request,
metadata || {},
methodDescriptor_ShopService_Add,
callback);
};
/**
* @param {!proto.shop.v1.Shop} request The
* request proto
* @param {?Object<string, string>=} metadata User defined
* call metadata
* @return {!Promise<!proto.shop.v1.Shop>}
* Promise that resolves to the response
*/
proto.shop.v1.ShopServicePromiseClient.prototype.add =
function(request, metadata) {
return this.client_.unaryCall(this.hostname_ +
'/shop.v1.ShopService/Add',
request,
metadata || {},
methodDescriptor_ShopService_Add);
};
/**
* @const
* @type {!grpc.web.MethodDescriptor<
* !proto.shop.v1.Shop,
* !proto.shop.v1.Shop>}
*/
const methodDescriptor_ShopService_Update = new grpc.web.MethodDescriptor(
'/shop.v1.ShopService/Update',
grpc.web.MethodType.UNARY,
proto.shop.v1.Shop,
proto.shop.v1.Shop,
/**
* @param {!proto.shop.v1.Shop} request
* @return {!Uint8Array}
*/
function(request) {
return request.serializeBinary();
},
proto.shop.v1.Shop.deserializeBinary
);
/**
* @param {!proto.shop.v1.Shop} request The
* request proto
* @param {?Object<string, string>} metadata User defined
* call metadata
* @param {function(?grpc.web.RpcError, ?proto.shop.v1.Shop)}
* callback The callback function(error, response)
* @return {!grpc.web.ClientReadableStream<!proto.shop.v1.Shop>|undefined}
* The XHR Node Readable Stream
*/
proto.shop.v1.ShopServiceClient.prototype.update =
function(request, metadata, callback) {
return this.client_.rpcCall(this.hostname_ +
'/shop.v1.ShopService/Update',
request,
metadata || {},
methodDescriptor_ShopService_Update,
callback);
};
/**
* @param {!proto.shop.v1.Shop} request The
* request proto
* @param {?Object<string, string>=} metadata User defined
* call metadata
* @return {!Promise<!proto.shop.v1.Shop>}
* Promise that resolves to the response
*/
proto.shop.v1.ShopServicePromiseClient.prototype.update =
function(request, metadata) {
return this.client_.unaryCall(this.hostname_ +
'/shop.v1.ShopService/Update',
request,
metadata || {},
methodDescriptor_ShopService_Update);
};
/**
* @const
* @type {!grpc.web.MethodDescriptor<
* !proto.shop.v1.Shop,
* !proto.shop.v1.Shop>}
*/
const methodDescriptor_ShopService_Delete = new grpc.web.MethodDescriptor(
'/shop.v1.ShopService/Delete',
grpc.web.MethodType.UNARY,
proto.shop.v1.Shop,
proto.shop.v1.Shop,
/**
* @param {!proto.shop.v1.Shop} request
* @return {!Uint8Array}
*/
function(request) {
return request.serializeBinary();
},
proto.shop.v1.Shop.deserializeBinary
);
/**
* @param {!proto.shop.v1.Shop} request The
* request proto
* @param {?Object<string, string>} metadata User defined
* call metadata
* @param {function(?grpc.web.RpcError, ?proto.shop.v1.Shop)}
* callback The callback function(error, response)
* @return {!grpc.web.ClientReadableStream<!proto.shop.v1.Shop>|undefined}
* The XHR Node Readable Stream
*/
proto.shop.v1.ShopServiceClient.prototype.delete =
function(request, metadata, callback) {
return this.client_.rpcCall(this.hostname_ +
'/shop.v1.ShopService/Delete',
request,
metadata || {},
methodDescriptor_ShopService_Delete,
callback);
};
/**
* @param {!proto.shop.v1.Shop} request The
* request proto
* @param {?Object<string, string>=} metadata User defined
* call metadata
* @return {!Promise<!proto.shop.v1.Shop>}
* Promise that resolves to the response
*/
proto.shop.v1.ShopServicePromiseClient.prototype.delete =
function(request, metadata) {
return this.client_.unaryCall(this.hostname_ +
'/shop.v1.ShopService/Delete',
request,
metadata || {},
methodDescriptor_ShopService_Delete);
};
module.exports = proto.shop.v1;

72
gen/web/shop/v1/shop_pb.d.ts vendored Normal file
View File

@@ -0,0 +1,72 @@
import * as jspb from 'google-protobuf'
import * as google_type_money_pb from '../../google/type/money_pb';
import * as google_type_datetime_pb from '../../google/type/datetime_pb';
export class Shop extends jspb.Message {
getShopId(): string;
setShopId(value: string): Shop;
hasShopId(): boolean;
clearShopId(): Shop;
getShopName(): string;
setShopName(value: string): Shop;
getShopType(): ShopType;
setShopType(value: ShopType): Shop;
getShopUrlWww(): string;
setShopUrlWww(value: string): Shop;
getShopUrlLogo(): string;
setShopUrlLogo(value: string): Shop;
getShopUrlApi(): string;
setShopUrlApi(value: string): Shop;
getShopCurrency(): string;
setShopCurrency(value: string): Shop;
getShopPrefixOrder(): string;
setShopPrefixOrder(value: string): Shop;
getShopPrefixInvoice(): string;
setShopPrefixInvoice(value: string): Shop;
getShopPrefixOffer(): string;
setShopPrefixOffer(value: string): Shop;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Shop.AsObject;
static toObject(includeInstance: boolean, msg: Shop): Shop.AsObject;
static serializeBinaryToWriter(message: Shop, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Shop;
static deserializeBinaryFromReader(message: Shop, reader: jspb.BinaryReader): Shop;
}
export namespace Shop {
export type AsObject = {
shopId?: string,
shopName: string,
shopType: ShopType,
shopUrlWww: string,
shopUrlLogo: string,
shopUrlApi: string,
shopCurrency: string,
shopPrefixOrder: string,
shopPrefixInvoice: string,
shopPrefixOffer: string,
}
export enum ShopIdCase {
_SHOP_ID_NOT_SET = 0,
SHOP_ID = 1,
}
}
export enum ShopType {
SHOP_TYPE_UNSPECIFIED = 0,
SHOP_TYPE_DIGITAL = 1,
SHOP_TYPE_RETAIL = 2,
}

478
gen/web/shop/v1/shop_pb.js Normal file
View File

@@ -0,0 +1,478 @@
// source: shop/v1/shop.proto
/**
* @fileoverview
* @enhanceable
* @suppress {missingRequire} reports error on implicit type usages.
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck
var jspb = require('google-protobuf');
var goog = jspb;
var global = (function() {
if (this) { return this; }
if (typeof window !== 'undefined') { return window; }
if (typeof global !== 'undefined') { return global; }
if (typeof self !== 'undefined') { return self; }
return Function('return this')();
}.call(null));
var google_type_money_pb = require('../../google/type/money_pb.js');
goog.object.extend(proto, google_type_money_pb);
var google_type_datetime_pb = require('../../google/type/datetime_pb.js');
goog.object.extend(proto, google_type_datetime_pb);
goog.exportSymbol('proto.shop.v1.Shop', null, global);
goog.exportSymbol('proto.shop.v1.ShopType', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.shop.v1.Shop = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.shop.v1.Shop, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.shop.v1.Shop.displayName = 'proto.shop.v1.Shop';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.shop.v1.Shop.prototype.toObject = function(opt_includeInstance) {
return proto.shop.v1.Shop.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.shop.v1.Shop} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.shop.v1.Shop.toObject = function(includeInstance, msg) {
var f, obj = {
shopId: jspb.Message.getFieldWithDefault(msg, 1, ""),
shopName: jspb.Message.getFieldWithDefault(msg, 2, ""),
shopType: jspb.Message.getFieldWithDefault(msg, 3, 0),
shopUrlWww: jspb.Message.getFieldWithDefault(msg, 4, ""),
shopUrlLogo: jspb.Message.getFieldWithDefault(msg, 5, ""),
shopUrlApi: jspb.Message.getFieldWithDefault(msg, 6, ""),
shopCurrency: jspb.Message.getFieldWithDefault(msg, 7, ""),
shopPrefixOrder: jspb.Message.getFieldWithDefault(msg, 8, ""),
shopPrefixInvoice: jspb.Message.getFieldWithDefault(msg, 9, ""),
shopPrefixOffer: jspb.Message.getFieldWithDefault(msg, 10, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.shop.v1.Shop}
*/
proto.shop.v1.Shop.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.shop.v1.Shop;
return proto.shop.v1.Shop.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.shop.v1.Shop} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.shop.v1.Shop}
*/
proto.shop.v1.Shop.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setShopId(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setShopName(value);
break;
case 3:
var value = /** @type {!proto.shop.v1.ShopType} */ (reader.readEnum());
msg.setShopType(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setShopUrlWww(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.setShopUrlLogo(value);
break;
case 6:
var value = /** @type {string} */ (reader.readString());
msg.setShopUrlApi(value);
break;
case 7:
var value = /** @type {string} */ (reader.readString());
msg.setShopCurrency(value);
break;
case 8:
var value = /** @type {string} */ (reader.readString());
msg.setShopPrefixOrder(value);
break;
case 9:
var value = /** @type {string} */ (reader.readString());
msg.setShopPrefixInvoice(value);
break;
case 10:
var value = /** @type {string} */ (reader.readString());
msg.setShopPrefixOffer(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.shop.v1.Shop.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.shop.v1.Shop.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.shop.v1.Shop} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.shop.v1.Shop.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = /** @type {string} */ (jspb.Message.getField(message, 1));
if (f != null) {
writer.writeString(
1,
f
);
}
f = message.getShopName();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getShopType();
if (f !== 0.0) {
writer.writeEnum(
3,
f
);
}
f = message.getShopUrlWww();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
f = message.getShopUrlLogo();
if (f.length > 0) {
writer.writeString(
5,
f
);
}
f = message.getShopUrlApi();
if (f.length > 0) {
writer.writeString(
6,
f
);
}
f = message.getShopCurrency();
if (f.length > 0) {
writer.writeString(
7,
f
);
}
f = message.getShopPrefixOrder();
if (f.length > 0) {
writer.writeString(
8,
f
);
}
f = message.getShopPrefixInvoice();
if (f.length > 0) {
writer.writeString(
9,
f
);
}
f = message.getShopPrefixOffer();
if (f.length > 0) {
writer.writeString(
10,
f
);
}
};
/**
* optional string shop_id = 1;
* @return {string}
*/
proto.shop.v1.Shop.prototype.getShopId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.shop.v1.Shop} returns this
*/
proto.shop.v1.Shop.prototype.setShopId = function(value) {
return jspb.Message.setField(this, 1, value);
};
/**
* Clears the field making it undefined.
* @return {!proto.shop.v1.Shop} returns this
*/
proto.shop.v1.Shop.prototype.clearShopId = function() {
return jspb.Message.setField(this, 1, undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.shop.v1.Shop.prototype.hasShopId = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional string shop_name = 2;
* @return {string}
*/
proto.shop.v1.Shop.prototype.getShopName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.shop.v1.Shop} returns this
*/
proto.shop.v1.Shop.prototype.setShopName = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional ShopType shop_type = 3;
* @return {!proto.shop.v1.ShopType}
*/
proto.shop.v1.Shop.prototype.getShopType = function() {
return /** @type {!proto.shop.v1.ShopType} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/**
* @param {!proto.shop.v1.ShopType} value
* @return {!proto.shop.v1.Shop} returns this
*/
proto.shop.v1.Shop.prototype.setShopType = function(value) {
return jspb.Message.setProto3EnumField(this, 3, value);
};
/**
* optional string shop_url_www = 4;
* @return {string}
*/
proto.shop.v1.Shop.prototype.getShopUrlWww = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* @param {string} value
* @return {!proto.shop.v1.Shop} returns this
*/
proto.shop.v1.Shop.prototype.setShopUrlWww = function(value) {
return jspb.Message.setProto3StringField(this, 4, value);
};
/**
* optional string shop_url_logo = 5;
* @return {string}
*/
proto.shop.v1.Shop.prototype.getShopUrlLogo = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/**
* @param {string} value
* @return {!proto.shop.v1.Shop} returns this
*/
proto.shop.v1.Shop.prototype.setShopUrlLogo = function(value) {
return jspb.Message.setProto3StringField(this, 5, value);
};
/**
* optional string shop_url_api = 6;
* @return {string}
*/
proto.shop.v1.Shop.prototype.getShopUrlApi = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};
/**
* @param {string} value
* @return {!proto.shop.v1.Shop} returns this
*/
proto.shop.v1.Shop.prototype.setShopUrlApi = function(value) {
return jspb.Message.setProto3StringField(this, 6, value);
};
/**
* optional string shop_currency = 7;
* @return {string}
*/
proto.shop.v1.Shop.prototype.getShopCurrency = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
};
/**
* @param {string} value
* @return {!proto.shop.v1.Shop} returns this
*/
proto.shop.v1.Shop.prototype.setShopCurrency = function(value) {
return jspb.Message.setProto3StringField(this, 7, value);
};
/**
* optional string shop_prefix_order = 8;
* @return {string}
*/
proto.shop.v1.Shop.prototype.getShopPrefixOrder = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
};
/**
* @param {string} value
* @return {!proto.shop.v1.Shop} returns this
*/
proto.shop.v1.Shop.prototype.setShopPrefixOrder = function(value) {
return jspb.Message.setProto3StringField(this, 8, value);
};
/**
* optional string shop_prefix_invoice = 9;
* @return {string}
*/
proto.shop.v1.Shop.prototype.getShopPrefixInvoice = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
};
/**
* @param {string} value
* @return {!proto.shop.v1.Shop} returns this
*/
proto.shop.v1.Shop.prototype.setShopPrefixInvoice = function(value) {
return jspb.Message.setProto3StringField(this, 9, value);
};
/**
* optional string shop_prefix_offer = 10;
* @return {string}
*/
proto.shop.v1.Shop.prototype.getShopPrefixOffer = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, ""));
};
/**
* @param {string} value
* @return {!proto.shop.v1.Shop} returns this
*/
proto.shop.v1.Shop.prototype.setShopPrefixOffer = function(value) {
return jspb.Message.setProto3StringField(this, 10, value);
};
/**
* @enum {number}
*/
proto.shop.v1.ShopType = {
SHOP_TYPE_UNSPECIFIED: 0,
SHOP_TYPE_DIGITAL: 1,
SHOP_TYPE_RETAIL: 2
};
goog.object.extend(exports, proto.shop.v1);

View File

@@ -2,7 +2,10 @@
brew install protobuf
brew install bufbuild/buf/buf
brew install protoc-gen-grpc-web
go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@latest
go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@latest
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest

View File

@@ -2,6 +2,8 @@ syntax = "proto3";
package payment.v1;
option go_package = "git.deineagentur.com/payment-backoffice/protobuf/gen/proto/payment";
import "google/type/money.proto";
// PaymentProvider represents the supported set
@@ -19,4 +21,4 @@ message Order {
string recipient_id = 2;
google.type.Money amount = 3;
PaymentProvider payment_provider = 4;
}
}

View File

@@ -2,6 +2,9 @@ syntax = "proto3";
package pet.v1;
option go_package = "git.deineagentur.com/payment-backoffice/protobuf/gen/proto/pet";
import "payment/v1/payment.proto";
import "google/type/datetime.proto";
@@ -57,4 +60,4 @@ service PetStoreService {
rpc PutPet(PutPetRequest) returns (PutPetResponse) {}
rpc DeletePet(DeletePetRequest) returns (DeletePetResponse) {}
rpc PurchasePet(PurchasePetRequest) returns (PurchasePetResponse) {}
}
}

7
printerapis/buf.lock Normal file
View File

@@ -0,0 +1,7 @@
# Generated by buf. DO NOT EDIT.
version: v1
deps:
- remote: buf.build
owner: googleapis
repository: googleapis
commit: 68946673f2d94bb2b24e6e97a208b752

10
printerapis/buf.yaml Normal file
View File

@@ -0,0 +1,10 @@
version: v1
name: buf.build/acme/printerapis
deps:
- buf.build/googleapis/googleapis
lint:
use:
- DEFAULT
breaking:
use:
- FILE

View File

@@ -0,0 +1,86 @@
syntax = "proto3";
package printer.v1.invoice;
option go_package = "git.deineagentur.com/payment-backoffice/protobuf/gen/proto/printer";
import "google/type/money.proto";
import "google/type/datetime.proto";
import "google/api/annotations.proto";
// PaymentProvider represents the supported set
// of payment providers.
enum InvoiceType {
INVOICE_TYPE_UNSPECIFIED = 0;
INVOICE_TYPE_PAID = 1;
INVOICE_TYPE_OPEN = 2;
}
enum OrderType {
ORDER_TYPE_UNSPECIFIED = 0;
ORDER_TYPE_PHONE = 1;
ORDER_TYPE_WWW = 2;
ORDER_TYPE_EMAIL = 3;
}
message InvoiceInfo {
string invoice_id = 1;
google.type.DateTime invoice_date = 2;
google.type.DateTime invoice_due_date = 3;
InvoiceType invoice_type = 4;
}
message OrderInfo {
string order_id = 1;
google.type.DateTime order_date = 2;
google.type.DateTime order_due_date = 3;
OrderType order_type = 4;
repeated OrderItem order_items = 5;
repeated OrderVatItem order_vat_items = 6;
optional double deposit = 7;
}
message OfferInfo {
string offer_id = 1;
google.type.DateTime offer_date = 2;
google.type.DateTime offer_due_date = 3;
}
message OrderItem {
string description = 1;
double vat = 2;
uint64 count = 3;
double price_single = 4;
double price_sum = 5;
bool price_net = 6;
}
message OrderVatItem {
string description = 1;
double vat = 2;
double vat_money_sum = 3;
uint64 items_count = 4;
}
// Invoice
message Invoice {
OrderInfo order = 1;
OfferInfo offer = 2;
InvoiceInfo info = 3;
}
// PDF Response
message DocumentResponse {
bytes document = 1;
string signature = 2;
string sha512 = 3;
}
service PrinterService {
rpc InvoiceGen(Invoice) returns (DocumentResponse) {
option (google.api.http) = {
post: "/v1/printer/invoice"
body: "*"
};
};
}

8
service.yml Normal file
View File

@@ -0,0 +1,8 @@
type: google.api.Service
config_version: 3
http:
rules:
- selector: printer.v1.invoice.PrinterService.InvoiceGen
post: /v1/pdf/invoice
body: "*"

7
shopapis/buf.lock Normal file
View File

@@ -0,0 +1,7 @@
# Generated by buf. DO NOT EDIT.
version: v1
deps:
- remote: buf.build
owner: googleapis
repository: googleapis
commit: 68946673f2d94bb2b24e6e97a208b752

10
shopapis/buf.yaml Normal file
View File

@@ -0,0 +1,10 @@
version: v1
name: buf.build/acme/shopapis
deps:
- buf.build/googleapis/googleapis
lint:
use:
- DEFAULT
breaking:
use:
- FILE

View File

@@ -0,0 +1,37 @@
syntax = "proto3";
package shop.v1;
option go_package = "git.deineagentur.com/payment-backoffice/protobuf/gen/proto/shop";
import "google/type/money.proto";
import "google/type/datetime.proto";
// PaymentProvider represents the supported set
// of payment providers.
enum ShopType {
SHOP_TYPE_UNSPECIFIED = 0;
SHOP_TYPE_DIGITAL = 1;
SHOP_TYPE_RETAIL = 2;
}
// Order represents a monetary order.
message Shop {
optional string shop_id = 1;
string shop_name = 2;
ShopType shop_type = 3;
string shop_url_www = 4;
string shop_url_logo = 5;
string shop_url_api = 6;
string shop_currency = 7;
string shop_prefix_order = 8;
string shop_prefix_invoice = 9;
string shop_prefix_offer = 10;
}
service ShopService {
rpc List(Shop) returns (Shop);
rpc Add(Shop) returns (Shop);
rpc Update(Shop) returns (Shop);
rpc Delete(Shop) returns (Shop);
}