Documentation ¶
Index ¶
- Variables
- func RegisterProductApiServer(s *grpc.Server, srv ProductApiServer)
- type ProductApiClient
- type ProductApiServer
- type ProductDto
- func (*ProductDto) Descriptor() ([]byte, []int)deprecated
- func (x *ProductDto) GetDescription() string
- func (x *ProductDto) GetId() string
- func (x *ProductDto) GetName() string
- func (x *ProductDto) GetPrice() int64
- func (x *ProductDto) GetStatus() bool
- func (x *ProductDto) GetStock() int64
- func (*ProductDto) ProtoMessage()
- func (x *ProductDto) ProtoReflect() protoreflect.Message
- func (x *ProductDto) Reset()
- func (x *ProductDto) String() string
- type ProductDtoList
- type UnimplementedProductApiServer
- func (*UnimplementedProductApiServer) Create(context.Context, *ProductDto) (*ProductDto, error)
- func (*UnimplementedProductApiServer) GetProductByID(context.Context, *wrappers.StringValue) (*ProductDto, error)
- func (*UnimplementedProductApiServer) ListProduct(context.Context, *empty.Empty) (*ProductDtoList, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var File_product_proto protoreflect.FileDescriptor
Functions ¶
func RegisterProductApiServer ¶
func RegisterProductApiServer(s *grpc.Server, srv ProductApiServer)
Types ¶
type ProductApiClient ¶
type ProductApiClient interface { Create(ctx context.Context, in *ProductDto, opts ...grpc.CallOption) (*ProductDto, error) GetProductByID(ctx context.Context, in *wrappers.StringValue, opts ...grpc.CallOption) (*ProductDto, error) ListProduct(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ProductDtoList, error) }
ProductApiClient is the client API for ProductApi service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewProductApiClient ¶
func NewProductApiClient(cc grpc.ClientConnInterface) ProductApiClient
type ProductApiServer ¶
type ProductApiServer interface { Create(context.Context, *ProductDto) (*ProductDto, error) GetProductByID(context.Context, *wrappers.StringValue) (*ProductDto, error) ListProduct(context.Context, *empty.Empty) (*ProductDtoList, error) }
ProductApiServer is the server API for ProductApi service.
type ProductDto ¶
type ProductDto 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"` Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` Price int64 `protobuf:"varint,4,opt,name=price,proto3" json:"price,omitempty"` Stock int64 `protobuf:"varint,5,opt,name=stock,proto3" json:"stock,omitempty"` Status bool `protobuf:"varint,6,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
func (*ProductDto) Descriptor
deprecated
func (*ProductDto) Descriptor() ([]byte, []int)
Deprecated: Use ProductDto.ProtoReflect.Descriptor instead.
func (*ProductDto) GetDescription ¶
func (x *ProductDto) GetDescription() string
func (*ProductDto) GetId ¶
func (x *ProductDto) GetId() string
func (*ProductDto) GetName ¶
func (x *ProductDto) GetName() string
func (*ProductDto) GetPrice ¶
func (x *ProductDto) GetPrice() int64
func (*ProductDto) GetStatus ¶
func (x *ProductDto) GetStatus() bool
func (*ProductDto) GetStock ¶
func (x *ProductDto) GetStock() int64
func (*ProductDto) ProtoMessage ¶
func (*ProductDto) ProtoMessage()
func (*ProductDto) ProtoReflect ¶
func (x *ProductDto) ProtoReflect() protoreflect.Message
func (*ProductDto) Reset ¶
func (x *ProductDto) Reset()
func (*ProductDto) String ¶
func (x *ProductDto) String() string
type ProductDtoList ¶
type ProductDtoList struct { List []*ProductDto `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"` // contains filtered or unexported fields }
func (*ProductDtoList) Descriptor
deprecated
func (*ProductDtoList) Descriptor() ([]byte, []int)
Deprecated: Use ProductDtoList.ProtoReflect.Descriptor instead.
func (*ProductDtoList) GetList ¶
func (x *ProductDtoList) GetList() []*ProductDto
func (*ProductDtoList) ProtoMessage ¶
func (*ProductDtoList) ProtoMessage()
func (*ProductDtoList) ProtoReflect ¶
func (x *ProductDtoList) ProtoReflect() protoreflect.Message
func (*ProductDtoList) Reset ¶
func (x *ProductDtoList) Reset()
func (*ProductDtoList) String ¶
func (x *ProductDtoList) String() string
type UnimplementedProductApiServer ¶
type UnimplementedProductApiServer struct { }
UnimplementedProductApiServer can be embedded to have forward compatible implementations.
func (*UnimplementedProductApiServer) Create ¶
func (*UnimplementedProductApiServer) Create(context.Context, *ProductDto) (*ProductDto, error)
func (*UnimplementedProductApiServer) GetProductByID ¶
func (*UnimplementedProductApiServer) GetProductByID(context.Context, *wrappers.StringValue) (*ProductDto, error)
func (*UnimplementedProductApiServer) ListProduct ¶
func (*UnimplementedProductApiServer) ListProduct(context.Context, *empty.Empty) (*ProductDtoList, error)
Click to show internal directories.
Click to hide internal directories.