first commit

This commit is contained in:
Nimer Farahty 2025-05-31 18:38:25 +03:00
parent f729f0c48f
commit 1ac40acc04
19 changed files with 39 additions and 39 deletions

View File

@ -4,7 +4,7 @@ import (
"context"
"fmt"
"github.com/farahty/go-mongo/models"
"git.farahty.com/nimer/go-mongo/models"
)
type contextKey struct {

View File

@ -7,11 +7,11 @@ import (
"log"
"os"
"git.farahty.com/nimer/go-mongo/models"
"github.com/99designs/gqlgen/graphql"
"github.com/99designs/gqlgen/graphql/handler/transport"
"github.com/casbin/casbin/v2"
mongodbadapter "github.com/casbin/mongodb-adapter/v3"
"github.com/farahty/go-mongo/models"
"github.com/golang-jwt/jwt/v4"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo/options"

View File

@ -5,7 +5,7 @@ import (
"os"
"strings"
"github.com/farahty/go-mongo/models"
"git.farahty.com/nimer/go-mongo/models"
"github.com/golang-jwt/jwt/v4"
"github.com/mitchellh/mapstructure"
)

View File

@ -6,7 +6,7 @@ import (
"net/http"
"reflect"
"github.com/farahty/go-mongo/models"
"git.farahty.com/nimer/go-mongo/models"
"github.com/graph-gophers/dataloader"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/bson/primitive"

View File

@ -4,7 +4,7 @@ import (
"encoding/json"
"net/http"
userService "github.com/farahty/go-mongo/services/user"
userService "git.farahty.com/nimer/go-mongo/services/user"
"github.com/go-chi/chi/v5"
)

View File

@ -4,8 +4,8 @@ import (
"context"
"fmt"
"git.farahty.com/nimer/go-mongo/app"
"github.com/99designs/gqlgen/graphql"
"github.com/farahty/go-mongo/app"
)
func Auth(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) {

View File

@ -15,8 +15,8 @@ import (
"github.com/99designs/gqlgen/graphql"
"github.com/99designs/gqlgen/graphql/introspection"
"github.com/farahty/go-mongo/app"
"github.com/farahty/go-mongo/models"
"git.farahty.com/nimer/go-mongo/app"
"git.farahty.com/nimer/go-mongo/models"
gqlparser "github.com/vektah/gqlparser/v2"
"github.com/vektah/gqlparser/v2/ast"
"go.mongodb.org/mongo-driver/bson/primitive"

2
go.mod
View File

@ -1,4 +1,4 @@
module github.com/farahty/go-mongo
module git.farahty.com/nimer/go-mongo
go 1.23.0

View File

@ -9,7 +9,7 @@ import (
"log"
"net/http"
"github.com/farahty/go-mongo/app"
"git.farahty.com/nimer/go-mongo/app"
"github.com/fatih/color"
"github.com/joho/godotenv"
"github.com/redis/go-redis/v9"

View File

@ -7,9 +7,9 @@ package resolvers
import (
"context"
"github.com/farahty/go-mongo/generated"
"github.com/farahty/go-mongo/models"
authService "github.com/farahty/go-mongo/services/auth"
"git.farahty.com/nimer/go-mongo/generated"
"git.farahty.com/nimer/go-mongo/models"
authService "git.farahty.com/nimer/go-mongo/services/auth"
)
// Login is the resolver for the login field.

View File

@ -7,10 +7,10 @@ package resolvers
import (
"context"
"github.com/farahty/go-mongo/generated"
"github.com/farahty/go-mongo/models"
categoryService "github.com/farahty/go-mongo/services/category"
userService "github.com/farahty/go-mongo/services/user"
"git.farahty.com/nimer/go-mongo/generated"
"git.farahty.com/nimer/go-mongo/models"
categoryService "git.farahty.com/nimer/go-mongo/services/category"
userService "git.farahty.com/nimer/go-mongo/services/user"
"go.mongodb.org/mongo-driver/bson/primitive"
)

View File

@ -8,10 +8,10 @@ import (
"context"
"encoding/json"
"github.com/farahty/go-mongo/generated"
"github.com/farahty/go-mongo/models"
todoService "github.com/farahty/go-mongo/services/todo"
userService "github.com/farahty/go-mongo/services/user"
"git.farahty.com/nimer/go-mongo/generated"
"git.farahty.com/nimer/go-mongo/models"
todoService "git.farahty.com/nimer/go-mongo/services/todo"
userService "git.farahty.com/nimer/go-mongo/services/user"
"go.mongodb.org/mongo-driver/bson/primitive"
)

View File

@ -7,9 +7,9 @@ package resolvers
import (
"context"
"github.com/farahty/go-mongo/generated"
"github.com/farahty/go-mongo/models"
userService "github.com/farahty/go-mongo/services/user"
"git.farahty.com/nimer/go-mongo/generated"
"git.farahty.com/nimer/go-mongo/models"
userService "git.farahty.com/nimer/go-mongo/services/user"
)
// CreateUser is the resolver for the createUser field.

View File

@ -5,16 +5,16 @@ import (
"os"
"time"
"git.farahty.com/nimer/go-mongo/app"
"git.farahty.com/nimer/go-mongo/controllers"
"git.farahty.com/nimer/go-mongo/directives"
"git.farahty.com/nimer/go-mongo/generated"
"github.com/99designs/gqlgen/graphql/handler"
"github.com/99designs/gqlgen/graphql/handler/extension"
"github.com/99designs/gqlgen/graphql/handler/transport"
"github.com/99designs/gqlgen/graphql/playground"
"github.com/farahty/go-mongo/app"
"github.com/farahty/go-mongo/controllers"
"github.com/farahty/go-mongo/directives"
"github.com/farahty/go-mongo/generated"
"github.com/farahty/go-mongo/resolvers"
"git.farahty.com/nimer/go-mongo/resolvers"
"github.com/go-chi/chi/v5"
"github.com/go-chi/chi/v5/middleware"
"github.com/go-chi/httprate"

View File

@ -4,8 +4,8 @@ import (
"context"
"fmt"
"github.com/farahty/go-mongo/app"
"github.com/farahty/go-mongo/models"
"git.farahty.com/nimer/go-mongo/app"
"git.farahty.com/nimer/go-mongo/models"
"go.mongodb.org/mongo-driver/bson"
)

View File

@ -5,8 +5,8 @@ import (
"encoding/hex"
"os"
"github.com/farahty/go-mongo/app"
"github.com/farahty/go-mongo/models"
"git.farahty.com/nimer/go-mongo/app"
"git.farahty.com/nimer/go-mongo/models"
"github.com/google/uuid"
"go.mongodb.org/mongo-driver/bson"
)

View File

@ -3,8 +3,8 @@ package categoryService
import (
"context"
"github.com/farahty/go-mongo/app"
"github.com/farahty/go-mongo/models"
"git.farahty.com/nimer/go-mongo/app"
"git.farahty.com/nimer/go-mongo/models"
"github.com/graph-gophers/dataloader"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/bson/primitive"

View File

@ -3,8 +3,8 @@ package todoService
import (
"context"
"github.com/farahty/go-mongo/app"
"github.com/farahty/go-mongo/models"
"git.farahty.com/nimer/go-mongo/app"
"git.farahty.com/nimer/go-mongo/models"
"github.com/graph-gophers/dataloader"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/bson/primitive"

View File

@ -3,8 +3,8 @@ package userService
import (
"context"
"github.com/farahty/go-mongo/app"
"github.com/farahty/go-mongo/models"
"git.farahty.com/nimer/go-mongo/app"
"git.farahty.com/nimer/go-mongo/models"
"github.com/graph-gophers/dataloader"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/bson/primitive"