proto

package
Version: v0.0.0-...-5bfa564 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_UserSchema_user_proto protoreflect.FileDescriptor
View Source
var Registration_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.Registration",
	HandlerType: (*RegistrationServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateNewUser",
			Handler:    _Registration_CreateNewUser_Handler,
		},
		{
			MethodName: "Login",
			Handler:    _Registration_Login_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "UserSchema/user.proto",
}

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

Functions

func RegisterRegistrationServer

func RegisterRegistrationServer(s grpc.ServiceRegistrar, srv RegistrationServer)

Types

type Profile

type Profile struct {
	Fullname    string `protobuf:"bytes,1,opt,name=fullname,proto3" json:"fullname,omitempty"`
	Password    string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	Email       string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
	IsActivated bool   `protobuf:"varint,4,opt,name=isActivated,proto3" json:"isActivated,omitempty"`
	CreatedDate bool   `protobuf:"varint,5,opt,name=createdDate,proto3" json:"createdDate,omitempty"`
	// contains filtered or unexported fields
}

func (*Profile) Descriptor deprecated

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

Deprecated: Use Profile.ProtoReflect.Descriptor instead.

func (*Profile) GetCreatedDate

func (x *Profile) GetCreatedDate() bool

func (*Profile) GetEmail

func (x *Profile) GetEmail() string

func (*Profile) GetFullname

func (x *Profile) GetFullname() string

func (*Profile) GetIsActivated

func (x *Profile) GetIsActivated() bool

func (*Profile) GetPassword

func (x *Profile) GetPassword() string

func (*Profile) ProtoMessage

func (*Profile) ProtoMessage()

func (*Profile) ProtoReflect

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

func (*Profile) Reset

func (x *Profile) Reset()

func (*Profile) String

func (x *Profile) String() string

type RegistrationClient

type RegistrationClient interface {
	CreateNewUser(ctx context.Context, in *Profile, opts ...grpc.CallOption) (*Profile, error)
	Login(ctx context.Context, in *Token, opts ...grpc.CallOption) (*Profile, error)
}

RegistrationClient is the client API for Registration 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 RegistrationServer

type RegistrationServer interface {
	CreateNewUser(context.Context, *Profile) (*Profile, error)
	Login(context.Context, *Token) (*Profile, error)
	// contains filtered or unexported methods
}

RegistrationServer is the server API for Registration service. All implementations must embed UnimplementedRegistrationServer for forward compatibility

type Token

type Token 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 (*Token) Descriptor deprecated

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

Deprecated: Use Token.ProtoReflect.Descriptor instead.

func (*Token) GetPassword

func (x *Token) GetPassword() string

func (*Token) GetUsername

func (x *Token) GetUsername() string

func (*Token) ProtoMessage

func (*Token) ProtoMessage()

func (*Token) ProtoReflect

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

func (*Token) Reset

func (x *Token) Reset()

func (*Token) String

func (x *Token) String() string

type UnimplementedRegistrationServer

type UnimplementedRegistrationServer struct {
}

UnimplementedRegistrationServer must be embedded to have forward compatible implementations.

func (UnimplementedRegistrationServer) CreateNewUser

func (UnimplementedRegistrationServer) Login

type UnsafeRegistrationServer

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

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

Jump to

Keyboard shortcuts

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