pb

package
v0.0.0-...-ed03793 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProductService_Get_FullMethodName    = "/tanshogyo.v1.ProductService/Get"
	ProductService_Update_FullMethodName = "/tanshogyo.v1.ProductService/Update"
)

Variables

View Source
var File_product_proto protoreflect.FileDescriptor
View Source
var ProductService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "tanshogyo.v1.ProductService",
	HandlerType: (*ProductServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _ProductService_Get_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _ProductService_Update_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "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 Product

type Product struct {
	Id          string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	SellerId    string                 `protobuf:"bytes,2,opt,name=seller_id,json=sellerId,proto3" json:"seller_id,omitempty"`
	Name        string                 `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	Description string                 `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	Price       int64                  `protobuf:"varint,5,opt,name=price,proto3" json:"price,omitempty"`
	Quantity    int64                  `protobuf:"varint,6,opt,name=quantity,proto3" json:"quantity,omitempty"`
	CreatedAt   *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt   *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*Product) Descriptor deprecated

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

Deprecated: Use Product.ProtoReflect.Descriptor instead.

func (*Product) GetCreatedAt

func (x *Product) GetCreatedAt() *timestamppb.Timestamp

func (*Product) GetDescription

func (x *Product) GetDescription() string

func (*Product) GetId

func (x *Product) GetId() string

func (*Product) GetName

func (x *Product) GetName() string

func (*Product) GetPrice

func (x *Product) GetPrice() int64

func (*Product) GetQuantity

func (x *Product) GetQuantity() int64

func (*Product) GetSellerId

func (x *Product) GetSellerId() string

func (*Product) GetUpdatedAt

func (x *Product) GetUpdatedAt() *timestamppb.Timestamp

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 ProductServiceClient

type ProductServiceClient interface {
	Get(ctx context.Context, in *SingleProductRequest, opts ...grpc.CallOption) (*Product, error)
	Update(ctx context.Context, in *UpdateProductRequest, opts ...grpc.CallOption) (*Product, 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 {
	Get(context.Context, *SingleProductRequest) (*Product, error)
	Update(context.Context, *UpdateProductRequest) (*Product, error)
	// contains filtered or unexported methods
}

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

type SingleProductRequest

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

func (*SingleProductRequest) Descriptor deprecated

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

Deprecated: Use SingleProductRequest.ProtoReflect.Descriptor instead.

func (*SingleProductRequest) GetId

func (x *SingleProductRequest) GetId() string

func (*SingleProductRequest) ProtoMessage

func (*SingleProductRequest) ProtoMessage()

func (*SingleProductRequest) ProtoReflect

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

func (*SingleProductRequest) Reset

func (x *SingleProductRequest) Reset()

func (*SingleProductRequest) String

func (x *SingleProductRequest) String() string

type UnimplementedProductServiceServer

type UnimplementedProductServiceServer struct {
}

UnimplementedProductServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedProductServiceServer) Get

func (UnimplementedProductServiceServer) Update

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 UpdateProductRequest

type UpdateProductRequest struct {
	Id          string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	SellerId    string `protobuf:"bytes,2,opt,name=seller_id,json=sellerId,proto3" json:"seller_id,omitempty"`
	Name        string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	Price       int64  `protobuf:"varint,5,opt,name=price,proto3" json:"price,omitempty"`
	Quantity    int64  `protobuf:"varint,6,opt,name=quantity,proto3" json:"quantity,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateProductRequest) Descriptor deprecated

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

Deprecated: Use UpdateProductRequest.ProtoReflect.Descriptor instead.

func (*UpdateProductRequest) GetDescription

func (x *UpdateProductRequest) GetDescription() string

func (*UpdateProductRequest) GetId

func (x *UpdateProductRequest) GetId() string

func (*UpdateProductRequest) GetName

func (x *UpdateProductRequest) GetName() string

func (*UpdateProductRequest) GetPrice

func (x *UpdateProductRequest) GetPrice() int64

func (*UpdateProductRequest) GetQuantity

func (x *UpdateProductRequest) GetQuantity() int64

func (*UpdateProductRequest) GetSellerId

func (x *UpdateProductRequest) GetSellerId() 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