feat: add mongo

This commit is contained in:
王性驊 2024-12-24 19:04:03 +08:00
parent 299615b12a
commit 56cd661094
10 changed files with 10 additions and 6 deletions

View File

@ -1,10 +1,11 @@
package errs
import (
"code.30cm.net/digimon/library-go/errs/code"
"fmt"
"github.com/zeromicro/go-zero/core/logx"
"strings"
"code.30cm.net/digimon/library-go/errs/code"
"github.com/zeromicro/go-zero/core/logx"
)
type ErrorCode uint32

View File

@ -4,7 +4,7 @@ use (
.
./errs
./jwt
./storage/mongo
./mongo
./utils/bitmap
./utils/invited_code
./validator

View File

@ -3,6 +3,7 @@ package mongo
import (
"context"
"fmt"
"github.com/zeromicro/go-zero/core/stores/cache"
"github.com/zeromicro/go-zero/core/stores/mon"
"go.mongodb.org/mongo-driver/mongo"

View File

@ -4,15 +4,16 @@ import (
"context"
"errors"
"fmt"
"net/url"
"strings"
"time"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/core/stores/mon"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
"go.mongodb.org/mongo-driver/mongo/readpref"
"net/url"
"strings"
"time"
)
type DocumentDB struct {

View File

@ -2,6 +2,7 @@ package mongo
import (
"context"
"github.com/zeromicro/go-zero/core/stores/mon"
"go.mongodb.org/mongo-driver/mongo"
mopt "go.mongodb.org/mongo-driver/mongo/options"