Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ProviderSet = wire.NewSet(NewLoginService)
ProviderSet is a Google Wire provider set used for dependency injection. This set contains the NewLoginService function, which means that when using Google Wire for dependency injection, LoginService instances can be automatically created. By adding this function to the set, it becomes convenient to manage and initialize LoginService related dependencies in the project.
Functions ¶
This section is empty.
Types ¶
type LoginService ¶
type LoginService struct {
v1.UnimplementedLoginServer // Embed UnimplementedLoginServer to automatically implement empty methods of the interface
// contains filtered or unexported fields
}
LoginService implements the v1.LoginServer interface for handling user login related RPC requests. This service depends on the business logic layer's LoginUseCase to complete specific login business.
func NewLoginService ¶
func NewLoginService(uc *biz.LoginUseCase) *LoginService
NewLoginService creates a new LoginService instance. Parameter uc is the login use case instance from the business logic layer. Returns a pointer to a LoginService instance.
func (*LoginService) Login ¶
func (svc *LoginService) Login(ctx context.Context, req *v1.LoginRequest) (*v1.LoginReply, error)
Login handles user login RPC requests. Parameters: ctx is the context for controlling the request lifecycle; req is the login request sent by the client. Returns login response and any possible errors.