v1

package
v0.0.0-...-da59240 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Product_CreateProduct_FullMethodName = "/api.product.v1.Product/CreateProduct"
	Product_UpdateProduct_FullMethodName = "/api.product.v1.Product/UpdateProduct"
	Product_DeleteProduct_FullMethodName = "/api.product.v1.Product/DeleteProduct"
	Product_GetProduct_FullMethodName    = "/api.product.v1.Product/GetProduct"
	Product_ListProduct_FullMethodName   = "/api.product.v1.Product/ListProduct"
)
View Source
const OperationProductCreateProduct = "/api.product.v1.Product/CreateProduct"
View Source
const OperationProductDeleteProduct = "/api.product.v1.Product/DeleteProduct"
View Source
const OperationProductGetProduct = "/api.product.v1.Product/GetProduct"
View Source
const OperationProductListProduct = "/api.product.v1.Product/ListProduct"
View Source
const OperationProductUpdateProduct = "/api.product.v1.Product/UpdateProduct"

Variables

View Source
var File_api_product_v1_product_proto protoreflect.FileDescriptor
View Source
var Product_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.product.v1.Product",
	HandlerType: (*ProductServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateProduct",
			Handler:    _Product_CreateProduct_Handler,
		},
		{
			MethodName: "UpdateProduct",
			Handler:    _Product_UpdateProduct_Handler,
		},
		{
			MethodName: "DeleteProduct",
			Handler:    _Product_DeleteProduct_Handler,
		},
		{
			MethodName: "GetProduct",
			Handler:    _Product_GetProduct_Handler,
		},
		{
			MethodName: "ListProduct",
			Handler:    _Product_ListProduct_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/product/v1/product.proto",
}

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

Functions

func RegisterProductHTTPServer

func RegisterProductHTTPServer(s *http.Server, srv ProductHTTPServer)

func RegisterProductServer

func RegisterProductServer(s grpc.ServiceRegistrar, srv ProductServer)

Types

type CreateProductReply

type CreateProductReply 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"`
	// contains filtered or unexported fields
}

func (*CreateProductReply) Descriptor deprecated

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

Deprecated: Use CreateProductReply.ProtoReflect.Descriptor instead.

func (*CreateProductReply) GetDescription

func (x *CreateProductReply) GetDescription() string

func (*CreateProductReply) GetId

func (x *CreateProductReply) GetId() string

func (*CreateProductReply) GetName

func (x *CreateProductReply) GetName() string

func (*CreateProductReply) GetPrice

func (x *CreateProductReply) GetPrice() int64

func (*CreateProductReply) ProtoMessage

func (*CreateProductReply) ProtoMessage()

func (*CreateProductReply) ProtoReflect

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

func (*CreateProductReply) Reset

func (x *CreateProductReply) Reset()

func (*CreateProductReply) String

func (x *CreateProductReply) String() string

type CreateProductRequest

type CreateProductRequest struct {
	Body *ProductBody `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateProductRequest) Descriptor deprecated

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

Deprecated: Use CreateProductRequest.ProtoReflect.Descriptor instead.

func (*CreateProductRequest) GetBody

func (x *CreateProductRequest) GetBody() *ProductBody

func (*CreateProductRequest) ProtoMessage

func (*CreateProductRequest) ProtoMessage()

func (*CreateProductRequest) ProtoReflect

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

func (*CreateProductRequest) Reset

func (x *CreateProductRequest) Reset()

func (*CreateProductRequest) String

func (x *CreateProductRequest) String() string

type DeleteProductReply

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

func (*DeleteProductReply) Descriptor deprecated

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

Deprecated: Use DeleteProductReply.ProtoReflect.Descriptor instead.

func (*DeleteProductReply) GetId

func (x *DeleteProductReply) GetId() string

func (*DeleteProductReply) ProtoMessage

func (*DeleteProductReply) ProtoMessage()

func (*DeleteProductReply) ProtoReflect

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

func (*DeleteProductReply) Reset

func (x *DeleteProductReply) Reset()

func (*DeleteProductReply) String

func (x *DeleteProductReply) String() string

type DeleteProductRequest

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

func (*DeleteProductRequest) Descriptor deprecated

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

Deprecated: Use DeleteProductRequest.ProtoReflect.Descriptor instead.

func (*DeleteProductRequest) GetId

func (x *DeleteProductRequest) GetId() string

func (*DeleteProductRequest) ProtoMessage

func (*DeleteProductRequest) ProtoMessage()

func (*DeleteProductRequest) ProtoReflect

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

func (*DeleteProductRequest) Reset

func (x *DeleteProductRequest) Reset()

func (*DeleteProductRequest) String

func (x *DeleteProductRequest) String() string

type GetProductReply

type GetProductReply 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"`
	// contains filtered or unexported fields
}

