Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer)
- type AuthClient
- type AuthServer
- type AuthUser
- func (*AuthUser) Descriptor() ([]byte, []int)deprecated
- func (x *AuthUser) GetEmail() string
- func (x *AuthUser) GetID() uint64
- func (x *AuthUser) GetIsAuth() bool
- func (x *AuthUser) GetPasswordHash() string
- func (*AuthUser) ProtoMessage()
- func (x *AuthUser) ProtoReflect() protoreflect.Message
- func (x *AuthUser) Reset()
- func (x *AuthUser) String() string
- type EditEmailRequest
- func (*EditEmailRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EditEmailRequest) GetEmail() string
- func (x *EditEmailRequest) GetSessionID() string
- func (*EditEmailRequest) ProtoMessage()
- func (x *EditEmailRequest) ProtoReflect() protoreflect.Message
- func (x *EditEmailRequest) Reset()
- func (x *EditEmailRequest) String() string
- type ExistedUserData
- func (*ExistedUserData) Descriptor() ([]byte, []int)deprecated
- func (x *ExistedUserData) GetEmail() string
- func (x *ExistedUserData) GetPassword() string
- func (*ExistedUserData) ProtoMessage()
- func (x *ExistedUserData) ProtoReflect() protoreflect.Message
- func (x *ExistedUserData) Reset()
- func (x *ExistedUserData) String() string
- type LoggedUser
- func (*LoggedUser) Descriptor() ([]byte, []int)deprecated
- func (x *LoggedUser) GetEmail() string
- func (x *LoggedUser) GetID() uint64
- func (x *LoggedUser) GetIsAuth() bool
- func (x *LoggedUser) GetPasswordHash() string
- func (x *LoggedUser) GetSessionID() string
- func (*LoggedUser) ProtoMessage()
- func (x *LoggedUser) ProtoReflect() protoreflect.Message
- func (x *LoggedUser) Reset()
- func (x *LoggedUser) String() string
- type NewUserData
- func (*NewUserData) Descriptor() ([]byte, []int)deprecated
- func (x *NewUserData) GetEmail() string
- func (x *NewUserData) GetPassword() string
- func (x *NewUserData) GetPasswordRepeat() string
- func (*NewUserData) ProtoMessage()
- func (x *NewUserData) ProtoReflect() protoreflect.Message
- func (x *NewUserData) Reset()
- func (x *NewUserData) String() string
- type SessionData
- type UnimplementedAuthServer
- func (UnimplementedAuthServer) EditEmail(context.Context, *EditEmailRequest) (*User, error)
- func (UnimplementedAuthServer) GetCurrentUser(context.Context, *SessionData) (*AuthUser, error)
- func (UnimplementedAuthServer) Login(context.Context, *ExistedUserData) (*LoggedUser, error)
- func (UnimplementedAuthServer) Logout(context.Context, *SessionData) (*emptypb.Empty, error)
- func (UnimplementedAuthServer) Signup(context.Context, *NewUserData) (*LoggedUser, error)
- type UnsafeAuthServer
- type User
Constants ¶
const ( Auth_Login_FullMethodName = "/Auth/Login" Auth_Signup_FullMethodName = "/Auth/Signup" Auth_Logout_FullMethodName = "/Auth/Logout" Auth_GetCurrentUser_FullMethodName = "/Auth/GetCurrentUser" Auth_EditEmail_FullMethodName = "/Auth/EditEmail" )
Variables ¶
var Auth_ServiceDesc = grpc.ServiceDesc{ ServiceName: "Auth", HandlerType: (*AuthServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Login", Handler: _Auth_Login_Handler, }, { MethodName: "Signup", Handler: _Auth_Signup_Handler, }, { MethodName: "Logout", Handler: _Auth_Logout_Handler, }, { MethodName: "GetCurrentUser", Handler: _Auth_GetCurrentUser_Handler, }, { MethodName: "EditEmail", Handler: _Auth_EditEmail_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "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_auth_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAuthServer ¶
func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer)
Types ¶
type AuthClient ¶
type AuthClient interface { Login(ctx context.Context, in *ExistedUserData, opts ...grpc.CallOption) (*LoggedUser, error) Signup(ctx context.Context, in *NewUserData, opts ...grpc.CallOption) (*LoggedUser, error) Logout(ctx context.Context, in *SessionData, opts ...grpc.CallOption) (*emptypb.Empty, error) GetCurrentUser(ctx context.Context, in *SessionData, opts ...grpc.CallOption) (*AuthUser, error) EditEmail(ctx context.Context, in *EditEmailRequest, opts ...grpc.CallOption) (*User, 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 { Login(context.Context, *ExistedUserData) (*LoggedUser, error) Signup(context.Context, *NewUserData) (*LoggedUser, error) Logout(context.Context, *SessionData) (*emptypb.Empty, error) GetCurrentUser(context.Context, *SessionData) (*AuthUser, error) EditEmail(context.Context, *EditEmailRequest) (*User, error) // contains filtered or unexported methods }
AuthServer is the server API for Auth service. All implementations must embed UnimplementedAuthServer for forward compatibility
type AuthUser ¶
type AuthUser struct { ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` Email string `protobuf:"bytes,2,opt,name=Email,proto3" json:"Email,omitempty"` PasswordHash string `protobuf:"bytes,3,opt,name=PasswordHash,proto3" json:"PasswordHash,omitempty"` IsAuth bool `protobuf:"varint,4,opt,name=IsAuth,proto3" json:"IsAuth,omitempty"` // contains filtered or unexported fields }
func (*AuthUser) Descriptor
deprecated
func (*AuthUser) GetPasswordHash ¶
func (*AuthUser) ProtoMessage ¶
func (*AuthUser) ProtoMessage()
func (*AuthUser) ProtoReflect ¶
func (x *AuthUser) ProtoReflect() protoreflect.Message
type EditEmailRequest ¶
type EditEmailRequest struct { SessionID string `protobuf:"bytes,1,opt,name=SessionID,proto3" json:"SessionID,omitempty"` Email string `protobuf:"bytes,2,opt,name=Email,proto3" json:"Email,omitempty"` // contains filtered or unexported fields }
func (*EditEmailRequest) Descriptor
deprecated
func (*EditEmailRequest) Descriptor() ([]byte, []int)
Deprecated: Use EditEmailRequest.ProtoReflect.Descriptor instead.
func (*EditEmailRequest) GetEmail ¶
func (x *EditEmailRequest) GetEmail() string
func (*EditEmailRequest) GetSessionID ¶
func (x *EditEmailRequest) GetSessionID() string
func (*EditEmailRequest) ProtoMessage ¶
func (*EditEmailRequest) ProtoMessage()
func (*EditEmailRequest) ProtoReflect ¶
func (x *EditEmailRequest) ProtoReflect() protoreflect.Message
func (*EditEmailRequest) Reset ¶
func (x *EditEmailRequest) Reset()
func (*EditEmailRequest) String ¶
func (x *EditEmailRequest) String() string
type ExistedUserData ¶
type ExistedUserData 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 (*ExistedUserData) Descriptor
deprecated
func (*ExistedUserData) Descriptor() ([]byte, []int)
Deprecated: Use ExistedUserData.ProtoReflect.Descriptor instead.
func (*ExistedUserData) GetEmail ¶
func (x *ExistedUserData) GetEmail() string
func (*ExistedUserData) GetPassword ¶
func (x *ExistedUserData) GetPassword() string
func (*ExistedUserData) ProtoMessage ¶
func (*ExistedUserData) ProtoMessage()
func (*ExistedUserData) ProtoReflect ¶
func (x *ExistedUserData) ProtoReflect() protoreflect.Message
func (*ExistedUserData) Reset ¶
func (x *ExistedUserData) Reset()
func (*ExistedUserData) String ¶
func (x *ExistedUserData) String() string
type LoggedUser ¶
type LoggedUser struct { ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` Email string `protobuf:"bytes,2,opt,name=Email,proto3" json:"Email,omitempty"` PasswordHash string `protobuf:"bytes,3,opt,name=PasswordHash,proto3" json:"PasswordHash,omitempty"` SessionID string `protobuf:"bytes,4,opt,name=SessionID,proto3" json:"SessionID,omitempty"` IsAuth bool `protobuf:"varint,5,opt,name=IsAuth,proto3" json:"IsAuth,omitempty"` // contains filtered or unexported fields }
func (*LoggedUser) Descriptor
deprecated
func (*LoggedUser) Descriptor() ([]byte, []int)
Deprecated: Use LoggedUser.ProtoReflect.Descriptor instead.
func (*LoggedUser) GetEmail ¶
func (x *LoggedUser) GetEmail() string
func (*LoggedUser) GetID ¶
func (x *LoggedUser) GetID() uint64
func (*LoggedUser) GetIsAuth ¶
func (x *LoggedUser) GetIsAuth() bool
func (*LoggedUser) GetPasswordHash ¶
func (x *LoggedUser) GetPasswordHash() string
func (*LoggedUser) GetSessionID ¶
func (x *LoggedUser) GetSessionID() string
func (*LoggedUser) ProtoMessage ¶
func (*LoggedUser) ProtoMessage()
func (*LoggedUser) ProtoReflect ¶
func (x *LoggedUser) ProtoReflect() protoreflect.Message
func (*LoggedUser) Reset ¶
func (x *LoggedUser) Reset()
func (*LoggedUser) String ¶
func (x *LoggedUser) String() string
type NewUserData ¶
type NewUserData 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"` PasswordRepeat string `protobuf:"bytes,3,opt,name=PasswordRepeat,proto3" json:"PasswordRepeat,omitempty"` // contains filtered or unexported fields }
func (*NewUserData) Descriptor
deprecated
func (*NewUserData) Descriptor() ([]byte, []int)
Deprecated: Use NewUserData.ProtoReflect.Descriptor instead.
func (*NewUserData) GetEmail ¶
func (x *NewUserData) GetEmail() string
func (*NewUserData) GetPassword ¶
func (x *NewUserData) GetPassword() string
func (*NewUserData) GetPasswordRepeat ¶
func (x *NewUserData) GetPasswordRepeat() string
func (*NewUserData) ProtoMessage ¶
func (*NewUserData) ProtoMessage()
func (*NewUserData) ProtoReflect ¶
func (x *NewUserData) ProtoReflect() protoreflect.Message
func (*NewUserData) Reset ¶
func (x *NewUserData) Reset()
func (*NewUserData) String ¶
func (x *NewUserData) String() string
type SessionData ¶
type SessionData struct { SessionID string `protobuf:"bytes,1,opt,name=SessionID,proto3" json:"SessionID,omitempty"` // contains filtered or unexported fields }
func (*SessionData) Descriptor
deprecated
func (*SessionData) Descriptor() ([]byte, []int)
Deprecated: Use SessionData.ProtoReflect.Descriptor instead.
func (*SessionData) GetSessionID ¶
func (x *SessionData) GetSessionID() string
func (*SessionData) ProtoMessage ¶
func (*SessionData) ProtoMessage()
func (*SessionData) ProtoReflect ¶
func (x *SessionData) ProtoReflect() protoreflect.Message
func (*SessionData) Reset ¶
func (x *SessionData) Reset()
func (*SessionData) String ¶
func (x *SessionData) String() string
type UnimplementedAuthServer ¶
type UnimplementedAuthServer struct { }
UnimplementedAuthServer must be embedded to have forward compatible implementations.
func (UnimplementedAuthServer) EditEmail ¶
func (UnimplementedAuthServer) EditEmail(context.Context, *EditEmailRequest) (*User, error)
func (UnimplementedAuthServer) GetCurrentUser ¶
func (UnimplementedAuthServer) GetCurrentUser(context.Context, *SessionData) (*AuthUser, error)
func (UnimplementedAuthServer) Login ¶
func (UnimplementedAuthServer) Login(context.Context, *ExistedUserData) (*LoggedUser, error)
func (UnimplementedAuthServer) Logout ¶
func (UnimplementedAuthServer) Logout(context.Context, *SessionData) (*emptypb.Empty, error)
func (UnimplementedAuthServer) Signup ¶
func (UnimplementedAuthServer) Signup(context.Context, *NewUserData) (*LoggedUser, 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.
type User ¶
type User struct { ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` Email string `protobuf:"bytes,2,opt,name=Email,proto3" json:"Email,omitempty"` PasswordHash string `protobuf:"bytes,3,opt,name=PasswordHash,proto3" json:"PasswordHash,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetPasswordHash ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message