26 lines
601 B
Go
26 lines
601 B
Go
//go:build wireinject
|
|
// +build wireinject
|
|
|
|
package wire
|
|
|
|
import (
|
|
"github.com/google/wire"
|
|
|
|
"pastebin/gen/v1"
|
|
"pastebin/services/controller/v1"
|
|
)
|
|
|
|
type PastebinService struct {
|
|
*controllerv1.PastebinService
|
|
*genv1.PastebinService_RouterMap
|
|
}
|
|
|
|
func NewPastebinService(c *controllerv1.PastebinService, r *genv1.PastebinService_RouterMap) *PastebinService {
|
|
return &PastebinService{c, r}
|
|
}
|
|
|
|
func InitPastebinService() *PastebinService {
|
|
wire.Build(wire.Struct(new(controllerv1.PastebinService)), wire.Struct(new(genv1.PastebinService_RouterMap)), NewPastebinService)
|
|
return &PastebinService{}
|
|
}
|