user_grpc

package
v0.0.0-...-c1a9489 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var User_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "shop.User",
	HandlerType: (*UserServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Signin",
			Handler:    _User_Signin_Handler,
		},
		{
			MethodName: "Signup",
			Handler:    _User_Signup_Handler,
		},
		{
			MethodName: "GetUser",
			Handler:    _User_GetUser_Handler,
		},
		{
			MethodName: "DeleteUser",
			Handler:    _User_DeleteUser_Handler,
		},
		{
			MethodName: "EditUser",
			Handler:    _User_EditUser_Handler,
		},
		{
			MethodName: "ChangePassword",
			Handler:    _User_ChangePassword_Handler,
		},
		{
			MethodName: "AddToCart",
			Handler:    _User_AddToCart_Handler,
		},
		{
			MethodName: "DeleteFromCart",
			Handler:    _User_DeleteFromCart_Handler,
		},
		{
			MethodName: "UpdateCart",
			Handler:    _User_UpdateCart_Handler,
		},
		{
			MethodName: "Cart",
			Handler:    _User_Cart_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "UserList",
			Handler:       _User_UserList_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "user.proto",
}

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

Functions

func RegisterUserServer

func RegisterUserServer(s grpc.ServiceRegistrar, srv UserServer)

Types

type AddToCartRequest

type AddToCartRequest struct {
	UserId  string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	ItemId  string `protobuf:"bytes,2,opt,name=item_id,json=itemId,proto3" json:"item_id,omitempty"`
	Quntity uint32 `protobuf:"varint,3,opt,name=quntity,proto3" json:"quntity,omitempty"`
	// contains filtered or unexported fields
}

func (*AddToCartRequest) Descriptor deprecated

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

Deprecated: Use AddToCartRequest.ProtoReflect.Descriptor instead.

func (*AddToCartRequest) GetItemId

func (x *AddToCartRequest) GetItemId() string

func (*AddToCartRequest) GetQuntity

func (x *AddToCartRequest) GetQuntity() uint32

func (*AddToCartRequest) GetUserId

func (x *AddToCartRequest) GetUserId() string

func (*AddToCartRequest) ProtoMessage

func (*AddToCartRequest) ProtoMessage()

func (*AddToCartRequest) ProtoReflect

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

func (*AddToCartRequest) Reset

func (x *AddToCartRequest) Reset()

func (*AddToCartRequest) String

func (x *AddToCartRequest) String() string

type Address

type Address struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Phone   string `protobuf:"bytes,2,opt,name=phone,proto3" json:"phone,omitempty"`
	// contains filtered or unexported fields
}

func (*Address) Descriptor deprecated

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

Deprecated: Use Address.ProtoReflect.Descriptor instead.

func (*Address) GetAddress

func (x *Address) GetAddress() string

func (*Address) GetPhone

func (x *Address) GetPhone() string

func (*Address) ProtoMessage

func (*Address) ProtoMessage()

func (*Address) ProtoReflect

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

func (*Address) Reset

func (x *Address) Reset()

func (*Address) String

func (x *Address) String() string

type CartItem

type CartItem 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"`
	Link   string  `protobuf:"bytes,3,opt,name=link,proto3" json:"link,omitempty"`
	Poster string  `protobuf:"bytes,4,opt,name=poster,proto3" json:"poster,omitempty"`
	Price  float32 `protobuf:"fixed32,5,opt,name=price,proto3" json:"price,omitempty"`
	// contains filtered or unexported fields
}

func (*CartItem) Descriptor deprecated

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

Deprecated: Use CartItem.ProtoReflect.Descriptor instead.

func (*CartItem) GetId

func (x *CartItem) GetId() string
func (x *CartItem) GetLink() string

func (*CartItem) GetName

func (x *CartItem) GetName() string

func (*CartItem) GetPoster

func (x *CartItem) GetPoster() string

func (*CartItem) GetPrice

func (x *CartItem) GetPrice() float32

func (*CartItem) ProtoMessage

func (*CartItem) ProtoMessage()

func (*CartItem) ProtoReflect

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

func (*CartItem) Reset

func (x *CartItem) Reset()

func (*CartItem) String

func (x *CartItem) String() string

type CartResponse

type CartResponse struct {
	Item []*CartItem `protobuf:"bytes,1,rep,name=item,proto3" json:"item,omitempty"`
	// contains filtered or unexported fields
}

func (*CartResponse) Descriptor deprecated

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

Deprecated: Use CartResponse.ProtoReflect.Descriptor instead.

func (*CartResponse) GetItem

func (x *CartResponse) GetItem() []*CartItem

func (*CartResponse) ProtoMessage

func (*CartResponse) ProtoMessage()

func (*CartResponse) ProtoReflect

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

