proto

package
v0.0.0-...-24d84f2 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Auth_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.Auth",
	HandlerType: (*AuthServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SignUp",
			Handler:    _Auth_SignUp_Handler,
		},
		{
			MethodName: "SignIn",
			Handler:    _Auth_SignIn_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/granny.proto",
}

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

View Source
var File_proto_granny_proto protoreflect.FileDescriptor
View Source
var Room_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.Room",
	HandlerType: (*RoomServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetRoom",
			Handler:    _Room_GetRoom_Handler,
		},
		{
			MethodName: "JoinRoom",
			Handler:    _Room_JoinRoom_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "UserJoined",
			Handler:       _Room_UserJoined_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "proto/granny.proto",
}

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

Functions

func RegisterAuthServer

func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer)

func RegisterRoomServer

func RegisterRoomServer(s grpc.ServiceRegistrar, srv RoomServer)

Types

type AuthClient

type AuthClient interface {
	SignUp(ctx context.Context, in *SignUpRequest, opts ...grpc.CallOption) (*SignUpResponse, error)
	SignIn(ctx context.Context, in *SignInRequest, opts ...grpc.CallOption) (*SignInResponse, error)
}

AuthClient is the client API for Auth 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 NewAuthClient

func NewAuthClient(cc grpc.ClientConnInterface) AuthClient

type AuthServer

type AuthServer interface {
	SignUp(context.Context, *SignUpRequest) (*SignUpResponse, error)
	SignIn(context.Context, *SignInRequest) (*SignInResponse, error)
	// contains filtered or unexported methods
}

AuthServer is the server API for Auth service. All implementations must embed UnimplementedAuthServer for forward compatibility

type GetRoomRequest

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

func (*GetRoomRequest) Descriptor deprecated

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

Deprecated: Use GetRoomRequest.ProtoReflect.Descriptor instead.

func (*GetRoomRequest) ProtoMessage

func (*GetRoomRequest) ProtoMessage()

func (*GetRoomRequest) ProtoReflect

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

func (*GetRoomRequest) Reset

func (x *GetRoomRequest) Reset()

func (*GetRoomRequest) String

func (x *GetRoomRequest) String() string

type GetRoomResponse

