Documentation ¶
Index ¶
- Variables
- func RegisterCartServiceServer(s grpc.ServiceRegistrar, srv CartServiceServer)
- func RegisterProductServiceServer(s grpc.ServiceRegistrar, srv ProductServiceServer)
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type CartItem
- func (*CartItem) Descriptor() ([]byte, []int)deprecated
- func (x *CartItem) GetId() string
- func (x *CartItem) GetProductSku() string
- func (x *CartItem) GetQuantity() int32
- func (x *CartItem) GetUserId() string
- func (*CartItem) ProtoMessage()
- func (x *CartItem) ProtoReflect() protoreflect.Message
- func (x *CartItem) Reset()
- func (x *CartItem) String() string
- type CartServiceClient
- type CartServiceServer
- type GetProductInput
- type GetUserCartInput
- type GetUserCartResponse
- func (*GetUserCartResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserCartResponse) GetItems() []*CartItem
- func (*GetUserCartResponse) ProtoMessage()
- func (x *GetUserCartResponse) ProtoReflect() protoreflect.Message
- func (x *GetUserCartResponse) Reset()
- func (x *GetUserCartResponse) String() string
- type GetUserFromJWTInput
- func (*GetUserFromJWTInput) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserFromJWTInput) GetJwtToken() string
- func (*GetUserFromJWTInput) ProtoMessage()
- func (x *GetUserFromJWTInput) ProtoReflect() protoreflect.Message
- func (x *GetUserFromJWTInput) Reset()
- func (x *GetUserFromJWTInput) String() string
- type GetUserFromJWTResponse
- func (*GetUserFromJWTResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserFromJWTResponse) GetUser() *User
- func (*GetUserFromJWTResponse) ProtoMessage()
- func (x *GetUserFromJWTResponse) ProtoReflect() protoreflect.Message
- func (x *GetUserFromJWTResponse) Reset()
- func (x *GetUserFromJWTResponse) String() string
- type GetUsersFilter
- func (*GetUsersFilter) Descriptor() ([]byte, []int)deprecated
- func (x *GetUsersFilter) GetAfterId() string
- func (x *GetUsersFilter) GetLimit() int32
- func (*GetUsersFilter) ProtoMessage()
- func (x *GetUsersFilter) ProtoReflect() protoreflect.Message
- func (x *GetUsersFilter) Reset()
- func (x *GetUsersFilter) String() string
- type GetUsersResponse
- type LoginInput
- type LoginResponse
- func (*LoginResponse) Descriptor() ([]byte, []int)deprecated
- func (x *LoginResponse) GetJwtToken() string
- func (x *LoginResponse) GetUser() *User
- func (*LoginResponse) ProtoMessage()
- func (x *LoginResponse) ProtoReflect() protoreflect.Message
- func (x *LoginResponse) Reset()
- func (x *LoginResponse) String() string
- type NewCartItem
- func (*NewCartItem) Descriptor() ([]byte, []int)deprecated
- func (x *NewCartItem) GetProductSku() string
- func (x *NewCartItem) GetQuantity() int32
- func (x *NewCartItem) GetUserId() string
- func (*NewCartItem) ProtoMessage()
- func (x *NewCartItem) ProtoReflect() protoreflect.Message
- func (x *NewCartItem) Reset()
- func (x *NewCartItem) String() string
- type NewProduct
- func (*NewProduct) Descriptor() ([]byte, []int)deprecated
- func (x *NewProduct) GetBrand() string
- func (x *NewProduct) GetCategory() string
- func (x *NewProduct) GetDescription() string
- func (x *NewProduct) GetImageUrl() string
- func (x *NewProduct) GetName() string
- func (x *NewProduct) GetPrice() float64
- func (*NewProduct) ProtoMessage()
- func (x *NewProduct) ProtoReflect() protoreflect.Message
- func (x *NewProduct) Reset()
- func (x *NewProduct) String() string
- type NewUser
- func (*NewUser) Descriptor() ([]byte, []int)deprecated
- func (x *NewUser) GetCountry() string
- func (x *NewUser) GetEmail() string
- func (x *NewUser) GetFullName() string
- func (x *NewUser) GetPassword() string
- func (*NewUser) ProtoMessage()
- func (x *NewUser) ProtoReflect() protoreflect.Message
- func (x *NewUser) Reset()
- func (x *NewUser) String() string
- type Product
- func (*Product) Descriptor() ([]byte, []int)deprecated
- func (x *Product) GetBrand() string
- func (x *Product) GetCategory() string
- func (x *Product) GetDescription() string
- func (x *Product) GetImageUrl() string
- func (x *Product) GetMerchantId() string
- func (x *Product) GetName() string
- func (x *Product) GetPrice() float64
- func (x *Product) GetSku() string
- func (*Product) ProtoMessage()
- func (x *Product) ProtoReflect() protoreflect.Message
- func (x *Product) Reset()
- func (x *Product) String() string
- type ProductServiceClient
- type ProductServiceServer
- type RemoveItemsFromCartInput
- func (*RemoveItemsFromCartInput) Descriptor() ([]byte, []int)deprecated
- func (x *RemoveItemsFromCartInput) GetItemIds() []string
- func (x *RemoveItemsFromCartInput) GetUserId() string
- func (*RemoveItemsFromCartInput) ProtoMessage()
- func (x *RemoveItemsFromCartInput) ProtoReflect() protoreflect.Message
- func (x *RemoveItemsFromCartInput) Reset()
- func (x *RemoveItemsFromCartInput) String() string
- type RemoveItemsFromCartResponse
- func (*RemoveItemsFromCartResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RemoveItemsFromCartResponse) GetItems() []*CartItem
- func (*RemoveItemsFromCartResponse) ProtoMessage()
- func (x *RemoveItemsFromCartResponse) ProtoReflect() protoreflect.Message
- func (x *RemoveItemsFromCartResponse) Reset()
- func (x *RemoveItemsFromCartResponse) String() string
- type UnimplementedCartServiceServer
- func (UnimplementedCartServiceServer) AddToCart(context.Context, *NewCartItem) (*CartItem, error)
- func (UnimplementedCartServiceServer) GetUserCart(context.Context, *GetUserCartInput) (*GetUserCartResponse, error)
- func (UnimplementedCartServiceServer) RemoveItemsFromCart(context.Context, *RemoveItemsFromCartInput) (*RemoveItemsFromCartResponse, error)
- type UnimplementedProductServiceServer
- type UnimplementedUserServiceServer
- func (UnimplementedUserServiceServer) CreateUser(context.Context, *NewUser) (*User, error)
- func (UnimplementedUserServiceServer) GetUserFromJWT(context.Context, *GetUserFromJWTInput) (*GetUserFromJWTResponse, error)
- func (UnimplementedUserServiceServer) GetUsers(context.Context, *GetUsersFilter) (*GetUsersResponse, error)
- func (UnimplementedUserServiceServer) LoginUser(context.Context, *LoginInput) (*LoginResponse, error)
- type UnsafeCartServiceServer
- type UnsafeProductServiceServer
- type UnsafeUserServiceServer
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetCountry() string
- func (x *User) GetEmail() string
- func (x *User) GetFullName() string
- func (x *User) GetId() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserServiceClient
- type UserServiceServer
Constants ¶
This section is empty.
Variables ¶
var CartService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "CartService", HandlerType: (*CartServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "AddToCart", Handler: _CartService_AddToCart_Handler, }, { MethodName: "GetUserCart", Handler: _CartService_GetUserCart_Handler, }, { MethodName: "RemoveItemsFromCart", Handler: _CartService_RemoveItemsFromCart_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto-files/cart.proto", }
CartService_ServiceDesc is the grpc.ServiceDesc for CartService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_proto_files_cart_proto protoreflect.FileDescriptor
var File_proto_files_product_proto protoreflect.FileDescriptor
var File_proto_files_user_proto protoreflect.FileDescriptor
var ProductService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "ProductService", HandlerType: (*ProductServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "AddProduct", Handler: _ProductService_AddProduct_Handler, }, { MethodName: "GetProduct", Handler: _ProductService_GetProduct_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto-files/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)
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateUser", Handler: _UserService_CreateUser_Handler, }, { MethodName: "GetUsers", Handler: _UserService_GetUsers_Handler, }, { MethodName: "LoginUser", Handler: _UserService_LoginUser_Handler, }, { MethodName: "GetUserFromJWT", Handler: _UserService_GetUserFromJWT_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto-files/user.proto", }
UserService_ServiceDesc is the grpc.ServiceDesc for UserService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterCartServiceServer ¶
func RegisterCartServiceServer(s grpc.ServiceRegistrar, srv CartServiceServer)
func RegisterProductServiceServer ¶
func RegisterProductServiceServer(s grpc.ServiceRegistrar, srv ProductServiceServer)
func RegisterUserServiceServer ¶
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
Types ¶
type CartItem ¶
type CartItem struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` ProductSku string `protobuf:"bytes,2,opt,name=productSku,proto3" json:"productSku,omitempty"` UserId string `protobuf:"bytes,3,opt,name=userId,proto3" json:"userId,omitempty"` Quantity int32 `protobuf:"varint,4,opt,name=quantity,proto3" json:"quantity,omitempty"` // contains filtered or unexported fields }
func (*CartItem) Descriptor
deprecated
func (*CartItem) GetProductSku ¶
func (*CartItem) GetQuantity ¶
func (*CartItem) ProtoMessage ¶
func (*CartItem) ProtoMessage()
func (*CartItem) ProtoReflect ¶
func (x *CartItem) ProtoReflect() protoreflect.Message
type CartServiceClient ¶
type CartServiceClient interface { AddToCart(ctx context.Context, in *NewCartItem, opts ...grpc.CallOption) (*CartItem, error) GetUserCart(ctx context.Context, in *GetUserCartInput, opts ...grpc.CallOption) (*GetUserCartResponse, error) RemoveItemsFromCart(ctx context.Context, in *RemoveItemsFromCartInput, opts ...grpc.CallOption) (*RemoveItemsFromCartResponse, error) }
CartServiceClient is the client API for CartService 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 NewCartServiceClient ¶
func NewCartServiceClient(cc grpc.ClientConnInterface) CartServiceClient
type CartServiceServer ¶
type CartServiceServer interface { AddToCart(context.Context, *NewCartItem) (*CartItem, error) GetUserCart(context.Context, *GetUserCartInput) (*GetUserCartResponse, error) RemoveItemsFromCart(context.Context, *RemoveItemsFromCartInput) (*RemoveItemsFromCartResponse, error) // contains filtered or unexported methods }
CartServiceServer is the server API for CartService service. All implementations must embed UnimplementedCartServiceServer for forward compatibility
type GetProductInput ¶
type GetProductInput struct { Sku string `protobuf:"bytes,1,opt,name=sku,proto3" json:"sku,omitempty"` // contains filtered or unexported fields }
func (*GetProductInput) Descriptor
deprecated
func (*GetProductInput) Descriptor() ([]byte, []int)
Deprecated: Use GetProductInput.ProtoReflect.Descriptor instead.
func (*GetProductInput) GetSku ¶
func (x *GetProductInput) GetSku() string
func (*GetProductInput) ProtoMessage ¶
func (*GetProductInput) ProtoMessage()
func (*GetProductInput) ProtoReflect ¶
func (x *GetProductInput) ProtoReflect() protoreflect.Message
func (*GetProductInput) Reset ¶
func (x *GetProductInput) Reset()
func (*GetProductInput) String ¶
func (x *GetProductInput) String() string
type GetUserCartInput ¶
type GetUserCartInput struct { UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` // contains filtered or unexported fields }
func (*GetUserCartInput) Descriptor
deprecated
func (*GetUserCartInput) Descriptor() ([]byte, []int)
Deprecated: Use GetUserCartInput.ProtoReflect.Descriptor instead.
func (*GetUserCartInput) GetUserId ¶
func (x *GetUserCartInput) GetUserId() string
func (*GetUserCartInput) ProtoMessage ¶
func (*GetUserCartInput) ProtoMessage()
func (*GetUserCartInput) ProtoReflect ¶
func (x *GetUserCartInput) ProtoReflect() protoreflect.Message
func (*GetUserCartInput) Reset ¶
func (x *GetUserCartInput) Reset()
func (*GetUserCartInput) String ¶
func (x *GetUserCartInput) String() string
type GetUserCartResponse ¶
type GetUserCartResponse struct { Items []*CartItem `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` // contains filtered or unexported fields }
func (*GetUserCartResponse) Descriptor
deprecated
func (*GetUserCartResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetUserCartResponse.ProtoReflect.Descriptor instead.
func (*GetUserCartResponse) GetItems ¶
func (x *GetUserCartResponse) GetItems() []*CartItem
func (*GetUserCartResponse) ProtoMessage ¶
func (*GetUserCartResponse) ProtoMessage()
func (*GetUserCartResponse) ProtoReflect ¶
func (x *GetUserCartResponse) ProtoReflect() protoreflect.Message
func (*GetUserCartResponse) Reset ¶
func (x *GetUserCartResponse) Reset()
func (*GetUserCartResponse) String ¶
func (x *GetUserCartResponse) String() string
type GetUserFromJWTInput ¶
type GetUserFromJWTInput struct { JwtToken string `protobuf:"bytes,1,opt,name=jwtToken,proto3" json:"jwtToken,omitempty"` // contains filtered or unexported fields }
func (*GetUserFromJWTInput) Descriptor
deprecated
func (*GetUserFromJWTInput) Descriptor() ([]byte, []int)
Deprecated: Use GetUserFromJWTInput.ProtoReflect.Descriptor instead.
func (*GetUserFromJWTInput) GetJwtToken ¶
func (x *GetUserFromJWTInput) GetJwtToken() string
func (*GetUserFromJWTInput) ProtoMessage ¶
func (*GetUserFromJWTInput) ProtoMessage()
func (*GetUserFromJWTInput) ProtoReflect ¶
func (x *GetUserFromJWTInput) ProtoReflect() protoreflect.Message
func (*GetUserFromJWTInput) Reset ¶
func (x *GetUserFromJWTInput) Reset()
func (*GetUserFromJWTInput) String ¶
func (x *GetUserFromJWTInput) String() string
type GetUserFromJWTResponse ¶
type GetUserFromJWTResponse struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*GetUserFromJWTResponse) Descriptor
deprecated
func (*GetUserFromJWTResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetUserFromJWTResponse.ProtoReflect.Descriptor instead.
func (*GetUserFromJWTResponse) GetUser ¶
func (x *GetUserFromJWTResponse) GetUser() *User
func (*GetUserFromJWTResponse) ProtoMessage ¶
func (*GetUserFromJWTResponse) ProtoMessage()
func (*GetUserFromJWTResponse) ProtoReflect ¶
func (x *GetUserFromJWTResponse) ProtoReflect() protoreflect.Message
func (*GetUserFromJWTResponse) Reset ¶
func (x *GetUserFromJWTResponse) Reset()
func (*GetUserFromJWTResponse) String ¶
func (x *GetUserFromJWTResponse) String() string
type GetUsersFilter ¶
type GetUsersFilter struct { AfterId string `protobuf:"bytes,1,opt,name=afterId,proto3" json:"afterId,omitempty"` Limit int32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` // contains filtered or unexported fields }
func (*GetUsersFilter) Descriptor
deprecated
func (*GetUsersFilter) Descriptor() ([]byte, []int)
Deprecated: Use GetUsersFilter.ProtoReflect.Descriptor instead.
func (*GetUsersFilter) GetAfterId ¶
func (x *GetUsersFilter) GetAfterId() string
func (*GetUsersFilter) GetLimit ¶
func (x *GetUsersFilter) GetLimit() int32
func (*GetUsersFilter) ProtoMessage ¶
func (*GetUsersFilter) ProtoMessage()
func (*GetUsersFilter) ProtoReflect ¶
func (x *GetUsersFilter) ProtoReflect() protoreflect.Message
func (*GetUsersFilter) Reset ¶
func (x *GetUsersFilter) Reset()
func (*GetUsersFilter) String ¶
func (x *GetUsersFilter) String() string
type GetUsersResponse ¶
type GetUsersResponse struct { Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"` // contains filtered or unexported fields }
func (*GetUsersResponse) Descriptor
deprecated
func (*GetUsersResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetUsersResponse.ProtoReflect.Descriptor instead.
func (*GetUsersResponse) GetUsers ¶
func (x *GetUsersResponse) GetUsers() []*User
func (*GetUsersResponse) ProtoMessage ¶
func (*GetUsersResponse) ProtoMessage()
func (*GetUsersResponse) ProtoReflect ¶
func (x *GetUsersResponse) ProtoReflect() protoreflect.Message
func (*GetUsersResponse) Reset ¶
func (x *GetUsersResponse) Reset()
func (*GetUsersResponse) String ¶
func (x *GetUsersResponse) String() string
type LoginInput ¶
type LoginInput struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*LoginInput) Descriptor
deprecated
func (*LoginInput) Descriptor() ([]byte, []int)
Deprecated: Use LoginInput.ProtoReflect.Descriptor instead.
func (*LoginInput) GetEmail ¶
func (x *LoginInput) GetEmail() string
func (*LoginInput) GetPassword ¶
func (x *LoginInput) GetPassword() string
func (*LoginInput) ProtoMessage ¶
func (*LoginInput) ProtoMessage()
func (*LoginInput) ProtoReflect ¶
func (x *LoginInput) ProtoReflect() protoreflect.Message
func (*LoginInput) Reset ¶
func (x *LoginInput) Reset()
func (*LoginInput) String ¶
func (x *LoginInput) String() string
type LoginResponse ¶
type LoginResponse struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` JwtToken string `protobuf:"bytes,2,opt,name=jwtToken,proto3" json:"jwtToken,omitempty"` // contains filtered or unexported fields }
func (*LoginResponse) Descriptor
deprecated
func (*LoginResponse) Descriptor() ([]byte, []int)
Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.
func (*LoginResponse) GetJwtToken ¶
func (x *LoginResponse) GetJwtToken() string
func (*LoginResponse) GetUser ¶
func (x *LoginResponse) GetUser() *User
func (*LoginResponse) ProtoMessage ¶
func (*LoginResponse) ProtoMessage()
func (*LoginResponse) ProtoReflect ¶
func (x *LoginResponse) ProtoReflect() protoreflect.Message
func (*LoginResponse) Reset ¶
func (x *LoginResponse) Reset()
func (*LoginResponse) String ¶
func (x *LoginResponse) String() string
type NewCartItem ¶
type NewCartItem struct { ProductSku string `protobuf:"bytes,1,opt,name=productSku,proto3" json:"productSku,omitempty"` UserId string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId,omitempty"` Quantity int32 `protobuf:"varint,3,opt,name=quantity,proto3" json:"quantity,omitempty"` // contains filtered or unexported fields }
func (*NewCartItem) Descriptor
deprecated
func (*NewCartItem) Descriptor() ([]byte, []int)
Deprecated: Use NewCartItem.ProtoReflect.Descriptor instead.
func (*NewCartItem) GetProductSku ¶
func (x *NewCartItem) GetProductSku() string
func (*NewCartItem) GetQuantity ¶
func (x *NewCartItem) GetQuantity() int32
func (*NewCartItem) GetUserId ¶
func (x *NewCartItem) GetUserId() string
func (*NewCartItem) ProtoMessage ¶
func (*NewCartItem) ProtoMessage()
func (*NewCartItem) ProtoReflect ¶
func (x *NewCartItem) ProtoReflect() protoreflect.Message
func (*NewCartItem) Reset ¶
func (x *NewCartItem) Reset()
func (*NewCartItem) String ¶
func (x *NewCartItem) String() string
type NewProduct ¶
type NewProduct 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"` Category string `protobuf:"bytes,3,opt,name=category,proto3" json:"category,omitempty"` Brand string `protobuf:"bytes,4,opt,name=brand,proto3" json:"brand,omitempty"` Price float64 `protobuf:"fixed64,5,opt,name=price,proto3" json:"price,omitempty"` ImageUrl string `protobuf:"bytes,6,opt,name=imageUrl,proto3" json:"imageUrl,omitempty"` // contains filtered or unexported fields }
func (*NewProduct) Descriptor
deprecated
func (*NewProduct) Descriptor() ([]byte, []int)
Deprecated: Use NewProduct.ProtoReflect.Descriptor instead.
func (*NewProduct) GetBrand ¶
func (x *NewProduct) GetBrand() string
func (*NewProduct) GetCategory ¶
func (x *NewProduct) GetCategory() string
func (*NewProduct) GetDescription ¶
func (x *NewProduct) GetDescription() string
func (*NewProduct) GetImageUrl ¶
func (x *NewProduct) GetImageUrl() string
func (*NewProduct) GetName ¶
func (x *NewProduct) GetName() string
func (*NewProduct) GetPrice ¶
func (x *NewProduct) GetPrice() float64
func (*NewProduct) ProtoMessage ¶
func (*NewProduct) ProtoMessage()
func (*NewProduct) ProtoReflect ¶
func (x *NewProduct) ProtoReflect() protoreflect.Message
func (*NewProduct) Reset ¶
func (x *NewProduct) Reset()
func (*NewProduct) String ¶
func (x *NewProduct) String() string
type NewUser ¶
type NewUser struct { FullName string `protobuf:"bytes,1,opt,name=fullName,proto3" json:"fullName,omitempty"` Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` Country string `protobuf:"bytes,4,opt,name=country,proto3" json:"country,omitempty"` // contains filtered or unexported fields }
func (*NewUser) Descriptor
deprecated
func (*NewUser) GetCountry ¶
func (*NewUser) GetFullName ¶
func (*NewUser) GetPassword ¶
func (*NewUser) ProtoMessage ¶
func (*NewUser) ProtoMessage()
func (*NewUser) ProtoReflect ¶
func (x *NewUser) ProtoReflect() protoreflect.Message
type Product ¶
type Product struct { Sku string `protobuf:"bytes,1,opt,name=sku,proto3" json:"sku,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"` Category string `protobuf:"bytes,4,opt,name=category,proto3" json:"category,omitempty"` Brand string `protobuf:"bytes,5,opt,name=brand,proto3" json:"brand,omitempty"` Price float64 `protobuf:"fixed64,6,opt,name=price,proto3" json:"price,omitempty"` ImageUrl string `protobuf:"bytes,7,opt,name=imageUrl,proto3" json:"imageUrl,omitempty"` MerchantId string `protobuf:"bytes,8,opt,name=merchantId,proto3" json:"merchantId,omitempty"` // contains filtered or unexported fields }
func (*Product) Descriptor
deprecated
func (*Product) GetCategory ¶
func (*Product) GetDescription ¶
func (*Product) GetImageUrl ¶
func (*Product) GetMerchantId ¶
func (*Product) ProtoMessage ¶
func (*Product) ProtoMessage()
func (*Product) ProtoReflect ¶
func (x *Product) ProtoReflect() protoreflect.Message
type ProductServiceClient ¶
type ProductServiceClient interface { AddProduct(ctx context.Context, in *NewProduct, opts ...grpc.CallOption) (*Product, error) GetProduct(ctx context.Context, in *GetProductInput, 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.
func NewProductServiceClient ¶
func NewProductServiceClient(cc grpc.ClientConnInterface) ProductServiceClient
type ProductServiceServer ¶
type ProductServiceServer interface { AddProduct(context.Context, *NewProduct) (*Product, error) GetProduct(context.Context, *GetProductInput) (*Product, error) // contains filtered or unexported methods }
ProductServiceServer is the server API for ProductService service. All implementations must embed UnimplementedProductServiceServer for forward compatibility
type RemoveItemsFromCartInput ¶
type RemoveItemsFromCartInput struct { UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` ItemIds []string `protobuf:"bytes,2,rep,name=itemIds,proto3" json:"itemIds,omitempty"` // contains filtered or unexported fields }
func (*RemoveItemsFromCartInput) Descriptor
deprecated
func (*RemoveItemsFromCartInput) Descriptor() ([]byte, []int)
Deprecated: Use RemoveItemsFromCartInput.ProtoReflect.Descriptor instead.
func (*RemoveItemsFromCartInput) GetItemIds ¶
func (x *RemoveItemsFromCartInput) GetItemIds() []string
func (*RemoveItemsFromCartInput) GetUserId ¶
func (x *RemoveItemsFromCartInput) GetUserId() string
func (*RemoveItemsFromCartInput) ProtoMessage ¶
func (*RemoveItemsFromCartInput) ProtoMessage()
func (*RemoveItemsFromCartInput) ProtoReflect ¶
func (x *RemoveItemsFromCartInput) ProtoReflect() protoreflect.Message
func (*RemoveItemsFromCartInput) Reset ¶
func (x *RemoveItemsFromCartInput) Reset()
func (*RemoveItemsFromCartInput) String ¶
func (x *RemoveItemsFromCartInput) String() string
type RemoveItemsFromCartResponse ¶
type RemoveItemsFromCartResponse struct { Items []*CartItem `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` // contains filtered or unexported fields }
func (*RemoveItemsFromCartResponse) Descriptor
deprecated
func (*RemoveItemsFromCartResponse) Descriptor() ([]byte, []int)
Deprecated: Use RemoveItemsFromCartResponse.ProtoReflect.Descriptor instead.
func (*RemoveItemsFromCartResponse) GetItems ¶
func (x *RemoveItemsFromCartResponse) GetItems() []*CartItem
func (*RemoveItemsFromCartResponse) ProtoMessage ¶
func (*RemoveItemsFromCartResponse) ProtoMessage()
func (*RemoveItemsFromCartResponse) ProtoReflect ¶
func (x *RemoveItemsFromCartResponse) ProtoReflect() protoreflect.Message
func (*RemoveItemsFromCartResponse) Reset ¶
func (x *RemoveItemsFromCartResponse) Reset()
func (*RemoveItemsFromCartResponse) String ¶
func (x *RemoveItemsFromCartResponse) String() string
type UnimplementedCartServiceServer ¶
type UnimplementedCartServiceServer struct { }
UnimplementedCartServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedCartServiceServer) AddToCart ¶
func (UnimplementedCartServiceServer) AddToCart(context.Context, *NewCartItem) (*CartItem, error)
func (UnimplementedCartServiceServer) GetUserCart ¶
func (UnimplementedCartServiceServer) GetUserCart(context.Context, *GetUserCartInput) (*GetUserCartResponse, error)
func (UnimplementedCartServiceServer) RemoveItemsFromCart ¶
func (UnimplementedCartServiceServer) RemoveItemsFromCart(context.Context, *RemoveItemsFromCartInput) (*RemoveItemsFromCartResponse, error)
type UnimplementedProductServiceServer ¶
type UnimplementedProductServiceServer struct { }
UnimplementedProductServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedProductServiceServer) AddProduct ¶
func (UnimplementedProductServiceServer) AddProduct(context.Context, *NewProduct) (*Product, error)
func (UnimplementedProductServiceServer) GetProduct ¶
func (UnimplementedProductServiceServer) GetProduct(context.Context, *GetProductInput) (*Product, error)
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct { }
UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedUserServiceServer) CreateUser ¶
func (UnimplementedUserServiceServer) GetUserFromJWT ¶
func (UnimplementedUserServiceServer) GetUserFromJWT(context.Context, *GetUserFromJWTInput) (*GetUserFromJWTResponse, error)
func (UnimplementedUserServiceServer) GetUsers ¶
func (UnimplementedUserServiceServer) GetUsers(context.Context, *GetUsersFilter) (*GetUsersResponse, error)
func (UnimplementedUserServiceServer) LoginUser ¶
func (UnimplementedUserServiceServer) LoginUser(context.Context, *LoginInput) (*LoginResponse, error)
type UnsafeCartServiceServer ¶
type UnsafeCartServiceServer interface {
// contains filtered or unexported methods
}
UnsafeCartServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CartServiceServer will result in compilation errors.
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 UnsafeUserServiceServer ¶
type UnsafeUserServiceServer interface {
// contains filtered or unexported methods
}
UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServiceServer will result in compilation errors.
type User ¶
type User struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` FullName string `protobuf:"bytes,2,opt,name=fullName,proto3" json:"fullName,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` Country string `protobuf:"bytes,4,opt,name=country,proto3" json:"country,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetCountry ¶
func (*User) GetFullName ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserServiceClient ¶
type UserServiceClient interface { CreateUser(ctx context.Context, in *NewUser, opts ...grpc.CallOption) (*User, error) GetUsers(ctx context.Context, in *GetUsersFilter, opts ...grpc.CallOption) (*GetUsersResponse, error) LoginUser(ctx context.Context, in *LoginInput, opts ...grpc.CallOption) (*LoginResponse, error) GetUserFromJWT(ctx context.Context, in *GetUserFromJWTInput, opts ...grpc.CallOption) (*GetUserFromJWTResponse, error) }
UserServiceClient is the client API for UserService 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 NewUserServiceClient ¶
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient
type UserServiceServer ¶
type UserServiceServer interface { CreateUser(context.Context, *NewUser) (*User, error) GetUsers(context.Context, *GetUsersFilter) (*GetUsersResponse, error) LoginUser(context.Context, *LoginInput) (*LoginResponse, error) GetUserFromJWT(context.Context, *GetUserFromJWTInput) (*GetUserFromJWTResponse, error) // contains filtered or unexported methods }
UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility