27 lines
460 B
Go
27 lines
460 B
Go
package inject
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
"pink_fox/internal/app"
|
|
"pink_fox/internal/http_server/http"
|
|
)
|
|
|
|
type DI struct {
|
|
application *app.Application
|
|
context *gin.Context
|
|
}
|
|
|
|
func NewDI(application *app.Application, ctx *gin.Context) *DI {
|
|
return &DI{
|
|
application: application,
|
|
context: ctx,
|
|
}
|
|
}
|
|
|
|
func (it *DI) Close() {
|
|
}
|
|
|
|
func (it *DI) MakeResponseFactory() *http.ResponseFactory {
|
|
return http.NewResponseFactory(it.context)
|
|
}
|