func (*GetProductReply) Descriptor deprecated

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

Deprecated: Use GetProductReply.ProtoReflect.Descriptor instead.

func (*GetProductReply) GetDescription

func (x *GetProductReply) GetDescription() string

func (*GetProductReply) GetId

func (x *GetProductReply) GetId() string

func (*GetProductReply) GetName

func (x *GetProductReply) GetName() string

func (*GetProductReply) GetPrice

func (x *GetProductReply) GetPrice() int64

func (*GetProductReply) ProtoMessage

func (*GetProductReply) ProtoMessage()

func (*GetProductReply) ProtoReflect

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

func (*GetProductReply) Reset

func (x *GetProductReply) Reset()

func (*GetProductReply) String

func (x *GetProductReply) String() string

type GetProductRequest

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

func (*GetProductRequest) Descriptor deprecated

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

Deprecated: Use GetProductRequest.ProtoReflect.Descriptor instead.

func (*GetProductRequest) GetId

func (x *GetProductRequest) GetId() string

func (*GetProductRequest) ProtoMessage

func (*GetProductRequest) ProtoMessage()

func (*GetProductRequest) ProtoReflect

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

func (*GetProductRequest) Reset

func (x *GetProductRequest) Reset()

func (*GetProductRequest) String

func (x *GetProductRequest) String() string

type ListProductReply

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

func (*ListProductReply) Descriptor deprecated

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

Deprecated: Use ListProductReply.ProtoReflect.Descriptor instead.

func (*ListProductReply) GetProducts

func (x *ListProductReply) GetProducts() []*CreateProductReply

func (*ListProductReply) ProtoMessage

func (*ListProductReply) ProtoMessage()

func (*ListProductReply) ProtoReflect

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

func (*ListProductReply) Reset

func (x *ListProductReply) Reset()

func (*ListProductReply) String

func (x *ListProductReply) String() string

type ListProductRequest

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

func (*ListProductRequest) Descriptor deprecated

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

Deprecated: Use ListProductRequest.ProtoReflect.Descriptor instead.

func (*ListProductRequest) GetPage

func (x *ListProductRequest) GetPage() string

func (*ListProductRequest) ProtoMessage

func (*ListProductRequest) ProtoMessage()

func (*ListProductRequest) ProtoReflect

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

func (*ListProductRequest) Reset

func (x *ListProductRequest) Reset()

func (*ListProductRequest) String

func (x *ListProductRequest) String() string

type ProductBody

type ProductBody struct {
	Name        string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	Price       int64  `protobuf:"varint,3,opt,name=price,proto3" json:"price,omitempty"`
	// contains filtered or unexported fields
}

func (*ProductBody) Descriptor deprecated

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

Deprecated: Use ProductBody.ProtoReflect.Descriptor instead.

func (*ProductBody) GetDescription

func (x *ProductBody) GetDescription() string

func (*ProductBody) GetName

func (x *ProductBody) GetName() string

func (*ProductBody) GetPrice

func (x *ProductBody) GetPrice() int64

func (*ProductBody) ProtoMessage

func (*ProductBody) ProtoMessage()

func (*ProductBody) ProtoReflect

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

func (*ProductBody) Reset

func (x *ProductBody) Reset()

func (*ProductBody) String

func (x *ProductBody) String() string

type ProductClient

type ProductClient interface {
	CreateProduct(ctx context.Context, in *CreateProductRequest, opts ...grpc.CallOption) (*CreateProductReply, error)
	UpdateProduct(ctx context.Context, in *UpdateProductRequest, opts ...grpc.CallOption) (*UpdateProductReply, error)
	DeleteProduct(ctx context.Context, in *DeleteProductRequest, opts ...grpc.CallOption) (*DeleteProductReply, error)
	GetProduct(ctx context.Context, in *GetProductRequest, opts ...grpc.CallOption) (*GetProductReply, error)
	ListProduct(ctx context.Context, in *ListProductRequest, opts ...grpc.CallOption) (*ListProductReply, error)
}

ProductClient is the client API for Product 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.

func NewProductClient

func NewProductClient(cc grpc.ClientConnInterface) ProductClient

type ProductHTTPClient

type ProductHTTPClient interface {
	CreateProduct(ctx context.Context, req *CreateProductRequest, opts ...http.CallOption) (rsp *CreateProductReply, err error)
	DeleteProduct(ctx context.Context, req *DeleteProductRequest, opts ...http.CallOption) (rsp *DeleteProductReply, err error)
	GetProduct(ctx context.Context, req *GetProductRequest, opts ...http.CallOption) (rsp *GetProductReply, err error)
	ListProduct(ctx context.Context, req *ListProductRequest, opts ...http.CallOption) (rsp *ListProductReply, err error)
	UpdateProduct(ctx context.Context, req *UpdateProductRequest, opts ...http.CallOption) (rsp *UpdateProductReply, err error)
}

