Migration to Bitech

This commit is contained in:
Hein
2025-11-10 11:43:15 +02:00
parent c8704c07dd
commit 3eb17666bf
21 changed files with 479 additions and 124 deletions

View File

@@ -6,7 +6,7 @@ import (
"fmt"
"strings"
"github.com/Warky-Devs/ResolveSpec/pkg/common"
"github.com/bitechdev/ResolveSpec/pkg/common"
"github.com/uptrace/bun"
)
@@ -192,7 +192,7 @@ func (b *BunSelectQuery) LeftJoin(query string, args ...interface{}) common.Sele
}
}
b.query = b.query.Join("LEFT JOIN " + joinClause, sqlArgs...)
b.query = b.query.Join("LEFT JOIN "+joinClause, sqlArgs...)
return b
}

View File

@@ -5,7 +5,7 @@ import (
"fmt"
"strings"
"github.com/Warky-Devs/ResolveSpec/pkg/common"
"github.com/bitechdev/ResolveSpec/pkg/common"
"gorm.io/gorm"
)

View File

@@ -4,12 +4,13 @@ import (
"reflect"
"strings"
"github.com/Warky-Devs/ResolveSpec/pkg/common"
"github.com/bitechdev/ResolveSpec/pkg/common"
)
// parseTableName splits a table name that may contain schema into separate schema and table
// For example: "public.users" -> ("public", "users")
// "users" -> ("", "users")
//
// "users" -> ("", "users")
func parseTableName(fullTableName string) (schema, table string) {
if idx := strings.LastIndex(fullTableName, "."); idx != -1 {
return fullTableName[:idx], fullTableName[idx+1:]

View File

@@ -3,7 +3,7 @@ package router
import (
"net/http"
"github.com/Warky-Devs/ResolveSpec/pkg/common"
"github.com/bitechdev/ResolveSpec/pkg/common"
"github.com/uptrace/bunrouter"
)
@@ -190,4 +190,3 @@ func DefaultBunRouterConfig() *BunRouterConfig {
HandleOPTIONS: true,
}
}

View File

@@ -5,7 +5,7 @@ import (
"io"
"net/http"
"github.com/Warky-Devs/ResolveSpec/pkg/common"
"github.com/bitechdev/ResolveSpec/pkg/common"
"github.com/gorilla/mux"
)

View File

@@ -5,7 +5,7 @@ import (
"reflect"
"strings"
"github.com/Warky-Devs/ResolveSpec/pkg/logger"
"github.com/bitechdev/ResolveSpec/pkg/logger"
)
// ColumnValidator validates column names against a model's fields

View File

@@ -9,8 +9,8 @@ import (
"runtime/debug"
"strings"
"github.com/Warky-Devs/ResolveSpec/pkg/common"
"github.com/Warky-Devs/ResolveSpec/pkg/logger"
"github.com/bitechdev/ResolveSpec/pkg/common"
"github.com/bitechdev/ResolveSpec/pkg/logger"
)
// Handler handles API requests using database and model abstractions

View File

@@ -3,9 +3,9 @@ package resolvespec
import (
"net/http"
"github.com/Warky-Devs/ResolveSpec/pkg/common/adapters/database"
"github.com/Warky-Devs/ResolveSpec/pkg/common/adapters/router"
"github.com/Warky-Devs/ResolveSpec/pkg/modelregistry"
"github.com/bitechdev/ResolveSpec/pkg/common/adapters/database"
"github.com/bitechdev/ResolveSpec/pkg/common/adapters/router"
"github.com/bitechdev/ResolveSpec/pkg/modelregistry"
"github.com/gorilla/mux"
"github.com/uptrace/bun"
"github.com/uptrace/bunrouter"

View File

@@ -4,7 +4,7 @@ import (
"fmt"
"strings"
"github.com/Warky-Devs/ResolveSpec/pkg/common"
"github.com/bitechdev/ResolveSpec/pkg/common"
)
// CursorDirection defines pagination direction

View File

@@ -9,9 +9,9 @@ import (
"runtime/debug"
"strings"
"github.com/Warky-Devs/ResolveSpec/pkg/common"
"github.com/Warky-Devs/ResolveSpec/pkg/common/adapters/database"
"github.com/Warky-Devs/ResolveSpec/pkg/logger"
"github.com/bitechdev/ResolveSpec/pkg/common"
"github.com/bitechdev/ResolveSpec/pkg/common/adapters/database"
"github.com/bitechdev/ResolveSpec/pkg/logger"
)
// Handler handles API requests using database and model abstractions

View File

@@ -8,8 +8,8 @@ import (
"strconv"
"strings"
"github.com/Warky-Devs/ResolveSpec/pkg/common"
"github.com/Warky-Devs/ResolveSpec/pkg/logger"
"github.com/bitechdev/ResolveSpec/pkg/common"
"github.com/bitechdev/ResolveSpec/pkg/logger"
)
// ExtendedRequestOptions extends common.RequestOptions with additional features

View File

@@ -4,8 +4,8 @@ import (
"context"
"fmt"
"github.com/Warky-Devs/ResolveSpec/pkg/common"
"github.com/Warky-Devs/ResolveSpec/pkg/logger"
"github.com/bitechdev/ResolveSpec/pkg/common"
"github.com/bitechdev/ResolveSpec/pkg/logger"
)
// HookType defines the type of hook to execute

View File

@@ -3,7 +3,7 @@ package restheadspec
import (
"fmt"
"github.com/Warky-Devs/ResolveSpec/pkg/logger"
"github.com/bitechdev/ResolveSpec/pkg/logger"
)
// This file contains example implementations showing how to use hooks

View File

@@ -55,9 +55,9 @@ package restheadspec
import (
"net/http"
"github.com/Warky-Devs/ResolveSpec/pkg/common/adapters/database"
"github.com/Warky-Devs/ResolveSpec/pkg/common/adapters/router"
"github.com/Warky-Devs/ResolveSpec/pkg/modelregistry"
"github.com/bitechdev/ResolveSpec/pkg/common/adapters/database"
"github.com/bitechdev/ResolveSpec/pkg/common/adapters/router"
"github.com/bitechdev/ResolveSpec/pkg/modelregistry"
"github.com/gorilla/mux"
"github.com/uptrace/bun"
"github.com/uptrace/bunrouter"

View File

@@ -3,7 +3,7 @@ package testmodels
import (
"time"
"github.com/Warky-Devs/ResolveSpec/pkg/modelregistry"
"github.com/bitechdev/ResolveSpec/pkg/modelregistry"
)
// Department represents a company department