pb

package
v0.0.0-...-2d31ac5 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProductService_CreateProduct_FullMethodName   = "/product.ProductService/CreateProduct"
	ProductService_ReadProduct_FullMethodName     = "/product.ProductService/ReadProduct"
	ProductService_UpdateProduct_FullMethodName   = "/product.ProductService/UpdateProduct"
	ProductService_DeleteProduct_FullMethodName   = "/product.ProductService/DeleteProduct"
	ProductService_SearchProducts_FullMethodName  = "/product.ProductService/SearchProducts"
	ProductService_ReadAllProducts_FullMethodName = "/product.ProductService/ReadAllProducts"
)

Variables

View Source
var File_api_proto_product_proto protoreflect.FileDescriptor
View Source
var ProductService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "product.ProductService",
	HandlerType: (*ProductServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateProduct",
			Handler:    _ProductService_CreateProduct_Handler,
		},
		{
			MethodName: "ReadProduct",
			Handler:    _ProductService_ReadProduct_Handler,
		},
		{
			MethodName: "UpdateProduct",
			Handler:    _ProductService_UpdateProduct_Handler,
		},
		{
			MethodName: "DeleteProduct",
			Handler:    _ProductService_DeleteProduct_Handler,
		},
		{
			MethodName: "SearchProducts",
			Handler:    _ProductService_SearchProducts_Handler,
		},
		{
			MethodName: "ReadAllProducts",
			Handler:    _ProductService_ReadAllProducts_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/proto/product.proto",
}

ProductService_ServiceDesc is the grpc.ServiceDesc for ProductService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterProductServiceServer

func RegisterProductServiceServer(s grpc.ServiceRegistrar, srv ProductServiceServer)

Types

type CreateProductResponse

type CreateProductResponse struct {
	Product *Product `protobuf:"bytes,1,opt,name=product,proto3" json:"product,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateProductResponse) Descriptor deprecated

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

Deprecated: Use CreateProductResponse.ProtoReflect.Descriptor instead.

func (*CreateProductResponse) GetProduct

func (x *CreateProductResponse) GetProduct() *Product

func (*CreateProductResponse) ProtoMessage

func (*CreateProductResponse) ProtoMessage()

func (*CreateProductResponse) ProtoReflect

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

func (*CreateProductResponse) Reset

func (x *CreateProductResponse) Reset()

func (*CreateProductResponse) String

func (x *CreateProductResponse) String() string

type DeleteProductResponse

type DeleteProductResponse struct {
	Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteProductResponse) Descriptor deprecated

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

Deprecated: Use DeleteProductResponse.ProtoReflect.Descriptor instead.

func (*DeleteProductResponse) GetSuccess

func (x *DeleteProductResponse) GetSuccess() bool

func (*DeleteProductResponse) ProtoMessage

func (*DeleteProductResponse) ProtoMessage()

func (*DeleteProductResponse) ProtoReflect

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

func (*DeleteProductResponse) Reset

func (x *DeleteProductResponse) Reset()

func (*DeleteProductResponse) String

func (x *DeleteProductResponse) String() string

type Product

type Product 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"`
	BasePrice     string                 `protobuf:"bytes,4,opt,name=base_price,json=basePrice,proto3" json:"base_price,omitempty"`
	Category      string                 `protobuf:"bytes,5,opt,name=category,proto3" json:"category,omitempty"`
	ImageUrl      string                 `protobuf:"bytes,6,opt,name=image_url,json=imageUrl,proto3" json:"image_url,omitempty"`
	Version       int32                  `protobuf:"varint,7,opt,name=version,proto3" json:"version,omitempty"`
	Tags          []string               `protobuf:"bytes,8,rep,name=tags,proto3" json:"tags,omitempty"`
	Relationships []*ProductRelationship `protobuf:"bytes,9,rep,name=relationships,proto3" json:"relationships,omitempty"`
	// contains filtered or unexported fields
}

func (*Product) Descriptor deprecated

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

Deprecated: Use Product.ProtoReflect.Descriptor instead.

func (*Product) GetBasePrice

func (x *Product) GetBasePrice() string

func (*Product) GetCategory

func (x *Product) GetCategory() string

func (*Product) GetDescription

func (x *Product) GetDescription() string

func (*Product) GetId

func (x *Product) GetId() string

func (*Product) GetImageUrl

func (x *Product) GetImageUrl() string

func (*Product) GetName

func (x *Product) GetName() string

func (*Product) GetRelationships

func (x *Product) GetRelationships() []*ProductRelationship

func (*Product) GetTags

func (x *Product) GetTags() []string

func (*Product) GetVersion

func (x *Product) GetVersion() int32

func (*Product) ProtoMessage

func (*Product) ProtoMessage()

func (*Product) ProtoReflect

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

func (*Product) Reset

func (x *Product) Reset()

func (*Product) String

func (x *Product) String() string

type ProductID

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

func (*ProductID) Descriptor deprecated

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

Deprecated: Use ProductID.ProtoReflect.Descriptor instead.

func (*ProductID) GetId

func (x *ProductID) GetId() string

func (*ProductID) ProtoMessage

func (*ProductID) ProtoMessage()

func (*ProductID) ProtoReflect

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

func (*ProductID) Reset

func (x *ProductID) Reset()

func (*ProductID) String

func (x *ProductID) String() string

type ProductList

type ProductList struct {
	Products []*Product `protobuf:"bytes,1,rep,name=products,proto3" json:"products,omitempty"`
	// contains filtered or unexported fields
}

func (*ProductList) Descriptor deprecated

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

Deprecated: Use ProductList.ProtoReflect.Descriptor instead.

func (*ProductList) GetProducts

func (x *ProductList) GetProducts() []*Product

func (*ProductList) ProtoMessage

func (*ProductList) ProtoMessage()

func (*ProductList) ProtoReflect

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

func (*ProductList) Reset

func (x *ProductList) Reset()

func (*ProductList) String

func (x *ProductList) String() string

type ProductRelationship

type ProductRelationship struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Type can be 'dependOn', 'bundle' or 'suggestion'
	Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*ProductRelationship) Descriptor deprecated

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

Deprecated: Use ProductRelationship.ProtoReflect.Descriptor instead.

func (*ProductRelationship) GetId

func (x *ProductRelationship) GetId() string

func (*ProductRelationship) GetType

func (x *ProductRelationship) GetType() string

func (*ProductRelationship) ProtoMessage

func (*ProductRelationship) ProtoMessage()

func (*ProductRelationship) ProtoReflect

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

func (*ProductRelationship) Reset

func (x *ProductRelationship) Reset()

func (*ProductRelationship) String

func (x *ProductRelationship) String() string

type ProductServiceClient

type ProductServiceClient interface {
	CreateProduct(ctx context.Context, in *Product, opts ...grpc.CallOption) (*CreateProductResponse, error)
	ReadProduct(ctx context.Context, in *ProductID, opts ...grpc.CallOption) (*ReadProductResponse, error)
	UpdateProduct(ctx context.Context, in *Product, opts ...grpc.CallOption) (*UpdateProductResponse, error)
	DeleteProduct(ctx context.Context, in *ProductID, opts ...grpc.CallOption) (*DeleteProductResponse, error)
	SearchProducts(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchProductsResponse, error)
	ReadAllProducts(ctx context.Context, in *ReadAllProductsRequest, opts ...grpc.CallOption) (*ReadAllProductsResponse, error)
}

ProductServiceClient is the client API for ProductService 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 ProductServiceServer

type ProductServiceServer interface {
	CreateProduct(context.Context, *Product) (*CreateProductResponse, error)
	ReadProduct(context.Context, *ProductID) (*ReadProductResponse, error)
	UpdateProduct(context.Context, *Product) (*UpdateProductResponse, error)
	DeleteProduct(context.Context, *ProductID) (*DeleteProductResponse, error)
	SearchProducts(context.Context, *SearchRequest) (*SearchProductsResponse, error)
	ReadAllProducts(context.Context, *ReadAllProductsRequest) (*ReadAllProductsResponse, error)
	// contains filtered or unexported methods
}

ProductServiceServer is the server API for ProductService service. All implementations must embed UnimplementedProductServiceServer for forward compatibility

type ReadAllProductsRequest

