proto

package
v0.0.0-...-87e21a1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ShopService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "shop.v1.ShopService",
	HandlerType: (*ShopServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetAll",
			Handler:    _ShopService_GetAll_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _ShopService_Get_Handler,
		},
		{
			MethodName: "Create",
			Handler:    _ShopService_Create_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _ShopService_Update_Handler,
		},
		{
			MethodName: "Remove",
			Handler:    _ShopService_Remove_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "shop.proto",
}

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)

Functions

func RegisterShopServiceServer

func RegisterShopServiceServer(s grpc.ServiceRegistrar, srv ShopServiceServer)

Types

type CreateItemRequest

type CreateItemRequest struct {
	Name  string  `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Price float32 `protobuf:"fixed32,3,opt,name=price,proto3" json:"price,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateItemRequest) Descriptor deprecated

func (*CreateItemRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateItemRequest.ProtoReflect.Descriptor instead.

func (*CreateItemRequest) GetName

func (x *CreateItemRequest) GetName() string

func (*CreateItemRequest) GetPrice

func (x *CreateItemRequest) GetPrice() float32

func (*CreateItemRequest) ProtoMessage

func (*CreateItemRequest) ProtoMessage()

func (*CreateItemRequest) ProtoReflect

func (x *CreateItemRequest) ProtoReflect() protoreflect.Message

func (*CreateItemRequest) Reset

func (x *CreateItemRequest) Reset()

func (*CreateItemRequest) String

func (x *CreateItemRequest) String() string

type Item

type Item struct {
	Id    string  `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name  string  `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Price float32 `protobuf:"fixed32,3,opt,name=price,proto3" json:"price,omitempty"`
	// contains filtered or unexported fields
}

func (*Item) Descriptor deprecated

func (*Item) Descriptor() ([]byte, []int)

Deprecated: Use Item.ProtoReflect.Descriptor instead.

func (*Item) GetId

func (x *Item) GetId() string

func (*Item) GetName

func (x *Item) GetName() string

func (*Item) GetPrice

func (x *Item) GetPrice() float32

func (*Item) ProtoMessage

func (*Item) ProtoMessage()

func (*Item) ProtoReflect

func (x *Item) ProtoReflect() protoreflect.Message

func (*Item) Reset

func (x *Item) Reset()

func (*Item) String

func (x *Item) String() string

type ItemRequestId

type ItemRequestId struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*ItemRequestId) Descriptor deprecated

func (*ItemRequestId) Descriptor() ([]byte, []int)

Deprecated: Use ItemRequestId.ProtoReflect.Descriptor instead.

func (*ItemRequestId) GetId

func (x *ItemRequestId) GetId() string

func (*ItemRequestId) ProtoMessage

func (*ItemRequestId) ProtoMessage()

func (*ItemRequestId) ProtoReflect

func (x *ItemRequestId) ProtoReflect() protoreflect.Message

func (*ItemRequestId) Reset

func (x *ItemRequestId) Reset()

func (*ItemRequestId) String

func (x *ItemRequestId) String() string

type ItemsList

type ItemsList struct {
	Items []*Item `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*ItemsList) Descriptor deprecated

func (*ItemsList) Descriptor() ([]byte, []int)

Deprecated: Use ItemsList.ProtoReflect.Descriptor instead.

func (*ItemsList) GetItems

func (x *ItemsList) GetItems() []*Item

func (*ItemsList) ProtoMessage

func (*ItemsList) ProtoMessage()

func (*ItemsList) ProtoReflect

func (x *ItemsList) ProtoReflect() protoreflect.Message

func (*ItemsList) Reset

func (x *ItemsList) Reset()

func (*ItemsList) String

func (x *ItemsList) String() string

type ShopServiceClient

type ShopServiceClient interface {
	GetAll(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ItemsList, error)
	Get(ctx context.Context, in *ItemRequestId, opts ...grpc.CallOption) (*Item, error)
	Create(ctx context.Context, in *CreateItemRequest, opts ...grpc.CallOption) (*Item, error)
	Update(ctx context.Context, in *Item, opts ...grpc.CallOption) (*Item, error)
	Remove(ctx context.Context, in *ItemRequestId, opts ...grpc.CallOption) (*empty.Empty, error)
}

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 ShopServiceServer

type ShopServiceServer interface {
	GetAll(context.Context, *empty.Empty) (*ItemsList, error)
	Get(context.Context, *ItemRequestId) (*Item, error)
	Create(context.Context, *CreateItemRequest) (*Item, error)
	Update(context.Context, *Item) (*Item, error)
	Remove(context.Context, *ItemRequestId) (*empty.Empty, error)
	// contains filtered or unexported methods
}

ShopServiceServer is the server API for ShopService service. All implementations must embed UnimplementedShopServiceServer for forward compatibility

type UnimplementedShopServiceServer

type UnimplementedShopServiceServer struct {
}

UnimplementedShopServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedShopServiceServer) Create

func (UnimplementedShopServiceServer) Get

func (UnimplementedShopServiceServer) GetAll

func (UnimplementedShopServiceServer) Remove

func (UnimplementedShopServiceServer) Update

type UnsafeShopServiceServer

type UnsafeShopServiceServer interface {
	// contains filtered or unexported methods
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL