25 lines
460 B
Go
25 lines
460 B
Go
package authmodule
|
|
|
|
import (
|
|
authdto "api/application/auth/dto"
|
|
"api/models/api"
|
|
)
|
|
|
|
type Controller interface {
|
|
Authorization(data *authdto.AuthDto) (*api.Response, int, error)
|
|
}
|
|
|
|
type controller struct {
|
|
AuthService
|
|
}
|
|
|
|
func newController(service AuthService) Controller {
|
|
return &controller{
|
|
AuthService: service,
|
|
}
|
|
}
|
|
|
|
func (c *controller) Authorization(data *authdto.AuthDto) (*api.Response, int, error) {
|
|
return c.AuthService.Authorization(data)
|
|
}
|