chore: migrate to gitea
This commit is contained in:
@@ -1,12 +1,13 @@
|
|||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"budget/ginserver"
|
|
||||||
"budget/handler"
|
|
||||||
"budget/internal/utils"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/ginserver"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/handler"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/utils"
|
||||||
|
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
package ginserver
|
package ginserver
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"budget/internal/utils"
|
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/utils"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,17 @@
|
|||||||
package ginserver
|
package ginserver
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"budget/handler"
|
|
||||||
"budget/internal/account"
|
|
||||||
"budget/internal/expense"
|
|
||||||
"budget/internal/jointaccount"
|
|
||||||
"budget/internal/storage/dao/postgresql"
|
|
||||||
"budget/internal/user"
|
|
||||||
"budget/middleware"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/handler"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/account"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/expense"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/jointaccount"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/dao/postgresql"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/user"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/middleware"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
|
|
||||||
"github.com/gin-contrib/cors"
|
"github.com/gin-contrib/cors"
|
||||||
|
|||||||
4
go.mod
4
go.mod
@@ -1,6 +1,6 @@
|
|||||||
module budget
|
module budget-backend
|
||||||
|
|
||||||
go 1.17
|
go 1.24
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/gin-contrib/cors v1.3.1
|
github.com/gin-contrib/cors v1.3.1
|
||||||
|
|||||||
1
go.sum
1
go.sum
@@ -316,7 +316,6 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc
|
|||||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||||
github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=
|
github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=
|
||||||
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
|
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
|
||||||
github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo=
|
|
||||||
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
|
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
|
||||||
github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs=
|
github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs=
|
||||||
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
|
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
package handler
|
package handler
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"budget/internal/storage/validators"
|
|
||||||
"budget/internal/utils"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"reflect"
|
"reflect"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/validators"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/utils"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"gopkg.in/go-playground/validator.v9"
|
"gopkg.in/go-playground/validator.v9"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
package account
|
package account
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"budget/internal/storage/dao"
|
|
||||||
"budget/internal/storage/dao/postgresql"
|
|
||||||
"budget/internal/utils"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/dao"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/dao/postgresql"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/utils"
|
||||||
|
|
||||||
"github.com/lib/pq"
|
"github.com/lib/pq"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
package account
|
package account
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"budget/handler"
|
|
||||||
"budget/internal/storage/dao/postgresql"
|
|
||||||
"budget/internal/storage/model"
|
|
||||||
"budget/internal/storage/validators"
|
|
||||||
"budget/internal/user"
|
|
||||||
"budget/internal/utils"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/handler"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/dao/postgresql"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/model"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/validators"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/user"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/utils"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package account
|
package account
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"budget/internal/storage/dao"
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/dao"
|
||||||
"budget/internal/storage/model"
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Service struct {
|
type Service struct {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package expense
|
package expense
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"budget/internal/storage/dao/postgresql"
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/dao/postgresql"
|
||||||
"budget/internal/utils"
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/utils"
|
||||||
|
|
||||||
"github.com/lib/pq"
|
"github.com/lib/pq"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,16 +1,17 @@
|
|||||||
package expense
|
package expense
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"budget/handler"
|
|
||||||
"budget/internal/account"
|
|
||||||
"budget/internal/storage/dao/postgresql"
|
|
||||||
"budget/internal/storage/model"
|
|
||||||
"budget/internal/storage/validators"
|
|
||||||
"budget/internal/utils"
|
|
||||||
"encoding/csv"
|
"encoding/csv"
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/handler"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/account"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/dao/postgresql"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/model"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/validators"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/utils"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
package expense
|
package expense
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"budget/internal/account"
|
|
||||||
"budget/internal/storage/dao"
|
|
||||||
"budget/internal/storage/model"
|
|
||||||
"budget/internal/utils"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/account"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/dao"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/model"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Service struct {
|
type Service struct {
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
package jointaccount
|
package jointaccount
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"budget/internal/storage/dao"
|
|
||||||
"budget/internal/storage/dao/postgresql"
|
|
||||||
"budget/internal/utils"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/dao"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/dao/postgresql"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/utils"
|
||||||
|
|
||||||
"github.com/lib/pq"
|
"github.com/lib/pq"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
package jointaccount
|
package jointaccount
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"budget/handler"
|
|
||||||
"budget/internal/storage/dao/postgresql"
|
|
||||||
"budget/internal/storage/model"
|
|
||||||
"budget/internal/storage/validators"
|
|
||||||
"budget/internal/user"
|
|
||||||
"budget/internal/utils"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/handler"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/dao/postgresql"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/model"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/validators"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/user"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/utils"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package jointaccount
|
package jointaccount
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"budget/internal/storage/dao"
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/dao"
|
||||||
"budget/internal/storage/model"
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Service struct {
|
type Service struct {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package jointexpense
|
package jointexpense
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"budget/internal/storage/dao/postgresql"
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/dao/postgresql"
|
||||||
"budget/internal/utils"
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/utils"
|
||||||
|
|
||||||
"github.com/lib/pq"
|
"github.com/lib/pq"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,16 +1,17 @@
|
|||||||
package jointexpense
|
package jointexpense
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"budget/handler"
|
|
||||||
"budget/internal/jointaccount"
|
|
||||||
"budget/internal/storage/dao/postgresql"
|
|
||||||
"budget/internal/storage/model"
|
|
||||||
"budget/internal/storage/validators"
|
|
||||||
"budget/internal/utils"
|
|
||||||
"encoding/csv"
|
"encoding/csv"
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/handler"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/jointaccount"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/dao/postgresql"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/model"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/validators"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/utils"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
package jointexpense
|
package jointexpense
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"budget/internal/jointaccount"
|
|
||||||
"budget/internal/storage/dao"
|
|
||||||
"budget/internal/storage/model"
|
|
||||||
"budget/internal/utils"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/jointaccount"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/dao"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/model"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Service struct {
|
type Service struct {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package sharedaccount
|
package sharedaccount
|
||||||
|
|
||||||
import "budget/internal/storage/dao/postgresql"
|
import "gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/dao/postgresql"
|
||||||
|
|
||||||
type Database struct {
|
type Database struct {
|
||||||
*postgresql.DatabasePostgreSQL
|
*postgresql.DatabasePostgreSQL
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package sharedaccount
|
package sharedaccount
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"budget/handler"
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/handler"
|
||||||
"budget/internal/storage/dao/postgresql"
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/dao/postgresql"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
package postgresql
|
package postgresql
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"budget/internal/storage/dao"
|
|
||||||
"budget/internal/utils"
|
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/dao"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/utils"
|
||||||
|
|
||||||
"github.com/lib/pq"
|
"github.com/lib/pq"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
package validators
|
package validators
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"budget/internal/storage/model"
|
|
||||||
"budget/internal/utils"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/model"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/utils"
|
||||||
|
|
||||||
"gopkg.in/go-playground/validator.v9"
|
"gopkg.in/go-playground/validator.v9"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
package user
|
package user
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"budget/internal/storage/dao"
|
|
||||||
"budget/internal/storage/dao/postgresql"
|
|
||||||
"database/sql"
|
"database/sql"
|
||||||
|
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/dao"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/dao/postgresql"
|
||||||
|
|
||||||
"github.com/lib/pq"
|
"github.com/lib/pq"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
package user
|
package user
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"budget/handler"
|
|
||||||
"budget/internal/storage/dao/postgresql"
|
|
||||||
"budget/internal/storage/model"
|
|
||||||
"budget/internal/utils"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/handler"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/dao/postgresql"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/model"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/utils"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"google.golang.org/api/oauth2/v2"
|
"google.golang.org/api/oauth2/v2"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package user
|
package user
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"budget/internal/storage/dao"
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/dao"
|
||||||
"budget/internal/storage/model"
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Service struct {
|
type Service struct {
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
package utils
|
package utils
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"budget/internal/storage/model"
|
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func JSON(w http.ResponseWriter, status int, data interface{}) {
|
func JSON(w http.ResponseWriter, status int, data interface{}) {
|
||||||
|
|||||||
3
main.go
3
main.go
@@ -1,9 +1,10 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"budget/cmd"
|
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/cmd"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
package middleware
|
package middleware
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"budget/internal/storage/model"
|
|
||||||
"budget/internal/utils"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/model"
|
||||||
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/utils"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"google.golang.org/api/oauth2/v1"
|
"google.golang.org/api/oauth2/v1"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
package middleware
|
package middleware
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"budget/handler"
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/handler"
|
||||||
"budget/internal/account"
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/account"
|
||||||
"budget/internal/jointaccount"
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/jointaccount"
|
||||||
"budget/internal/storage/dao/postgresql"
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/dao/postgresql"
|
||||||
"budget/internal/storage/model"
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/model"
|
||||||
"budget/internal/storage/validators"
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/storage/validators"
|
||||||
"budget/internal/user"
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/user"
|
||||||
"budget/internal/utils"
|
"gitea.frenchtouch.duckdns.org/kratisto/budget-backend/internal/utils"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user