userspb

package
v0.0.0-...-c99c9b3 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_users_proto protoreflect.FileDescriptor
View Source
var UsersService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "userspb.UsersService",
	HandlerType: (*UsersServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Create",
			Handler:    _UsersService_Create_Handler,
		},
		{
			MethodName: "EmailUsed",
			Handler:    _UsersService_EmailUsed_Handler,
		},
		{
			MethodName: "UsernameUsed",
			Handler:    _UsersService_UsernameUsed_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "users.proto",
}

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

Functions

func RegisterUsersServiceServer

func RegisterUsersServiceServer(s grpc.ServiceRegistrar, srv UsersServiceServer)

Types

type CreateRequest

type CreateRequest struct {

	// users first name numberic values not allowed
	FirstName string `protobuf:"bytes,1,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"`
	// users last name numberic values not allowed
	LastName string `protobuf:"bytes,2,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"`
	// users username (unique) numberic values allowed
	Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"`
	// users email must be valid email address
	Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"`
	// password must be greater than 8 character long
	Password string `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

CreateRequest microservice definition of a user

func (*CreateRequest) Descriptor deprecated

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

Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.

func (*CreateRequest) GetEmail

func (x *CreateRequest) GetEmail() string

func (*CreateRequest) GetFirstName

func (x *CreateRequest) GetFirstName() string

func (*CreateRequest) GetLastName

func (x *CreateRequest) GetLastName() string

func (*CreateRequest) GetPassword

func (x *CreateRequest) GetPassword() string

func (*CreateRequest) GetUsername

func (x *CreateRequest) GetUsername() string

func (*CreateRequest) ProtoMessage

func (*CreateRequest) ProtoMessage()

func (*CreateRequest) ProtoReflect

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

func (*CreateRequest) Reset

func (x *CreateRequest) Reset()

func (*CreateRequest) String

func (x *CreateRequest) String() string

type CreateResponse

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

func (*CreateResponse) Descriptor deprecated

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

Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.

func (*CreateResponse) GetToken

func (x *CreateResponse) GetToken() string

func (*CreateResponse) ProtoMessage

func (*CreateResponse) ProtoMessage()

func (*CreateResponse) ProtoReflect

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

func (*CreateResponse) Reset

func (x *CreateResponse) Reset()

func (*CreateResponse) String

func (x *CreateResponse) String() string

type EmailUsedRequest

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

EmailUsed checks if user is already signed up with that email

func (*EmailUsedRequest) Descriptor deprecated

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

Deprecated: Use EmailUsedRequest.ProtoReflect.Descriptor instead.

func (*EmailUsedRequest) GetEmail

func (x *EmailUsedRequest) GetEmail() string

func (*EmailUsedRequest) ProtoMessage

func (*EmailUsedRequest) ProtoMessage()

func (*EmailUsedRequest) ProtoReflect

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

func (*EmailUsedRequest) Reset

func (x *EmailUsedRequest) Reset()

func (*EmailUsedRequest) String

func (x *EmailUsedRequest) String() string

type UnimplementedUsersServiceServer

type UnimplementedUsersServiceServer struct {
}

UnimplementedUsersServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedUsersServiceServer) Create

func (UnimplementedUsersServiceServer) EmailUsed

func (UnimplementedUsersServiceServer) UsernameUsed

type UnsafeUsersServiceServer

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

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

type UsedResponse

type UsedResponse struct {
	Used bool `protobuf:"varint,1,opt,name=used,proto3" json:"used,omitempty"`
	// contains filtered or unexported fields
}

UsedResponse responsed true or false

func (*UsedResponse) Descriptor deprecated

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

Deprecated: Use UsedResponse.ProtoReflect.Descriptor instead.

func (*UsedResponse) GetUsed

func (x *UsedResponse) GetUsed() bool

func (*UsedResponse) ProtoMessage

func (*UsedResponse) ProtoMessage()

func (*UsedResponse) ProtoReflect

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

func (*UsedResponse) Reset

func (x *UsedResponse) Reset()

func (*UsedResponse) String

func (x *UsedResponse) String() string

type UsernameUsedRequest

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

UsernameUsed checks if username has already been taken

func (*UsernameUsedRequest) Descriptor deprecated

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

Deprecated: Use UsernameUsedRequest.ProtoReflect.Descriptor instead.

func (*UsernameUsedRequest) GetUsername

func (x *UsernameUsedRequest) GetUsername() string

func (*UsernameUsedRequest) ProtoMessage

func (*UsernameUsedRequest) ProtoMessage()

func (*UsernameUsedRequest) ProtoReflect

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

func (*UsernameUsedRequest) Reset

func (x *UsernameUsedRequest) Reset()

func (*UsernameUsedRequest) String

func (x *UsernameUsedRequest) String() string

type UsersServiceClient

type UsersServiceClient interface {
	Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error)
	EmailUsed(ctx context.Context, in *EmailUsedRequest, opts ...grpc.CallOption) (*UsedResponse, error)
	UsernameUsed(ctx context.Context, in *UsernameUsedRequest, opts ...grpc.CallOption) (*UsedResponse, error)
}

UsersServiceClient is the client API for UsersService 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 UsersServiceServer

type UsersServiceServer interface {
	Create(context.Context, *CreateRequest) (*CreateResponse, error)
	EmailUsed(context.Context, *EmailUsedRequest) (*UsedResponse, error)
	UsernameUsed(context.Context, *UsernameUsedRequest) (*UsedResponse, error)
	// contains filtered or unexported methods
}

UsersServiceServer is the server API for UsersService service. All implementations must embed UnimplementedUsersServiceServer for forward compatibility

Jump to

Keyboard shortcuts

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