type ReadAllProductsRequest struct {
	Limit int32  `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
	Sort  string `protobuf:"bytes,2,opt,name=sort,proto3" json:"sort,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadAllProductsRequest) Descriptor deprecated

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

Deprecated: Use ReadAllProductsRequest.ProtoReflect.Descriptor instead.

func (*ReadAllProductsRequest) GetLimit

func (x *ReadAllProductsRequest) GetLimit() int32

func (*ReadAllProductsRequest) GetSort

func (x *ReadAllProductsRequest) GetSort() string

func (*ReadAllProductsRequest) ProtoMessage

func (*ReadAllProductsRequest) ProtoMessage()

func (*ReadAllProductsRequest) ProtoReflect

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

func (*ReadAllProductsRequest) Reset

func (x *ReadAllProductsRequest) Reset()

func (*ReadAllProductsRequest) String

func (x *ReadAllProductsRequest) String() string

type ReadAllProductsResponse

type ReadAllProductsResponse struct {
	Products *ProductList `protobuf:"bytes,1,opt,name=products,proto3" json:"products,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadAllProductsResponse) Descriptor deprecated

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

Deprecated: Use ReadAllProductsResponse.ProtoReflect.Descriptor instead.

func (*ReadAllProductsResponse) GetProducts

func (x *ReadAllProductsResponse) GetProducts() *ProductList

func (*ReadAllProductsResponse) ProtoMessage

func (*ReadAllProductsResponse) ProtoMessage()

func (*ReadAllProductsResponse) ProtoReflect

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

func (*ReadAllProductsResponse) Reset

func (x *ReadAllProductsResponse) Reset()

func (*ReadAllProductsResponse) String

func (x *ReadAllProductsResponse) String() string

type ReadProductResponse

type ReadProductResponse struct {
	Product *Product `protobuf:"bytes,1,opt,name=product,proto3" json:"product,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadProductResponse) Descriptor deprecated

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

Deprecated: Use ReadProductResponse.ProtoReflect.Descriptor instead.

func (*ReadProductResponse) GetProduct

func (x *ReadProductResponse) GetProduct() *Product

func (*ReadProductResponse) ProtoMessage

func (*ReadProductResponse) ProtoMessage()

func (*ReadProductResponse) ProtoReflect

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

func (*ReadProductResponse) Reset

func (x *ReadProductResponse) Reset()

func (*ReadProductResponse) String

func (x *ReadProductResponse) String() string

type SearchProductsResponse

type SearchProductsResponse struct {
	Products *ProductList `protobuf:"bytes,1,opt,name=products,proto3" json:"products,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchProductsResponse) Descriptor deprecated

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

Deprecated: Use SearchProductsResponse.ProtoReflect.Descriptor instead.

func (*SearchProductsResponse) GetProducts

func (x *SearchProductsResponse) GetProducts() *ProductList

func (*SearchProductsResponse) ProtoMessage

func (*SearchProductsResponse) ProtoMessage()

func (*SearchProductsResponse) ProtoReflect

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

func (*SearchProductsResponse) Reset

func (x *SearchProductsResponse) Reset()

func (*SearchProductsResponse) String

func (x *SearchProductsResponse) String() string

type SearchRequest

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

func (*SearchRequest) Descriptor deprecated

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

Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead.

func (*SearchRequest) GetQuery

func (x *SearchRequest) GetQuery() string

func (*SearchRequest) ProtoMessage

func (*SearchRequest) ProtoMessage()

func (*SearchRequest) ProtoReflect

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

func (*SearchRequest) Reset

func (x *SearchRequest) Reset()

func (*SearchRequest) String

func (x *SearchRequest) String() string

type UnimplementedProductServiceServer

type UnimplementedProductServiceServer struct {
}

UnimplementedProductServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedProductServiceServer) CreateProduct

func (UnimplementedProductServiceServer) DeleteProduct

func (UnimplementedProductServiceServer) ReadAllProducts

func (UnimplementedProductServiceServer) ReadProduct

func (UnimplementedProductServiceServer) SearchProducts

func (UnimplementedProductServiceServer) UpdateProduct

type UnsafeProductServiceServer

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

UnsafeProductServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ProductServiceServer will result in compilation errors.

type UpdateProductResponse

type UpdateProductResponse struct {
	Product *Product `protobuf:"bytes,1,opt,name=product,proto3" json:"product,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateProductResponse) Descriptor deprecated

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

Deprecated: Use UpdateProductResponse.ProtoReflect.Descriptor instead.

func (*UpdateProductResponse) GetProduct

func (x *UpdateProductResponse) GetProduct() *Product

func (*UpdateProductResponse) ProtoMessage

func (*UpdateProductResponse) ProtoMessage()

func (*UpdateProductResponse) ProtoReflect

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

func (*UpdateProductResponse) Reset

func (x *UpdateProductResponse) Reset()

func (*UpdateProductResponse) String

func (x *UpdateProductResponse) String() string

Jump to

Keyboard shortcuts

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