Documentation ¶
Index ¶
- Variables
- func RegisterProductsServiceServer(s *grpc.Server, srv ProductsServiceServer)
- type CreateRequest
- func (*CreateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateRequest) GetApi() string
- func (x *CreateRequest) GetProduct() *Product
- func (*CreateRequest) ProtoMessage()
- func (x *CreateRequest) ProtoReflect() protoreflect.Message
- func (x *CreateRequest) Reset()
- func (x *CreateRequest) String() string
- type CreateResponse
- func (*CreateResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateResponse) GetApi() string
- func (x *CreateResponse) GetId() int64
- func (*CreateResponse) ProtoMessage()
- func (x *CreateResponse) ProtoReflect() protoreflect.Message
- func (x *CreateResponse) Reset()
- func (x *CreateResponse) String() string
- type Product
- func (*Product) Descriptor() ([]byte, []int)deprecated
- func (x *Product) GetBrand() string
- func (x *Product) GetCode() string
- func (x *Product) GetCreatedAt() *timestamp.Timestamp
- func (x *Product) GetDescription() string
- func (x *Product) GetId() int64
- func (x *Product) GetName() string
- func (x *Product) GetOtherDetails() string
- func (x *Product) GetUpdatedAt() *timestamp.Timestamp
- func (*Product) ProtoMessage()
- func (x *Product) ProtoReflect() protoreflect.Message
- func (x *Product) Reset()
- func (x *Product) String() string
- type ProductsServiceClient
- type ProductsServiceServer
- type Server
- type UnimplementedProductsServiceServer
Constants ¶
This section is empty.
Variables ¶
View Source
var File_product_proto protoreflect.FileDescriptor
Functions ¶
func RegisterProductsServiceServer ¶
func RegisterProductsServiceServer(s *grpc.Server, srv ProductsServiceServer)
Types ¶
type CreateRequest ¶
type CreateRequest struct { Api string `protobuf:"bytes,1,opt,name=api,proto3" json:"api,omitempty"` Product *Product `protobuf:"bytes,2,opt,name=product,proto3" json:"product,omitempty"` // contains filtered or unexported fields }
func (*CreateRequest) Descriptor
deprecated
func (*CreateRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.
func (*CreateRequest) GetApi ¶
func (x *CreateRequest) GetApi() string
func (*CreateRequest) GetProduct ¶
func (x *CreateRequest) GetProduct() *Product
func (*CreateRequest) ProtoMessage ¶
func (*CreateRequest) ProtoMessage()
func (*CreateRequest) ProtoReflect ¶
func (x *CreateRequest) ProtoReflect() protoreflect.Message
func (*CreateRequest) Reset ¶
func (x *CreateRequest) Reset()
func (*CreateRequest) String ¶
func (x *CreateRequest) String() string
type CreateResponse ¶
type CreateResponse struct { Api string `protobuf:"bytes,1,opt,name=api,proto3" json:"api,omitempty"` Id int64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*CreateResponse) Descriptor
deprecated
func (*CreateResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.
func (*CreateResponse) GetApi ¶
func (x *CreateResponse) GetApi() string
func (*CreateResponse) GetId ¶
func (x *CreateResponse) GetId() int64
func (*CreateResponse) ProtoMessage ¶
func (*CreateResponse) ProtoMessage()
func (*CreateResponse) ProtoReflect ¶
func (x *CreateResponse) ProtoReflect() protoreflect.Message
func (*CreateResponse) Reset ¶
func (x *CreateResponse) Reset()
func (*CreateResponse) String ¶
func (x *CreateResponse) String() string
type Product ¶
type Product struct { Id int64 `protobuf:"varint,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"` Code string `protobuf:"bytes,4,opt,name=code,proto3" json:"code,omitempty"` Brand string `protobuf:"bytes,5,opt,name=brand,proto3" json:"brand,omitempty"` OtherDetails string `protobuf:"bytes,6,opt,name=otherDetails,proto3" json:"otherDetails,omitempty"` CreatedAt *timestamp.Timestamp `protobuf:"bytes,7,opt,name=createdAt,proto3" json:"createdAt,omitempty"` UpdatedAt *timestamp.Timestamp `protobuf:"bytes,8,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` // contains filtered or unexported fields }
func (*Product) Descriptor
deprecated
func (*Product) GetCreatedAt ¶
func (*Product) GetDescription ¶
func (*Product) GetOtherDetails ¶
func (*Product) GetUpdatedAt ¶
func (*Product) ProtoMessage ¶
func (*Product) ProtoMessage()
func (*Product) ProtoReflect ¶
func (x *Product) ProtoReflect() protoreflect.Message
type ProductsServiceClient ¶
type ProductsServiceClient interface {
Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error)
}
ProductsServiceClient is the client API for ProductsService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewProductsServiceClient ¶
func NewProductsServiceClient(cc grpc.ClientConnInterface) ProductsServiceClient
type ProductsServiceServer ¶
type ProductsServiceServer interface {
Create(context.Context, *CreateRequest) (*CreateResponse, error)
}
ProductsServiceServer is the server API for ProductsService service.
type Server ¶
type Server struct{}
Server struct
func (*Server) Create ¶
func (server *Server) Create(ctx context.Context, req *CreateRequest) (*CreateResponse, error)
Create Create a Product
type UnimplementedProductsServiceServer ¶
type UnimplementedProductsServiceServer struct { }
UnimplementedProductsServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedProductsServiceServer) Create ¶
func (*UnimplementedProductsServiceServer) Create(context.Context, *CreateRequest) (*CreateResponse, error)
Click to show internal directories.
Click to hide internal directories.