release: v2
This commit is contained in:
25
gen/wire/wire.go
Normal file
25
gen/wire/wire.go
Normal file
@@ -0,0 +1,25 @@
|
||||
//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{}
|
||||
}
|
||||
32
gen/wire/wire_gen.go
Normal file
32
gen/wire/wire_gen.go
Normal file
@@ -0,0 +1,32 @@
|
||||
// Code generated by Wire. DO NOT EDIT.
|
||||
|
||||
//go:generate go run github.com/google/wire/cmd/wire
|
||||
//go:build !wireinject
|
||||
// +build !wireinject
|
||||
|
||||
package wire
|
||||
|
||||
import (
|
||||
"pastebin/gen/v1"
|
||||
"pastebin/services/controller/v1"
|
||||
)
|
||||
|
||||
// Injectors from wire.go:
|
||||
|
||||
func InitPastebinService() *PastebinService {
|
||||
pastebinService := &controllerv1.PastebinService{}
|
||||
pastebinService_RouterMap := &genv1.PastebinService_RouterMap{}
|
||||
wirePastebinService := NewPastebinService(pastebinService, pastebinService_RouterMap)
|
||||
return wirePastebinService
|
||||
}
|
||||
|
||||
// wire.go:
|
||||
|
||||
type PastebinService struct {
|
||||
*controllerv1.PastebinService
|
||||
*genv1.PastebinService_RouterMap
|
||||
}
|
||||
|
||||
func NewPastebinService(c *controllerv1.PastebinService, r *genv1.PastebinService_RouterMap) *PastebinService {
|
||||
return &PastebinService{c, r}
|
||||
}
|
||||
Reference in New Issue
Block a user