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

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