func (*CartResponse) Reset

func (x *CartResponse) Reset()

func (*CartResponse) String

func (x *CartResponse) String() string

type ChangePasswordRequest

type ChangePasswordRequest struct {
	Id          string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	OldPassword string `protobuf:"bytes,2,opt,name=oldPassword,proto3" json:"oldPassword,omitempty"`
	NewPassword string `protobuf:"bytes,3,opt,name=newPassword,proto3" json:"newPassword,omitempty"`
	// contains filtered or unexported fields
}

func (*ChangePasswordRequest) Descriptor deprecated

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

Deprecated: Use ChangePasswordRequest.ProtoReflect.Descriptor instead.

func (*ChangePasswordRequest) GetId

func (x *ChangePasswordRequest) GetId() string

func (*ChangePasswordRequest) GetNewPassword

func (x *ChangePasswordRequest) GetNewPassword() string

func (*ChangePasswordRequest) GetOldPassword

func (x *ChangePasswordRequest) GetOldPassword() string

func (*ChangePasswordRequest) ProtoMessage

func (*ChangePasswordRequest) ProtoMessage()

func (*ChangePasswordRequest) ProtoReflect

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

func (*ChangePasswordRequest) Reset

func (x *ChangePasswordRequest) Reset()

func (*ChangePasswordRequest) String

func (x *ChangePasswordRequest) String() string

type DeleteFromCartRequest