type GetRoomResponse struct {
	Users map[int32]*User `` /* 152-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*GetRoomResponse) Descriptor deprecated

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

Deprecated: Use GetRoomResponse.ProtoReflect.Descriptor instead.

func (*GetRoomResponse) GetUsers

func (x *GetRoomResponse) GetUsers() map[int32]*User

func (*GetRoomResponse) ProtoMessage

func (*GetRoomResponse) ProtoMessage()

func (*GetRoomResponse) ProtoReflect

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

func (*GetRoomResponse) Reset

func (x *GetRoomResponse) Reset()

func (*GetRoomResponse) String

func (x *GetRoomResponse) String() string

type JoinRoomReq

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

func (*JoinRoomReq) Descriptor deprecated

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

Deprecated: Use JoinRoomReq.ProtoReflect.Descriptor instead.

func (*JoinRoomReq) GetId

func (x *JoinRoomReq) GetId() string

func (*JoinRoomReq) ProtoMessage

func (*JoinRoomReq) ProtoMessage()

func (*JoinRoomReq) ProtoReflect

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

func (*JoinRoomReq) Reset

func (x *JoinRoomReq) Reset()

func (*JoinRoomReq) String

func (x *JoinRoomReq) String() string

type JoinRoomRes

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

func (*JoinRoomRes) Descriptor deprecated

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

Deprecated: Use JoinRoomRes.ProtoReflect.Descriptor instead.

func (*JoinRoomRes) ProtoMessage

func (*JoinRoomRes) ProtoMessage()

func (*JoinRoomRes) ProtoReflect

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

func (*JoinRoomRes) Reset

func (x *JoinRoomRes) Reset()

func (*JoinRoomRes) String

func (x *JoinRoomRes) String() string

type RoomClient

type RoomClient interface {
	GetRoom(ctx context.Context, in *GetRoomRequest, opts ...grpc.CallOption) (*GetRoomResponse, error)
	JoinRoom(ctx context.Context, in *JoinRoomReq, opts ...grpc.CallOption) (*JoinRoomRes, error)
	UserJoined(ctx context.Context, in *UserJoinedReq, opts ...grpc.CallOption) (Room_UserJoinedClient, error)
}

RoomClient is the client API for Room 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 NewRoomClient

func NewRoomClient(cc grpc.ClientConnInterface) RoomClient

type RoomServer

type RoomServer interface {
	GetRoom(context.Context, *GetRoomRequest) (*GetRoomResponse, error)
	JoinRoom(context.Context, *JoinRoomReq) (*JoinRoomRes, error)
	UserJoined(*UserJoinedReq, Room_UserJoinedServer) error
	// contains filtered or unexported methods
}

RoomServer is the server API for Room service. All implementations must embed UnimplementedRoomServer for forward compatibility

type Room_UserJoinedClient

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

type Room_UserJoinedServer

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

type SignInRequest

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

func (*SignInRequest) Descriptor deprecated

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

Deprecated: Use SignInRequest.ProtoReflect.Descriptor instead.

func (*SignInRequest) GetEmail

func (x *SignInRequest) GetEmail() string

func (*SignInRequest) GetPass

func (x *SignInRequest) GetPass() 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 SignInResponse

type SignInResponse struct {
	Id    int32  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
	Name  string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*SignInResponse) Descriptor deprecated

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

Deprecated: Use SignInResponse.ProtoReflect.Descriptor instead.

func (*SignInResponse) GetId

func (x *SignInResponse) GetId() int32

func (*SignInResponse) GetName

func (x *SignInResponse) GetName() string

func (*SignInResponse) GetToken

func (x *SignInResponse) GetToken() string

func (*SignInResponse) ProtoMessage

func (*SignInResponse) ProtoMessage()

func (*SignInResponse) ProtoReflect

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

func (*SignInResponse) Reset

func (x *SignInResponse) Reset()

func (*SignInResponse) String

func (x *SignInResponse) String() string

type SignUpRequest

type SignUpRequest struct {
	Name  string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	Pass  string `protobuf:"bytes,3,opt,name=pass,proto3" json:"pass,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) GetName

func (x *SignUpRequest) GetName() string

func (*SignUpRequest) GetPass

func (x *SignUpRequest) GetPass() 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 SignUpResponse

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

func (*SignUpResponse) Descriptor deprecated

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

Deprecated: Use SignUpResponse.ProtoReflect.Descriptor instead.

func (*SignUpResponse) ProtoMessage

func (*SignUpResponse) ProtoMessage()

func (*SignUpResponse) ProtoReflect

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

func (*SignUpResponse) Reset

func (x *SignUpResponse) Reset()

func (*SignUpResponse) String

func (x *SignUpResponse) String() string

type UnimplementedAuthServer

type UnimplementedAuthServer struct {
}

UnimplementedAuthServer must be embedded to have forward compatible implementations.

func (UnimplementedAuthServer) SignIn

func (UnimplementedAuthServer) SignUp

type UnimplementedRoomServer

type UnimplementedRoomServer struct {
}

UnimplementedRoomServer must be embedded to have forward compatible implementations.

func (UnimplementedRoomServer) GetRoom

func (UnimplementedRoomServer) JoinRoom

func (UnimplementedRoomServer) UserJoined

type UnsafeAuthServer

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

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

type UnsafeRoomServer

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

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

type User

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

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetId

func (x *User) GetId() int32

func (*User) GetName

func (x *User) GetName() 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 UserJoinedReq

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

func (*UserJoinedReq) Descriptor deprecated

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

Deprecated: Use UserJoinedReq.ProtoReflect.Descriptor instead.

func (*UserJoinedReq) ProtoMessage

func (*UserJoinedReq) ProtoMessage()

func (*UserJoinedReq) ProtoReflect

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

func (*UserJoinedReq) Reset

func (x *UserJoinedReq) Reset()

func (*UserJoinedReq) String

func (x *UserJoinedReq) String() string

Jump to

Keyboard shortcuts

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