Documentation ¶
Index ¶
- Variables
- func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer)
- type AuthClient
- type AuthReply
- func (*AuthReply) Descriptor() ([]byte, []int)deprecated
- func (x *AuthReply) GetEmail() string
- func (x *AuthReply) GetID() string
- func (x *AuthReply) GetUsername() string
- func (*AuthReply) ProtoMessage()
- func (x *AuthReply) ProtoReflect() protoreflect.Message
- func (x *AuthReply) Reset()
- func (x *AuthReply) String() string
- type AuthRequest
- type AuthServer
- type UnimplementedAuthServer
- type UnsafeAuthServer
Constants ¶
This section is empty.
Variables ¶
var Auth_ServiceDesc = grpc.ServiceDesc{ ServiceName: "auth.Auth", HandlerType: (*AuthServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Auth", Handler: _Auth_Auth_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "protocol/auth.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)
var File_protocol_auth_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAuthServer ¶
func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer)
Types ¶
type AuthClient ¶
type AuthClient interface { // Used to check a JWT and retrieve the corresponding user. Auth(ctx context.Context, in *AuthRequest, opts ...grpc.CallOption) (*AuthReply, 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 AuthReply ¶
type AuthReply struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` // contains filtered or unexported fields }
func (*AuthReply) Descriptor
deprecated
func (*AuthReply) GetUsername ¶
func (*AuthReply) ProtoMessage ¶
func (*AuthReply) ProtoMessage()
func (*AuthReply) ProtoReflect ¶
func (x *AuthReply) ProtoReflect() protoreflect.Message
type AuthRequest ¶
type AuthRequest struct { JWT string `protobuf:"bytes,1,opt,name=JWT,proto3" json:"JWT,omitempty"` // contains filtered or unexported fields }
func (*AuthRequest) Descriptor
deprecated
func (*AuthRequest) Descriptor() ([]byte, []int)
Deprecated: Use AuthRequest.ProtoReflect.Descriptor instead.
func (*AuthRequest) GetJWT ¶
func (x *AuthRequest) GetJWT() string
func (*AuthRequest) ProtoMessage ¶
func (*AuthRequest) ProtoMessage()
func (*AuthRequest) ProtoReflect ¶
func (x *AuthRequest) ProtoReflect() protoreflect.Message
func (*AuthRequest) Reset ¶
func (x *AuthRequest) Reset()
func (*AuthRequest) String ¶
func (x *AuthRequest) String() string
type AuthServer ¶
type AuthServer interface { // Used to check a JWT and retrieve the corresponding user. Auth(context.Context, *AuthRequest) (*AuthReply, error) // contains filtered or unexported methods }
AuthServer is the server API for Auth service. All implementations must embed UnimplementedAuthServer for forward compatibility
type UnimplementedAuthServer ¶
type UnimplementedAuthServer struct { }
UnimplementedAuthServer must be embedded to have forward compatible implementations.
func (UnimplementedAuthServer) Auth ¶
func (UnimplementedAuthServer) Auth(context.Context, *AuthRequest) (*AuthReply, error)
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.