pb

package
v0.0.0-...-77ca5db Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserService_CreateUser_FullMethodName     = "/user.UserService/CreateUser"
	UserService_GetUsers_FullMethodName       = "/user.UserService/GetUsers"
	UserService_GetUserDetails_FullMethodName = "/user.UserService/GetUserDetails"
	UserService_GetReviews_FullMethodName     = "/user.UserService/GetReviews"
	UserService_GetReviewsByID_FullMethodName = "/user.UserService/GetReviewsByID"
)

Variables

View Source
var UserService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "user.UserService",
	HandlerType: (*UserServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateUser",
			Handler:    _UserService_CreateUser_Handler,
		},
		{
			MethodName: "GetUsers",
			Handler:    _UserService_GetUsers_Handler,
		},
		{
			MethodName: "GetUserDetails",
			Handler:    _UserService_GetUserDetails_Handler,
		},
		{
			MethodName: "GetReviews",
			Handler:    _UserService_GetReviews_Handler,
		},
		{
			MethodName: "GetReviewsByID",
			Handler:    _UserService_GetReviewsByID_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "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 RegisterUserServiceServer

func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)

Types

type CreateUserRequest

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

func (*CreateUserRequest) Descriptor deprecated

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

Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.

func (*CreateUserRequest) GetUser

func (x *CreateUserRequest) GetUser() *User

func (*CreateUserRequest) ProtoMessage

func (*CreateUserRequest) ProtoMessage()

func (*CreateUserRequest) ProtoReflect

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

func (*CreateUserRequest) Reset

func (x *CreateUserRequest) Reset()

func (*CreateUserRequest) String

func (x *CreateUserRequest) String() string

type CreateUserResponse

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

func (*CreateUserResponse) Descriptor deprecated

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

Deprecated: Use CreateUserResponse.ProtoReflect.Descriptor instead.

func (*CreateUserResponse) GetId

func (x *CreateUserResponse) GetId() string

func (*CreateUserResponse) ProtoMessage

func (*CreateUserResponse) ProtoMessage()

func (*CreateUserResponse) ProtoReflect

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

func (*CreateUserResponse) Reset

func (x *CreateUserResponse) Reset()

func (*CreateUserResponse) String

func (x *CreateUserResponse) String() string

type Empty

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

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type GetByIDRequest

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

func (*GetByIDRequest) Descriptor deprecated

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

Deprecated: Use GetByIDRequest.ProtoReflect.Descriptor instead.

func (*GetByIDRequest) GetId

func (x *GetByIDRequest) GetId() string

func (*GetByIDRequest) ProtoMessage

func (*GetByIDRequest) ProtoMessage()

func (*GetByIDRequest) ProtoReflect

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

func (*GetByIDRequest) Reset

func (x *GetByIDRequest) Reset()

func (*GetByIDRequest) String

func (x *GetByIDRequest) String() string

type GetReviewsResponse

type GetReviewsResponse struct {
	Reviews []*Review `protobuf:"bytes,1,rep,name=reviews,proto3" json:"reviews,omitempty"`
	// contains filtered or unexported fields
}

func (*GetReviewsResponse) Descriptor deprecated

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

Deprecated: Use GetReviewsResponse.ProtoReflect.Descriptor instead.

func (*GetReviewsResponse) GetReviews

func (x *GetReviewsResponse) GetReviews() []*Review

func (*GetReviewsResponse) ProtoMessage

func (*GetReviewsResponse) ProtoMessage()

func (*GetReviewsResponse) ProtoReflect

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

func (*GetReviewsResponse) Reset

func (x *GetReviewsResponse) Reset()

func (*GetReviewsResponse) String

func (x *GetReviewsResponse) String() string

type Review

type Review struct {
	Id       string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	UserId   string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	DriverId string `protobuf:"bytes,3,opt,name=driver_id,json=driverId,proto3" json:"driver_id,omitempty"`
	Comment  string `protobuf:"bytes,4,opt,name=comment,proto3" json:"comment,omitempty"`
	Star     uint32 `protobuf:"varint,5,opt,name=star,proto3" json:"star,omitempty"`
	// contains filtered or unexported fields
}

func (*Review) Descriptor deprecated

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

Deprecated: Use Review.ProtoReflect.Descriptor instead.

func (*Review) GetComment

func (x *Review) GetComment() string

func (*Review) GetDriverId

func (x *Review) GetDriverId() string

func (*Review) GetId

func (x *Review) GetId() string

func (*Review) GetStar

func (x *Review) GetStar() uint32

func (*Review) GetUserId

func (x *Review) GetUserId() string

func (*Review) ProtoMessage

func (*Review) ProtoMessage()

func (*Review) ProtoReflect

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

func (*Review) Reset

func (x *Review) Reset()

func (*Review) String

func (x *Review) String() string

type UnimplementedUserServiceServer

type UnimplementedUserServiceServer struct{}

UnimplementedUserServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedUserServiceServer) CreateUser

func (UnimplementedUserServiceServer) GetReviews

func (UnimplementedUserServiceServer) GetReviewsByID

func (UnimplementedUserServiceServer) GetUserDetails

func (UnimplementedUserServiceServer) GetUsers

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"`
	Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetId

func (x *User) GetId() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

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

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

type UserServiceClient

type UserServiceClient interface {
	CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error)
	GetUsers(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Users, error)
	GetUserDetails(ctx context.Context, in *GetByIDRequest, opts ...grpc.CallOption) (*User, error)
	GetReviews(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GetReviewsResponse, error)
	GetReviewsByID(ctx context.Context, in *GetByIDRequest, opts ...grpc.CallOption) (*Review, 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.

type UserServiceServer

type UserServiceServer interface {
	CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error)
	GetUsers(context.Context, *Empty) (*Users, error)
	GetUserDetails(context.Context, *GetByIDRequest) (*User, error)
	GetReviews(context.Context, *Empty) (*GetReviewsResponse, error)
	GetReviewsByID(context.Context, *GetByIDRequest) (*Review, error)
	// contains filtered or unexported methods
}

UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility.

type Users

type Users struct {
	Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
	// contains filtered or unexported fields
}

func (*Users) Descriptor deprecated

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

Deprecated: Use Users.ProtoReflect.Descriptor instead.

func (*Users) GetUsers

func (x *Users) GetUsers() []*User

func (*Users) ProtoMessage

func (*Users) ProtoMessage()

func (*Users) ProtoReflect

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

func (*Users) Reset

func (x *Users) Reset()

func (*Users) String

func (x *Users) String() string

Jump to

Keyboard shortcuts

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