func NewProductHTTPClient

func NewProductHTTPClient(client *http.Client) ProductHTTPClient

type ProductHTTPClientImpl

type ProductHTTPClientImpl struct {
	// contains filtered or unexported fields
}

func (*ProductHTTPClientImpl) CreateProduct

func (*ProductHTTPClientImpl) DeleteProduct

func (*ProductHTTPClientImpl) GetProduct

func (*ProductHTTPClientImpl) ListProduct

func (*ProductHTTPClientImpl) UpdateProduct

type ProductServer

type ProductServer interface {
	CreateProduct(context.Context, *CreateProductRequest) (*CreateProductReply, error)
	UpdateProduct(context.Context, *UpdateProductRequest) (*UpdateProductReply, error)
	DeleteProduct(context.Context, *DeleteProductRequest) (*DeleteProductReply, error)
	GetProduct(context.Context, *GetProductRequest) (*GetProductReply, error)
	ListProduct(context.Context, *ListProductRequest) (*ListProductReply, error)
	// contains filtered or unexported methods
}

ProductServer is the server API for Product service. All implementations must embed UnimplementedProductServer for forward compatibility

type UnimplementedProductServer

type UnimplementedProductServer struct {
}

UnimplementedProductServer must be embedded to have forward compatible implementations.

func (UnimplementedProductServer) CreateProduct

func (UnimplementedProductServer) DeleteProduct

func (UnimplementedProductServer) GetProduct

func (UnimplementedProductServer) ListProduct

func (UnimplementedProductServer) UpdateProduct

type UnsafeProductServer

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

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

type UpdateProductBody

type UpdateProductBody struct {
	Name        *string `protobuf:"bytes,2,opt,name=name,proto3,oneof" json:"name,omitempty"`
	Description *string `protobuf:"bytes,3,opt,name=description,proto3,oneof" json:"description,omitempty"`
	Price       *int64  `protobuf:"varint,4,opt,name=price,proto3,oneof" json:"price,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateProductBody) Descriptor deprecated

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

Deprecated: Use UpdateProductBody.ProtoReflect.Descriptor instead.

func (*UpdateProductBody) GetDescription

func (x *UpdateProductBody) GetDescription() string

func (*UpdateProductBody) GetName

func (x *UpdateProductBody) GetName() string

func (*UpdateProductBody) GetPrice

func (x *UpdateProductBody) GetPrice() int64

func (*UpdateProductBody) ProtoMessage

func (*UpdateProductBody) ProtoMessage()

func (*UpdateProductBody) ProtoReflect

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

func (*UpdateProductBody) Reset

func (x *UpdateProductBody) Reset()

func (*UpdateProductBody) String

func (x *UpdateProductBody) String() string

type UpdateProductReply

type UpdateProductReply 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"`
	// contains filtered or unexported fields
}

func (*UpdateProductReply) Descriptor deprecated

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

Deprecated: Use UpdateProductReply.ProtoReflect.Descriptor instead.

func (*UpdateProductReply) GetDescription

func (x *UpdateProductReply) GetDescription() string

func (*UpdateProductReply) GetId

func (x *UpdateProductReply) GetId() string

func (*UpdateProductReply) GetName

func (x *UpdateProductReply) GetName() string

func (*UpdateProductReply) GetPrice

func (x *UpdateProductReply) GetPrice() int64

func (*UpdateProductReply) ProtoMessage

func (*UpdateProductReply) ProtoMessage()

func (*UpdateProductReply) ProtoReflect

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

func (*UpdateProductReply) Reset

func (x *UpdateProductReply) Reset()

func (*UpdateProductReply) String

func (x *UpdateProductReply) String() string

type UpdateProductRequest

type UpdateProductRequest struct {
	Id   string             `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Body *UpdateProductBody `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateProductRequest) Descriptor deprecated

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

Deprecated: Use UpdateProductRequest.ProtoReflect.Descriptor instead.

func (*UpdateProductRequest) GetBody

func (*UpdateProductRequest) GetId

func (x *UpdateProductRequest) GetId() string

func (*UpdateProductRequest) ProtoMessage

func (*UpdateProductRequest) ProtoMessage()

func (*UpdateProductRequest) ProtoReflect

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

func (*UpdateProductRequest) Reset

func (x *UpdateProductRequest) Reset()

func (*UpdateProductRequest) String

func (x *UpdateProductRequest) String() string

Jump to

Keyboard shortcuts

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