feat: complete login

This commit is contained in:
yanghao05
2025-04-15 21:20:04 +08:00
parent 45a0b6848a
commit ca08568e1a
23 changed files with 842 additions and 28 deletions

View File

@@ -1,6 +1,9 @@
package http
import (
"quyun/providers/job"
"quyun/providers/jwt"
"quyun/providers/wechat"
"quyun/providers/wepay"
"go.ipao.vip/atom"
@@ -10,6 +13,32 @@ import (
)
func Provide(opts ...opt.Option) error {
if err := container.Container.Provide(func(
jwt *jwt.JWT,
wechat *wechat.Client,
) (*auth, error) {
obj := &auth{
jwt: jwt,
wechat: wechat,
}
return obj, nil
}); err != nil {
return err
}
if err := container.Container.Provide(func(
job *job.Job,
wepay *wepay.Client,
) (*pays, error) {
obj := &pays{
job: job,
wepay: wepay,
}
return obj, nil
}); err != nil {
return err
}
if err := container.Container.Provide(func(
wepay *wepay.Client,
) (*posts, error) {
@@ -22,10 +51,12 @@ func Provide(opts ...opt.Option) error {
return err
}
if err := container.Container.Provide(func(
auth *auth,
pays *pays,
posts *posts,
) (contracts.HttpRoute, error) {
obj := &Routes{
auth: auth,
pays: pays,
posts: posts,
}