Documentation ¶
Index ¶
- Variables
- func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)
- type AuthServiceClient
- type AuthServiceServer
- type Empty
- type GenerateKeyRes
- type LoginReq
- type LoginRes
- type LogoutRes
- type RefreshRes
- type RegisterReq
- func (*RegisterReq) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterReq) GetEmail() string
- func (x *RegisterReq) GetFirstName() string
- func (x *RegisterReq) GetLastName() string
- func (x *RegisterReq) GetPassword() string
- func (x *RegisterReq) GetUsername() string
- func (*RegisterReq) ProtoMessage()
- func (x *RegisterReq) ProtoReflect() protoreflect.Message
- func (x *RegisterReq) Reset()
- func (x *RegisterReq) String() string
- type RegisterRes
- func (*RegisterRes) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterRes) GetAccessToken() string
- func (x *RegisterRes) GetUser() *User
- func (*RegisterRes) ProtoMessage()
- func (x *RegisterRes) ProtoReflect() protoreflect.Message
- func (x *RegisterRes) Reset()
- func (x *RegisterRes) String() string
- type UnimplementedAuthServiceServer
- func (UnimplementedAuthServiceServer) GenerateKey(context.Context, *Empty) (*GenerateKeyRes, error)
- func (UnimplementedAuthServiceServer) Login(context.Context, *LoginReq) (*LoginRes, error)
- func (UnimplementedAuthServiceServer) Logout(context.Context, *Empty) (*LogoutRes, error)
- func (UnimplementedAuthServiceServer) Refresh(context.Context, *Empty) (*RefreshRes, error)
- func (UnimplementedAuthServiceServer) Register(context.Context, *RegisterReq) (*RegisterRes, error)
- func (UnimplementedAuthServiceServer) UpdatePassword(context.Context, *UpdatePasswordReq) (*UpdatePasswordRes, error)
- type UnsafeAuthServiceServer
- type UpdatePasswordReq
- func (*UpdatePasswordReq) Descriptor() ([]byte, []int)deprecated
- func (x *UpdatePasswordReq) GetCurrentPassword() string
- func (x *UpdatePasswordReq) GetNewPassword() string
- func (*UpdatePasswordReq) ProtoMessage()
- func (x *UpdatePasswordReq) ProtoReflect() protoreflect.Message
- func (x *UpdatePasswordReq) Reset()
- func (x *UpdatePasswordReq) String() string
- type UpdatePasswordRes
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetCreatedAt() *timestamppb.Timestamp
- func (x *User) GetDeletedAt() *timestamppb.Timestamp
- func (x *User) GetEmail() string
- func (x *User) GetFirstName() string
- func (x *User) GetGroupId() string
- func (x *User) GetId() string
- func (x *User) GetImageId() string
- func (x *User) GetLastModified() *timestamppb.Timestamp
- func (x *User) GetLastName() string
- func (x *User) GetRole() string
- func (x *User) GetRootAdmin() bool
- func (x *User) GetUsername() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
Constants ¶
This section is empty.
Variables ¶
var AuthService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "authService.AuthService", HandlerType: (*AuthServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Register", Handler: _AuthService_Register_Handler, }, { MethodName: "Login", Handler: _AuthService_Login_Handler, }, { MethodName: "Logout", Handler: _AuthService_Logout_Handler, }, { MethodName: "Refresh", Handler: _AuthService_Refresh_Handler, }, { MethodName: "GenerateKey", Handler: _AuthService_GenerateKey_Handler, }, { MethodName: "UpdatePassword", Handler: _AuthService_UpdatePassword_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "auth.proto", }
AuthService_ServiceDesc is the grpc.ServiceDesc for AuthService 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 RegisterAuthServiceServer ¶
func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)
Types ¶
type AuthServiceClient ¶
type AuthServiceClient interface { Register(ctx context.Context, in *RegisterReq, opts ...grpc.CallOption) (*RegisterRes, error) Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginRes, error) Logout(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*LogoutRes, error) Refresh(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*RefreshRes, error) GenerateKey(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GenerateKeyRes, error) UpdatePassword(ctx context.Context, in *UpdatePasswordReq, opts ...grpc.CallOption) (*UpdatePasswordRes, error) }
AuthServiceClient is the client API for AuthService 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 NewAuthServiceClient ¶
func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient
type AuthServiceServer ¶
type AuthServiceServer interface { Register(context.Context, *RegisterReq) (*RegisterRes, error) Login(context.Context, *LoginReq) (*LoginRes, error) Logout(context.Context, *Empty) (*LogoutRes, error) Refresh(context.Context, *Empty) (*RefreshRes, error) GenerateKey(context.Context, *Empty) (*GenerateKeyRes, error) UpdatePassword(context.Context, *UpdatePasswordReq) (*UpdatePasswordRes, error) }
AuthServiceServer is the server API for AuthService service. All implementations should embed UnimplementedAuthServiceServer for forward compatibility
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type GenerateKeyRes ¶
type GenerateKeyRes struct { APIKey string `protobuf:"bytes,1,opt,name=APIKey,proto3" json:"APIKey,omitempty"` // contains filtered or unexported fields }
func (*GenerateKeyRes) Descriptor
deprecated
func (*GenerateKeyRes) Descriptor() ([]byte, []int)
Deprecated: Use GenerateKeyRes.ProtoReflect.Descriptor instead.
func (*GenerateKeyRes) GetAPIKey ¶
func (x *GenerateKeyRes) GetAPIKey() string
func (*GenerateKeyRes) ProtoMessage ¶
func (*GenerateKeyRes) ProtoMessage()
func (*GenerateKeyRes) ProtoReflect ¶
func (x *GenerateKeyRes) ProtoReflect() protoreflect.Message
func (*GenerateKeyRes) Reset ¶
func (x *GenerateKeyRes) Reset()
func (*GenerateKeyRes) String ¶
func (x *GenerateKeyRes) String() string
type LoginReq ¶
type LoginReq 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 (*LoginReq) Descriptor
deprecated
func (*LoginReq) GetPassword ¶
func (*LoginReq) ProtoMessage ¶
func (*LoginReq) ProtoMessage()
func (*LoginReq) ProtoReflect ¶
func (x *LoginReq) ProtoReflect() protoreflect.Message
type LoginRes ¶
type LoginRes struct { User *User `protobuf:"bytes,1,opt,name=User,proto3" json:"User,omitempty"` AccessToken string `protobuf:"bytes,2,opt,name=AccessToken,proto3" json:"AccessToken,omitempty"` // contains filtered or unexported fields }
func (*LoginRes) Descriptor
deprecated
func (*LoginRes) GetAccessToken ¶
func (*LoginRes) ProtoMessage ¶
func (*LoginRes) ProtoMessage()
func (*LoginRes) ProtoReflect ¶
func (x *LoginRes) ProtoReflect() protoreflect.Message
type LogoutRes ¶
type LogoutRes struct { Status int64 `protobuf:"varint,1,opt,name=Status,proto3" json:"Status,omitempty"` // contains filtered or unexported fields }
func (*LogoutRes) Descriptor
deprecated
func (*LogoutRes) ProtoMessage ¶
func (*LogoutRes) ProtoMessage()
func (*LogoutRes) ProtoReflect ¶
func (x *LogoutRes) ProtoReflect() protoreflect.Message
type RefreshRes ¶
type RefreshRes struct { AccessToken string `protobuf:"bytes,1,opt,name=AccessToken,proto3" json:"AccessToken,omitempty"` // contains filtered or unexported fields }
func (*RefreshRes) Descriptor
deprecated
func (*RefreshRes) Descriptor() ([]byte, []int)
Deprecated: Use RefreshRes.ProtoReflect.Descriptor instead.
func (*RefreshRes) GetAccessToken ¶
func (x *RefreshRes) GetAccessToken() string
func (*RefreshRes) ProtoMessage ¶
func (*RefreshRes) ProtoMessage()
func (*RefreshRes) ProtoReflect ¶
func (x *RefreshRes) ProtoReflect() protoreflect.Message
func (*RefreshRes) Reset ¶
func (x *RefreshRes) Reset()
func (*RefreshRes) String ¶
func (x *RefreshRes) String() string
type RegisterReq ¶
type RegisterReq struct { FirstName string `protobuf:"bytes,1,opt,name=FirstName,proto3" json:"FirstName,omitempty"` LastName string `protobuf:"bytes,2,opt,name=LastName,proto3" json:"LastName,omitempty"` Email string `protobuf:"bytes,3,opt,name=Email,proto3" json:"Email,omitempty"` Username string `protobuf:"bytes,4,opt,name=Username,proto3" json:"Username,omitempty"` Password string `protobuf:"bytes,5,opt,name=Password,proto3" json:"Password,omitempty"` // contains filtered or unexported fields }
func (*RegisterReq) Descriptor
deprecated
func (*RegisterReq) Descriptor() ([]byte, []int)
Deprecated: Use RegisterReq.ProtoReflect.Descriptor instead.
func (*RegisterReq) GetEmail ¶
func (x *RegisterReq) GetEmail() string
func (*RegisterReq) GetFirstName ¶
func (x *RegisterReq) GetFirstName() string
func (*RegisterReq) GetLastName ¶
func (x *RegisterReq) GetLastName() string
func (*RegisterReq) GetPassword ¶
func (x *RegisterReq) GetPassword() string
func (*RegisterReq) GetUsername ¶
func (x *RegisterReq) GetUsername() string
func (*RegisterReq) ProtoMessage ¶
func (*RegisterReq) ProtoMessage()
func (*RegisterReq) ProtoReflect ¶
func (x *RegisterReq) ProtoReflect() protoreflect.Message
func (*RegisterReq) Reset ¶
func (x *RegisterReq) Reset()
func (*RegisterReq) String ¶
func (x *RegisterReq) String() string
type RegisterRes ¶
type RegisterRes struct { User *User `protobuf:"bytes,1,opt,name=User,proto3" json:"User,omitempty"` AccessToken string `protobuf:"bytes,2,opt,name=AccessToken,proto3" json:"AccessToken,omitempty"` // contains filtered or unexported fields }
func (*RegisterRes) Descriptor
deprecated
func (*RegisterRes) Descriptor() ([]byte, []int)
Deprecated: Use RegisterRes.ProtoReflect.Descriptor instead.
func (*RegisterRes) GetAccessToken ¶
func (x *RegisterRes) GetAccessToken() string
func (*RegisterRes) GetUser ¶
func (x *RegisterRes) GetUser() *User
func (*RegisterRes) ProtoMessage ¶
func (*RegisterRes) ProtoMessage()
func (*RegisterRes) ProtoReflect ¶
func (x *RegisterRes) ProtoReflect() protoreflect.Message
func (*RegisterRes) Reset ¶
func (x *RegisterRes) Reset()
func (*RegisterRes) String ¶
func (x *RegisterRes) String() string
type UnimplementedAuthServiceServer ¶
type UnimplementedAuthServiceServer struct { }
UnimplementedAuthServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedAuthServiceServer) GenerateKey ¶
func (UnimplementedAuthServiceServer) GenerateKey(context.Context, *Empty) (*GenerateKeyRes, error)
func (UnimplementedAuthServiceServer) Refresh ¶
func (UnimplementedAuthServiceServer) Refresh(context.Context, *Empty) (*RefreshRes, error)
func (UnimplementedAuthServiceServer) Register ¶
func (UnimplementedAuthServiceServer) Register(context.Context, *RegisterReq) (*RegisterRes, error)
func (UnimplementedAuthServiceServer) UpdatePassword ¶
func (UnimplementedAuthServiceServer) UpdatePassword(context.Context, *UpdatePasswordReq) (*UpdatePasswordRes, error)
type UnsafeAuthServiceServer ¶
type UnsafeAuthServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAuthServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuthServiceServer will result in compilation errors.
type UpdatePasswordReq ¶
type UpdatePasswordReq struct { NewPassword string `protobuf:"bytes,1,opt,name=NewPassword,proto3" json:"NewPassword,omitempty"` CurrentPassword string `protobuf:"bytes,2,opt,name=CurrentPassword,proto3" json:"CurrentPassword,omitempty"` // contains filtered or unexported fields }
func (*UpdatePasswordReq) Descriptor
deprecated
func (*UpdatePasswordReq) Descriptor() ([]byte, []int)
Deprecated: Use UpdatePasswordReq.ProtoReflect.Descriptor instead.
func (*UpdatePasswordReq) GetCurrentPassword ¶
func (x *UpdatePasswordReq) GetCurrentPassword() string
func (*UpdatePasswordReq) GetNewPassword ¶
func (x *UpdatePasswordReq) GetNewPassword() string
func (*UpdatePasswordReq) ProtoMessage ¶
func (*UpdatePasswordReq) ProtoMessage()
func (*UpdatePasswordReq) ProtoReflect ¶
func (x *UpdatePasswordReq) ProtoReflect() protoreflect.Message
func (*UpdatePasswordReq) Reset ¶
func (x *UpdatePasswordReq) Reset()
func (*UpdatePasswordReq) String ¶
func (x *UpdatePasswordReq) String() string
type UpdatePasswordRes ¶
type UpdatePasswordRes struct { Status int64 `protobuf:"varint,1,opt,name=Status,proto3" json:"Status,omitempty"` // contains filtered or unexported fields }
func (*UpdatePasswordRes) Descriptor
deprecated
func (*UpdatePasswordRes) Descriptor() ([]byte, []int)
Deprecated: Use UpdatePasswordRes.ProtoReflect.Descriptor instead.
func (*UpdatePasswordRes) GetStatus ¶
func (x *UpdatePasswordRes) GetStatus() int64
func (*UpdatePasswordRes) ProtoMessage ¶
func (*UpdatePasswordRes) ProtoMessage()
func (*UpdatePasswordRes) ProtoReflect ¶
func (x *UpdatePasswordRes) ProtoReflect() protoreflect.Message
func (*UpdatePasswordRes) Reset ¶
func (x *UpdatePasswordRes) Reset()
func (*UpdatePasswordRes) String ¶
func (x *UpdatePasswordRes) String() string
type User ¶
type User 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"` FirstName string `protobuf:"bytes,3,opt,name=FirstName,proto3" json:"FirstName,omitempty"` LastName string `protobuf:"bytes,4,opt,name=LastName,proto3" json:"LastName,omitempty"` Email string `protobuf:"bytes,5,opt,name=Email,proto3" json:"Email,omitempty"` Role string `protobuf:"bytes,6,opt,name=Role,proto3" json:"Role,omitempty"` RootAdmin bool `protobuf:"varint,7,opt,name=RootAdmin,proto3" json:"RootAdmin,omitempty"` GroupId string `protobuf:"bytes,8,opt,name=GroupId,proto3" json:"GroupId,omitempty"` ImageId string `protobuf:"bytes,9,opt,name=ImageId,proto3" json:"ImageId,omitempty"` LastModified *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=LastModified,proto3" json:"LastModified,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty"` DeletedAt *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=DeletedAt,proto3" json:"DeletedAt,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetCreatedAt ¶
func (x *User) GetCreatedAt() *timestamppb.Timestamp
func (*User) GetDeletedAt ¶
func (x *User) GetDeletedAt() *timestamppb.Timestamp
func (*User) GetFirstName ¶
func (*User) GetGroupId ¶
func (*User) GetImageId ¶
func (*User) GetLastModified ¶
func (x *User) GetLastModified() *timestamppb.Timestamp
func (*User) GetLastName ¶
func (*User) GetRootAdmin ¶
func (*User) GetUsername ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message