proto

package
v0.0.0-...-fa757dc Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_user_proto protoreflect.FileDescriptor
View Source
var UserService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "user_service.UserService",
	HandlerType: (*UserServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateUser",
			Handler:    _UserService_CreateUser_Handler,
		},
		{
			MethodName: "FindUsers",
			Handler:    _UserService_FindUsers_Handler,
		},
		{
			MethodName: "FindUser",
			Handler:    _UserService_FindUser_Handler,
		},
		{
			MethodName: "DeleteUser",
			Handler:    _UserService_DeleteUser_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "FetchUsers",
			Handler:       _UserService_FetchUsers_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "VerifyUsers",
			Handler:       _UserService_VerifyUsers_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "Chat",
			Handler:       _UserService_Chat_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "proto/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 AuthUser

type AuthUser struct {
	Id          string  `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Firstname   string  `protobuf:"bytes,2,opt,name=firstname,proto3" json:"firstname,omitempty"`
	Lastname    string  `protobuf:"bytes,3,opt,name=lastname,proto3" json:"lastname,omitempty"`
	PhoneNumber *string `protobuf:"bytes,4,opt,name=phoneNumber,proto3,oneof" json:"phoneNumber,omitempty"`
	Email       string  `protobuf:"bytes,5,opt,name=email,proto3" json:"email,omitempty"`
	AccessToken string  `protobuf:"bytes,6,opt,name=accessToken,proto3" json:"accessToken,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthUser) Descriptor deprecated

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

Deprecated: Use AuthUser.ProtoReflect.Descriptor instead.

func (*AuthUser) GetAccessToken

func (x *AuthUser) GetAccessToken() string

func (*AuthUser) GetEmail

func (x *AuthUser) GetEmail() string

func (*AuthUser) GetFirstname

func (x *AuthUser) GetFirstname() string

func (*AuthUser) GetId

func (x *AuthUser) GetId() string

func (*AuthUser) GetLastname

func (x *AuthUser) GetLastname() string

func (*AuthUser) GetPhoneNumber

func (x *AuthUser) GetPhoneNumber() string

func (*AuthUser) ProtoMessage

func (*AuthUser) ProtoMessage()

func (*AuthUser) ProtoReflect

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

func (*AuthUser) Reset

func (x *AuthUser) Reset()

func (*AuthUser) String

func (x *AuthUser) String() string

type ChatMessage

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

func (*ChatMessage) Descriptor deprecated

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

Deprecated: Use ChatMessage.ProtoReflect.Descriptor instead.

func (*ChatMessage) GetMessage

func (x *ChatMessage) GetMessage() string

func (*ChatMessage) ProtoMessage

func (*ChatMessage) ProtoMessage()

func (*ChatMessage) ProtoReflect

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

func (*ChatMessage) Reset

func (x *ChatMessage) Reset()

func (*ChatMessage) String

func (x *ChatMessage) String() string

type NoParams

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

func (*NoParams) Descriptor deprecated

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

Deprecated: Use NoParams.ProtoReflect.Descriptor instead.

func (*NoParams) ProtoMessage

func (*NoParams) ProtoMessage()

func (*NoParams) ProtoReflect

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

func (*NoParams) Reset

func (x *NoParams) Reset()

func (*NoParams) String

func (x *NoParams) String() string

type Params

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

func (*Params) Descriptor deprecated

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

Deprecated: Use Params.ProtoReflect.Descriptor instead.

func (*Params) GetId

func (x *Params) GetId() string

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) ProtoReflect

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

func (*Params) Reset

func (x *Params) Reset()

func (*Params) String

func (x *Params) String() string

type UnimplementedUserServiceServer

type UnimplementedUserServiceServer struct {
}

UnimplementedUserServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedUserServiceServer) Chat

func (UnimplementedUserServiceServer) CreateUser

func (UnimplementedUserServiceServer) DeleteUser

func (UnimplementedUserServiceServer) FetchUsers

func (UnimplementedUserServiceServer) FindUser

func (UnimplementedUserServiceServer) FindUsers

