Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterSessionMangerServer(s grpc.ServiceRegistrar, srv SessionMangerServer)
- type Nothing
- type Session
- type SessionMangerClient
- type SessionMangerServer
- type UnimplementedSessionMangerServer
- func (UnimplementedSessionMangerServer) Check(context.Context, *Session) (*UserID, error)
- func (UnimplementedSessionMangerServer) Create(context.Context, *User) (*Session, error)
- func (UnimplementedSessionMangerServer) Delete(context.Context, *Session) (*Session, error)
- func (UnimplementedSessionMangerServer) Login(context.Context, *User) (*Session, error)
- type UnsafeSessionMangerServer
- type User
- type UserID
Constants ¶
const ( SessionManger_Login_FullMethodName = "/auth.SessionManger/Login" SessionManger_Check_FullMethodName = "/auth.SessionManger/Check" SessionManger_Create_FullMethodName = "/auth.SessionManger/Create" SessionManger_Delete_FullMethodName = "/auth.SessionManger/Delete" )
Variables ¶
var File_pkg_auth_auth_proto protoreflect.FileDescriptor
var SessionManger_ServiceDesc = grpc.ServiceDesc{ ServiceName: "auth.SessionManger", HandlerType: (*SessionMangerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Login", Handler: _SessionManger_Login_Handler, }, { MethodName: "Check", Handler: _SessionManger_Check_Handler, }, { MethodName: "Create", Handler: _SessionManger_Create_Handler, }, { MethodName: "Delete", Handler: _SessionManger_Delete_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pkg/auth/auth.proto", }
SessionManger_ServiceDesc is the grpc.ServiceDesc for SessionManger service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterSessionMangerServer ¶
func RegisterSessionMangerServer(s grpc.ServiceRegistrar, srv SessionMangerServer)
Types ¶
type Nothing ¶
type Nothing struct {
// contains filtered or unexported fields
}
func (*Nothing) Descriptor
deprecated
func (*Nothing) ProtoMessage ¶
func (*Nothing) ProtoMessage()
func (*Nothing) ProtoReflect ¶
func (x *Nothing) ProtoReflect() protoreflect.Message
type Session ¶
type Session struct { AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` // contains filtered or unexported fields }
func (*Session) Descriptor
deprecated
func (*Session) GetAccessToken ¶
func (*Session) ProtoMessage ¶
func (*Session) ProtoMessage()
func (*Session) ProtoReflect ¶
func (x *Session) ProtoReflect() protoreflect.Message
type SessionMangerClient ¶
type SessionMangerClient interface { Login(ctx context.Context, in *User, opts ...grpc.CallOption) (*Session, error) Check(ctx context.Context, in *Session, opts ...grpc.CallOption) (*UserID, error) Create(ctx context.Context, in *User, opts ...grpc.CallOption) (*Session, error) Delete(ctx context.Context, in *Session, opts ...grpc.CallOption) (*Session, error) }
SessionMangerClient is the client API for SessionManger 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 NewSessionMangerClient ¶
func NewSessionMangerClient(cc grpc.ClientConnInterface) SessionMangerClient
type SessionMangerServer ¶
type SessionMangerServer interface { Login(context.Context, *User) (*Session, error) Check(context.Context, *Session) (*UserID, error) Create(context.Context, *User) (*Session, error) Delete(context.Context, *Session) (*Session, error) // contains filtered or unexported methods }
SessionMangerServer is the server API for SessionManger service. All implementations must embed UnimplementedSessionMangerServer for forward compatibility
type UnimplementedSessionMangerServer ¶
type UnimplementedSessionMangerServer struct { }
UnimplementedSessionMangerServer must be embedded to have forward compatible implementations.
type UnsafeSessionMangerServer ¶
type UnsafeSessionMangerServer interface {
// contains filtered or unexported methods
}
UnsafeSessionMangerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SessionMangerServer will result in compilation errors.
type User ¶
type User struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetPassword ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserID ¶
type UserID struct { UserId uint64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*UserID) Descriptor
deprecated
func (*UserID) ProtoMessage ¶
func (*UserID) ProtoMessage()
func (*UserID) ProtoReflect ¶
func (x *UserID) ProtoReflect() protoreflect.Message