feat: complete template
This commit is contained in:
17
backend/database/services/provider.gen.go
Executable file
17
backend/database/services/provider.gen.go
Executable file
@@ -0,0 +1,17 @@
|
||||
package services
|
||||
|
||||
import (
|
||||
"git.ipao.vip/rogeecn/atom/container"
|
||||
"git.ipao.vip/rogeecn/atom/utils/opt"
|
||||
)
|
||||
|
||||
func Provide(opts ...opt.Option) error {
|
||||
if err := container.Container.Provide(func() (*User, error) {
|
||||
obj := &User{}
|
||||
return obj, nil
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
10
backend/database/services/user.go
Normal file
10
backend/database/services/user.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package services
|
||||
|
||||
import "context"
|
||||
|
||||
// @provider
|
||||
type User struct{}
|
||||
|
||||
func (u *User) Get(ctx context.Context) string {
|
||||
return "User"
|
||||
}
|
||||
Reference in New Issue
Block a user