type DeleteFromCartRequest struct {
	UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	ItemId string `protobuf:"bytes,2,opt,name=item_id,json=itemId,proto3" json:"item_id,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteFromCartRequest) Descriptor deprecated

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

Deprecated: Use DeleteFromCartRequest.ProtoReflect.Descriptor instead.

func (*DeleteFromCartRequest) GetItemId

func (x *DeleteFromCartRequest) GetItemId() string

func (*DeleteFromCartRequest) GetUserId

func (x *DeleteFromCartRequest) GetUserId() string

func (*DeleteFromCartRequest) ProtoMessage

func (*DeleteFromCartRequest) ProtoMessage()

func (*DeleteFromCartRequest) ProtoReflect

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

func (*DeleteFromCartRequest) Reset

func (x *DeleteFromCartRequest) Reset()

func (*DeleteFromCartRequest) String

func (x *DeleteFromCartRequest) String() string

type EditUserRequest

type EditUserRequest struct {
	Id      string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Email   string   `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	Address *Address `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

func (*EditUserRequest) Descriptor deprecated

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

Deprecated: Use EditUserRequest.ProtoReflect.Descriptor instead.

func (*EditUserRequest) GetAddress

func (x *EditUserRequest) GetAddress() *Address

func (*EditUserRequest) GetEmail

func (x *EditUserRequest) GetEmail() string

func (*EditUserRequest) GetId

func (x *EditUserRequest) GetId() string

func (*EditUserRequest) ProtoMessage

func (*EditUserRequest) ProtoMessage()

func (*EditUserRequest) ProtoReflect

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

func (*EditUserRequest) Reset

func (x *EditUserRequest) Reset()

func (*EditUserRequest) String

func (x *EditUserRequest) String() string

type GetUserResponse

type GetUserResponse struct {
	Username string   `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Email    string   `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	Role     uint32   `protobuf:"varint,3,opt,name=role,proto3" json:"role,omitempty"`
	Status   bool     `protobuf:"varint,4,opt,name=status,proto3" json:"status,omitempty"`
	Address  *Address `protobuf:"bytes,5,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserResponse) Descriptor deprecated

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

Deprecated: Use GetUserResponse.ProtoReflect.Descriptor instead.

func (*GetUserResponse) GetAddress

func (x *GetUserResponse) GetAddress() *Address

func (*GetUserResponse) GetEmail

func (x *GetUserResponse) GetEmail() string

func (*GetUserResponse) GetRole

func (x *GetUserResponse) GetRole() uint32

func (*GetUserResponse) GetStatus

func (x *GetUserResponse) GetStatus() bool

func (*GetUserResponse) GetUsername

func (x *GetUserResponse) GetUsername() string

func (*GetUserResponse) ProtoMessage

func (*GetUserResponse) ProtoMessage()

func (*GetUserResponse) ProtoReflect

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

func (*GetUserResponse) Reset

func (x *GetUserResponse) Reset()

func (*GetUserResponse) String

func (x *GetUserResponse) String() string

type SigninRequest

type SigninRequest struct {
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*SigninRequest) Descriptor deprecated

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

Deprecated: Use SigninRequest.ProtoReflect.Descriptor instead.

func (*SigninRequest) GetPassword

func (x *SigninRequest) GetPassword() string

func (*SigninRequest) GetUsername

func (x *SigninRequest) GetUsername() string

func (*SigninRequest) ProtoMessage

func (*SigninRequest) ProtoMessage()

func (*SigninRequest) ProtoReflect

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

func (*SigninRequest) Reset

func (x *SigninRequest) Reset()

func (*SigninRequest) String

func (x *SigninRequest) String() string

type SignupRequest

type SignupRequest struct {
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,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"`
	Role     uint32 `protobuf:"varint,4,opt,name=role,proto3" json:"role,omitempty"`
	// contains filtered or unexported fields
}

func (*SignupRequest) Descriptor deprecated

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

Deprecated: Use SignupRequest.ProtoReflect.Descriptor instead.

func (*SignupRequest) GetEmail

func (x *SignupRequest) GetEmail() string

func (*SignupRequest) GetPassword

func (x *SignupRequest) GetPassword() string

func (*SignupRequest) GetRole

func (x *SignupRequest) GetRole() uint32

func (*SignupRequest) GetUsername

func (x *SignupRequest) GetUsername() string

func (*SignupRequest) ProtoMessage

func (*SignupRequest) ProtoMessage()

func (*SignupRequest) ProtoReflect

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

func (*SignupRequest) Reset

func (x *SignupRequest) Reset()

func (*SignupRequest) String

func (x *SignupRequest) String() string

type UnimplementedUserServer

type UnimplementedUserServer struct {
}

UnimplementedUserServer must be embedded to have forward compatible implementations.

func (UnimplementedUserServer) AddToCart

func (UnimplementedUserServer) Cart

func (UnimplementedUserServer) ChangePassword

func (UnimplementedUserServer) DeleteFromCart

func (UnimplementedUserServer) DeleteUser

func (UnimplementedUserServer) EditUser

func (UnimplementedUserServer) GetUser

func (UnimplementedUserServer) Signin

func (UnimplementedUserServer) Signup

func (UnimplementedUserServer) UpdateCart

func (UnimplementedUserServer) UserList

type UnsafeUserServer

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

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

type UpdateCartRequest

type UpdateCartRequest struct {
	UserId      string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	ItemId      string `protobuf:"bytes,2,opt,name=item_id,json=itemId,proto3" json:"item_id,omitempty"`
	NewQuantity uint32 `protobuf:"varint,3,opt,name=new_quantity,json=newQuantity,proto3" json:"new_quantity,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateCartRequest) Descriptor deprecated

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

Deprecated: Use UpdateCartRequest.ProtoReflect.Descriptor instead.

func (*UpdateCartRequest) GetItemId

func (x *UpdateCartRequest) GetItemId() string

func (*UpdateCartRequest) GetNewQuantity

func (x *UpdateCartRequest) GetNewQuantity() uint32

func (*UpdateCartRequest) GetUserId

func (x *UpdateCartRequest) GetUserId() string

func (*UpdateCartRequest) ProtoMessage

func (*UpdateCartRequest) ProtoMessage()

func (*UpdateCartRequest) ProtoReflect

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

func (*UpdateCartRequest) Reset

func (x *UpdateCartRequest) Reset()

func (*UpdateCartRequest) String

func (x *UpdateCartRequest) String() string

type UserClient

UserClient is the client API for User 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 NewUserClient

func NewUserClient(cc grpc.ClientConnInterface) UserClient

type UserListResponse

type UserListResponse struct {
	Id       string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	Email    string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
	Role     uint32 `protobuf:"varint,4,opt,name=role,proto3" json:"role,omitempty"`
	Status   bool   `protobuf:"varint,5,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*UserListResponse) Descriptor deprecated

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

Deprecated: Use UserListResponse.ProtoReflect.Descriptor instead.

func (*UserListResponse) GetEmail

func (x *UserListResponse) GetEmail() string

func (*UserListResponse) GetId

func (x *UserListResponse) GetId() string

func (*UserListResponse) GetRole

func (x *UserListResponse) GetRole() uint32

func (*UserListResponse) GetStatus

func (x *UserListResponse) GetStatus() bool

func (*UserListResponse) GetUsername

func (x *UserListResponse) GetUsername() string

func (*UserListResponse) ProtoMessage

func (*UserListResponse) ProtoMessage()

func (*UserListResponse) ProtoReflect

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

func (*UserListResponse) Reset

func (x *UserListResponse) Reset()

func (*UserListResponse) String

func (x *UserListResponse) String() string

type UserServer

UserServer is the server API for User service. All implementations must embed UnimplementedUserServer for forward compatibility

type User_UserListClient

type User_UserListClient interface {
	Recv() (*UserListResponse, error)
	grpc.ClientStream
}

type User_UserListServer

type User_UserListServer interface {
	Send(*UserListResponse) error
	grpc.ServerStream
}

Jump to

Keyboard shortcuts

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