to:sync
This commit is contained in:
parent
d95c75f5fa
commit
cd29e19c84
@ -6,7 +6,6 @@ import (
|
||||
"ai-gateway/common/utils"
|
||||
"ai-gateway/infrastructure/remote_http"
|
||||
"ai-gateway/infrastructure/repository"
|
||||
"code.freebrio.com/fb-go/lib/fbl"
|
||||
"github.com/labstack/echo/v4"
|
||||
"net/http"
|
||||
)
|
||||
|
@ -3,7 +3,6 @@ package config
|
||||
import (
|
||||
"ai-gateway/common/utils"
|
||||
"bytes"
|
||||
"code.freebrio.com/fb-go/lib/fbl"
|
||||
"embed"
|
||||
"fmt"
|
||||
"github.com/spf13/viper"
|
||||
|
@ -1,8 +1,8 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"code.freebrio.com/fb-go/lib/errors"
|
||||
"code.freebrio.com/fb-go/lib/fbl"
|
||||
"code.mylomen.com/syj/lib/errors"
|
||||
"gorm.io/gorm/utils"
|
||||
)
|
||||
|
||||
type Result struct {
|
||||
@ -42,8 +42,8 @@ func OkEmptyPageResult(anchor any) Result {
|
||||
return Result{
|
||||
Code: ok.ToInt(),
|
||||
Data: PageResult[interface{}]{
|
||||
Anchor: utils.ToString(anchor),
|
||||
End: fbl.ToPtr(true),
|
||||
Anchor: ToString(anchor),
|
||||
End: ToPtr(true),
|
||||
List: emptyList,
|
||||
},
|
||||
}
|
||||
|
@ -1 +1,5 @@
|
||||
package utils
|
||||
|
||||
func ToPtr[T any](data T) *T {
|
||||
return &data
|
||||
}
|
||||
|
2
go.mod
2
go.mod
@ -3,7 +3,7 @@ module ai-gateway
|
||||
go 1.20
|
||||
|
||||
require (
|
||||
code.freebrio.com/fb-go/lib v0.4.1
|
||||
code.mylomen.com/syj/lib v0.0.3
|
||||
github.com/go-playground/validator v9.31.0+incompatible
|
||||
github.com/go-redis/redis/v8 v8.11.5
|
||||
github.com/google/uuid v1.3.0
|
||||
|
4
go.sum
4
go.sum
@ -45,8 +45,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl
|
||||
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
|
||||
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
|
||||
cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo=
|
||||
code.freebrio.com/fb-go/lib v0.4.1 h1:eu7vpXOGL7pErH85H/smh7WMjumX/e3YHY5+PnpgWQo=
|
||||
code.freebrio.com/fb-go/lib v0.4.1/go.mod h1:w3vdqKmQIGcJSR6x0+Uza0R8mI/PR8WAuDk2vDZSXas=
|
||||
code.mylomen.com/syj/lib v0.0.3 h1:haq4eBhYq6Zep29ksjLpspzjng0oBxzQhmJB2jMdjjQ=
|
||||
code.mylomen.com/syj/lib v0.0.3/go.mod h1:fM8H0KebN5D0GJN9/tf1++s64DsyFvqpUsduN8gpy3o=
|
||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
|
@ -3,7 +3,7 @@ package remote_http
|
||||
import (
|
||||
"ai-gateway/common/dto"
|
||||
"ai-gateway/common/utils"
|
||||
"code.freebrio.com/fb-go/lib/context"
|
||||
"code.mylomen.com/syj/lib/context"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
|
@ -2,7 +2,7 @@ package remote_http
|
||||
|
||||
import (
|
||||
"ai-gateway/common/dto"
|
||||
"code.freebrio.com/fb-go/lib/context"
|
||||
"code.mylomen.com/syj/lib/context"
|
||||
)
|
||||
|
||||
type aiApi interface {
|
||||
|
@ -3,14 +3,15 @@ package repository
|
||||
import (
|
||||
"ai-gateway/common/config"
|
||||
"ai-gateway/common/constant"
|
||||
"code.mylomen.com/syj/lib/fbl"
|
||||
"database/sql"
|
||||
"github.com/google/uuid"
|
||||
"github.com/labstack/echo/v4"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
fbcontext "code.freebrio.com/fb-go/lib/context"
|
||||
"code.freebrio.com/fb-go/lib/gorm/logger"
|
||||
fbcontext "code.mylomen.com/syj/lib/context"
|
||||
"code.mylomen.com/syj/lib/gorm/logger"
|
||||
|
||||
_ "github.com/spf13/viper/remote"
|
||||
"gorm.io/driver/mysql"
|
||||
@ -40,7 +41,7 @@ func getInstance() *gorm.DB {
|
||||
})
|
||||
|
||||
if instanceErr != nil {
|
||||
utils.Log().Sugar().Errorf("mysql_getInstance instanceErr: %v", instanceErr)
|
||||
fbl.Log().Sugar().Errorf("mysql_getInstance instanceErr: %v", instanceErr)
|
||||
os.Exit(-1)
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package repository
|
||||
|
||||
import "code.freebrio.com/fb-go/lib/context"
|
||||
import "code.mylomen.com/syj/lib/context"
|
||||
|
||||
type thirdAgentCorpRepository interface {
|
||||
QueryPage(ctx context.GormWithZap, page, size int) *[]FThirdAgentCorpRelationDO
|
||||
|
@ -2,7 +2,7 @@ package repository
|
||||
|
||||
import (
|
||||
"ai-gateway/common/utils"
|
||||
"code.freebrio.com/fb-go/lib/context"
|
||||
"code.mylomen.com/syj/lib/context"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package repository
|
||||
|
||||
import "code.freebrio.com/fb-go/lib/context"
|
||||
import "code.mylomen.com/syj/lib/context"
|
||||
|
||||
type thirdAgentInfoRepository interface {
|
||||
QueryPage(ctx context.GormWithZap, page, size int) *[]FThirdAgentInfoDO
|
||||
|
@ -2,7 +2,7 @@ package repository
|
||||
|
||||
import (
|
||||
"ai-gateway/common/utils"
|
||||
"code.freebrio.com/fb-go/lib/context"
|
||||
"code.mylomen.com/syj/lib/context"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package repository
|
||||
|
||||
import "code.freebrio.com/fb-go/lib/context"
|
||||
import "code.mylomen.com/syj/lib/context"
|
||||
|
||||
type thirdCorpInfoRepository interface {
|
||||
QueryPage(ctx context.GormWithZap, page, size int) *[]FThirdCorpInfoDO
|
||||
|
@ -2,7 +2,7 @@ package repository
|
||||
|
||||
import (
|
||||
"ai-gateway/common/utils"
|
||||
"code.freebrio.com/fb-go/lib/context"
|
||||
"code.mylomen.com/syj/lib/context"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package repository
|
||||
|
||||
import "code.freebrio.com/fb-go/lib/context"
|
||||
import "code.mylomen.com/syj/lib/context"
|
||||
|
||||
type thirdCorpUserAccountRepository interface {
|
||||
QueryPage(ctx context.GormWithZap, page, size int) *[]FThirdCorpUserAccountDO
|
||||
|
@ -2,7 +2,7 @@ package repository
|
||||
|
||||
import (
|
||||
"ai-gateway/common/utils"
|
||||
"code.freebrio.com/fb-go/lib/context"
|
||||
"code.mylomen.com/syj/lib/context"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package repository
|
||||
|
||||
import "code.freebrio.com/fb-go/lib/context"
|
||||
import "code.mylomen.com/syj/lib/context"
|
||||
|
||||
type thirdCorpUserLogRepository interface {
|
||||
QueryList(ctx context.GormWithZap, id uint64, size int) *[]FThirdCorpUserLogDO
|
||||
|
@ -1,7 +1,7 @@
|
||||
package repository
|
||||
|
||||
import (
|
||||
"code.freebrio.com/fb-go/lib/context"
|
||||
"code.mylomen.com/syj/lib/context"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package repository
|
||||
|
||||
import "code.freebrio.com/fb-go/lib/context"
|
||||
import "code.mylomen.com/syj/lib/context"
|
||||
|
||||
type thirdUserTokenRepository interface {
|
||||
FindByToken(ctx context.GormWithZap, token string) *FThirdUserTokenDO
|
||||
|
@ -1,7 +1,7 @@
|
||||
package repository
|
||||
|
||||
import (
|
||||
"code.freebrio.com/fb-go/lib/context"
|
||||
"code.mylomen.com/syj/lib/context"
|
||||
"gorm.io/gorm/clause"
|
||||
"time"
|
||||
)
|
||||
|
@ -1,6 +1,6 @@
|
||||
package service
|
||||
|
||||
import "code.freebrio.com/fb-go/lib/context"
|
||||
import "code.mylomen.com/syj/lib/context"
|
||||
|
||||
type limit struct {
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"ai-gateway/common/utils"
|
||||
"ai-gateway/infrastructure/redis"
|
||||
"ai-gateway/infrastructure/repository"
|
||||
"code.freebrio.com/fb-go/lib/context"
|
||||
"code.mylomen.com/syj/lib/context"
|
||||
"crypto/sha256"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
|
Loading…
x
Reference in New Issue
Block a user