feat: add mongo
This commit is contained in:
parent
299615b12a
commit
56cd661094
|
@ -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
|
||||
|
|
2
go.work
2
go.work
|
@ -4,7 +4,7 @@ use (
|
|||
.
|
||||
./errs
|
||||
./jwt
|
||||
./storage/mongo
|
||||
./mongo
|
||||
./utils/bitmap
|
||||
./utils/invited_code
|
||||
./validator
|
||||
|
|
|
@ -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"
|
|
@ -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 {
|
|
@ -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"
|
Loading…
Reference in New Issue