func (UnimplementedUserServiceServer) VerifyUsers

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"`
	Firstname   string  `protobuf:"bytes,2,opt,name=firstname,proto3" json:"firstname,omitempty"`
	Lastname    string  `protobuf:"bytes,3,opt,name=lastname,proto3" json:"lastname,omitempty"`
	PhoneNumber *string `protobuf:"bytes,4,opt,name=phoneNumber,proto3,oneof" json:"phoneNumber,omitempty"`
	Email       string  `protobuf:"bytes,5,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) GetFirstname

func (x *User) GetFirstname() string

func (*User) GetId

func (x *User) GetId() string

func (*User) GetLastname

func (x *User) GetLastname() string

func (*User) GetPhoneNumber

func (x *User) GetPhoneNumber() 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 UserId

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

func (*UserId) Descriptor deprecated

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

Deprecated: Use UserId.ProtoReflect.Descriptor instead.

func (*UserId) GetId

func (x *UserId) GetId() string

func (*UserId) ProtoMessage

func (*UserId) ProtoMessage()

func (*UserId) ProtoReflect

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

func (*UserId) Reset

func (x *UserId) Reset()

func (*UserId) String

func (x *UserId) String() string

type UserParams

type UserParams struct {
	Firstname   string  `protobuf:"bytes,1,opt,name=firstname,proto3" json:"firstname,omitempty"`
	Lastname    string  `protobuf:"bytes,2,opt,name=lastname,proto3" json:"lastname,omitempty"`
	PhoneNumber *string `protobuf:"bytes,3,opt,name=phoneNumber,proto3,oneof" json:"phoneNumber,omitempty"`
	Email       string  `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"`
	Password    string  `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*UserParams) Descriptor deprecated

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

Deprecated: Use UserParams.ProtoReflect.Descriptor instead.

func (*UserParams) GetEmail

func (x *UserParams) GetEmail() string

func (*UserParams) GetFirstname

func (x *UserParams) GetFirstname() string

func (*UserParams) GetLastname

func (x *UserParams) GetLastname() string

func (*UserParams) GetPassword

func (x *UserParams) GetPassword() string

func (*UserParams) GetPhoneNumber

func (x *UserParams) GetPhoneNumber() string

func (*UserParams) ProtoMessage

func (*UserParams) ProtoMessage()

func (*UserParams) ProtoReflect

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

func (*UserParams) Reset

func (x *UserParams) Reset()

func (*UserParams) String

func (x *UserParams) String() string

type UserServiceClient

type UserServiceClient interface {
	CreateUser(ctx context.Context, in *UserParams, opts ...grpc.CallOption) (*AuthUser, error)
	FindUsers(ctx context.Context, in *NoParams, opts ...grpc.CallOption) (*Users, error)
	FetchUsers(ctx context.Context, in *NoParams, opts ...grpc.CallOption) (UserService_FetchUsersClient, error)
	VerifyUsers(ctx context.Context, opts ...grpc.CallOption) (UserService_VerifyUsersClient, error)
	FindUser(ctx context.Context, in *UserId, opts ...grpc.CallOption) (*User, error)
	DeleteUser(ctx context.Context, in *UserId, opts ...grpc.CallOption) (*User, error)
	Chat(ctx context.Context, opts ...grpc.CallOption) (UserService_ChatClient, 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, *UserParams) (*AuthUser, error)
	FindUsers(context.Context, *NoParams) (*Users, error)
	FetchUsers(*NoParams, UserService_FetchUsersServer) error
	VerifyUsers(UserService_VerifyUsersServer) error
	FindUser(context.Context, *UserId) (*User, error)
	DeleteUser(context.Context, *UserId) (*User, error)
	Chat(UserService_ChatServer) error
	// contains filtered or unexported methods
}

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

type UserService_ChatClient

type UserService_ChatClient interface {
	Send(*ChatMessage) error
	Recv() (*ChatMessage, error)
	grpc.ClientStream
}

type UserService_ChatServer

type UserService_ChatServer interface {
	Send(*ChatMessage) error
	Recv() (*ChatMessage, error)
	grpc.ServerStream
}

type UserService_FetchUsersClient

type UserService_FetchUsersClient interface {
	Recv() (*User, error)
	grpc.ClientStream
}

type UserService_FetchUsersServer

type UserService_FetchUsersServer interface {
	Send(*User) error
	grpc.ServerStream
}

type UserService_VerifyUsersClient

type UserService_VerifyUsersClient interface {
	Send(*Params) error
	CloseAndRecv() (*VerificationResponse, error)
	grpc.ClientStream
}

type UserService_VerifyUsersServer

type UserService_VerifyUsersServer interface {
	SendAndClose(*VerificationResponse) error
	Recv() (*Params, error)
	grpc.ServerStream
}

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

type VerificationResponse

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

func (*VerificationResponse) Descriptor deprecated

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

Deprecated: Use VerificationResponse.ProtoReflect.Descriptor instead.

func (*VerificationResponse) GetMessage

func (x *VerificationResponse) GetMessage() string

func (*VerificationResponse) ProtoMessage

func (*VerificationResponse) ProtoMessage()

func (*VerificationResponse) ProtoReflect

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

func (*VerificationResponse) Reset

func (x *VerificationResponse) Reset()

func (*VerificationResponse) String

func (x *VerificationResponse) String() string

Jump to

Keyboard shortcuts

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