Update Infra
This commit is contained in:
parent
ffd40d4f51
commit
3c80b710af
2
Makefile
2
Makefile
@ -1,4 +1,4 @@
|
||||
PROJECT_NAME = "furtuna-backend"
|
||||
PROJECT_NAME = "enaklo-pos-backend"
|
||||
DB_USERNAME := fortuna_admin
|
||||
DB_PASSWORD := Z4G827t9428QFQ%5ESZXW%2343dB%25%214Bmh80
|
||||
DB_HOST := 103.96.146.124
|
||||
|
||||
@ -57,8 +57,8 @@ $ ./bin/http-server --env-path ./config/env/.env
|
||||
```
|
||||
|
||||
## API Docs
|
||||
* [furtuna Backend](https://furtuna-be.app-dev.altru.id/docs/index.html#/)
|
||||
* [enaklo-pos Backend](https://enaklo-pos-be.app-dev.altru.id/docs/index.html#/)
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under the [MIT License](https://github.com/pvarentsov/furtuna-be/blob/main/LICENSE).
|
||||
This project is licensed under the [MIT License](https://github.com/pvarentsov/enaklo-pos-be/blob/main/LICENSE).
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
server:
|
||||
base-url: https://api.furtuna.id/core
|
||||
base-url: https://api.enaklo-pos.id/core
|
||||
local-url: http://localhost:3300
|
||||
port: 3300
|
||||
|
||||
@ -15,8 +15,8 @@ jwt:
|
||||
secret: "909Lm25V3Qd7aut8dr4QUxm5PZUrSFs"
|
||||
|
||||
postgresql:
|
||||
host: 103.96.146.124
|
||||
port: 2010
|
||||
host: 62.72.45.250
|
||||
port: 22010
|
||||
driver: postgres
|
||||
db: enaklo-pos-staging
|
||||
username: admin
|
||||
@ -31,7 +31,7 @@ oss:
|
||||
access_key_id: e50b31e5eddf63c0ZKB2
|
||||
access_key_secret: GAyX9jiCWyTwgJMuqzun2x0zHS3kjQt26kyzY21S
|
||||
endpoint: obs.eranyacloud.com
|
||||
bucket_name: furtuna-dev
|
||||
bucket_name: enaklo-pos
|
||||
log_level: Error # type: LogOff, Debug, Error, Warn, Info
|
||||
host_url: https://obs.eranyacloud.com
|
||||
|
||||
@ -47,20 +47,20 @@ linkqu:
|
||||
signature_key: "LinkQu@2020"
|
||||
username: "LI307GXIN"
|
||||
pin: "2K2NPCBBNNTovgB"
|
||||
callback_url: "https://furtuna-be.app-dev.altru.id/api/v1/linkqu/callback"
|
||||
callback_url: "https://enaklo-pos-be.app-dev.altru.id/api/v1/linkqu/callback"
|
||||
|
||||
brevo:
|
||||
api_key: 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
|
||||
|
||||
email:
|
||||
sender: "furtuna.official@gmail.com"
|
||||
sender_customer: "furtuna.official@gmail.com"
|
||||
sender: "enaklo-pos.official@gmail.com"
|
||||
sender_customer: "enaklo-pos.official@gmail.com"
|
||||
reset_password:
|
||||
template_name: "reset_password"
|
||||
template_path: "templates/reset_password.html"
|
||||
template_path_customer: "templates/reset_password_customer.html"
|
||||
subject: "Reset Password"
|
||||
opening_word: "Terima kasih sudah menjadi bagian dari Furtuna. Anda telah berhasil melakukan reset password, silakan masukan unik password yang dibuat oleh sistem dibawah ini:"
|
||||
opening_word: "Terima kasih sudah menjadi bagian dari enaklo-pos. Anda telah berhasil melakukan reset password, silakan masukan unik password yang dibuat oleh sistem dibawah ini:"
|
||||
closing_word: "Silakan login kembali menggunakan email dan password anda diatas, sistem akan secara otomatis meminta anda untuk membuat password baru setelah berhasil login. Mohon maaf atas kendala yang dialami."
|
||||
|
||||
order:
|
||||
@ -72,17 +72,17 @@ withdrawal:
|
||||
discovery:
|
||||
explore_destinations:
|
||||
- name: "Jakarta"
|
||||
image_url: "https://obs.eranyacloud.com/furtuna-dev/file/03c0b046-43ab-4d35-a743-6a173bc66b90-1722680749.png"
|
||||
image_url: "https://obs.eranyacloud.com/enaklo-pos-dev/file/03c0b046-43ab-4d35-a743-6a173bc66b90-1722680749.png"
|
||||
- name: "Banten"
|
||||
image_url: "https://obs.eranyacloud.com/furtuna-dev/file/c8e7dd8a-17be-449f-afdc-0c07eda438ce-1722680809.png"
|
||||
image_url: "https://obs.eranyacloud.com/enaklo-pos-dev/file/c8e7dd8a-17be-449f-afdc-0c07eda438ce-1722680809.png"
|
||||
- name: "Yogyakarta"
|
||||
image_url: "https://obs.eranyacloud.com/furtuna-dev/file/83b78c19-4c97-48c9-bc97-a7403e1c4eed-1722680828.png"
|
||||
image_url: "https://obs.eranyacloud.com/enaklo-pos-dev/file/83b78c19-4c97-48c9-bc97-a7403e1c4eed-1722680828.png"
|
||||
- name: "Jawa Barat"
|
||||
image_url: "https://obs.eranyacloud.com/furtuna-dev/file/07c35ab1-3e20-4858-8d7d-b29517239dc3-1722680848.png"
|
||||
image_url: "https://obs.eranyacloud.com/enaklo-pos-dev/file/07c35ab1-3e20-4858-8d7d-b29517239dc3-1722680848.png"
|
||||
- name: "Jawa Tengah"
|
||||
image_url: "https://obs.eranyacloud.com/furtuna-dev/file/a1915a98-c2aa-4997-8e75-bd4e43789b0c-1722680874.png"
|
||||
image_url: "https://obs.eranyacloud.com/enaklo-pos-dev/file/a1915a98-c2aa-4997-8e75-bd4e43789b0c-1722680874.png"
|
||||
- name: "Jawa Timur"
|
||||
image_url: "https://obs.eranyacloud.com/furtuna-dev/file/7b5d2b86-e8a8-4703-a153-c186021cf088-1722680894.png"
|
||||
image_url: "https://obs.eranyacloud.com/enaklo-pos-dev/file/7b5d2b86-e8a8-4703-a153-c186021cf088-1722680894.png"
|
||||
explore_regions:
|
||||
- name: "Jawa"
|
||||
- name: "Sumatera"
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"enaklo-pos-be/config"
|
||||
"fmt"
|
||||
"furtuna-be/config"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/gofrs/uuid"
|
||||
|
||||
"furtuna-be/internal/middlewares"
|
||||
"enaklo-pos-be/internal/middlewares"
|
||||
)
|
||||
|
||||
func NewServer(cfg *config.Config) *Server {
|
||||
|
||||
@ -9,7 +9,7 @@ import (
|
||||
"gorm.io/driver/postgres"
|
||||
"gorm.io/gorm"
|
||||
|
||||
"furtuna-be/config"
|
||||
"enaklo-pos-be/config"
|
||||
)
|
||||
|
||||
func NewPostgres(c config.Database) (*gorm.DB, error) {
|
||||
|
||||
@ -9,7 +9,7 @@ import (
|
||||
|
||||
"go.uber.org/zap"
|
||||
|
||||
"furtuna-be/internal/common/logger"
|
||||
"enaklo-pos-be/internal/common/logger"
|
||||
)
|
||||
|
||||
type HttpClient struct {
|
||||
|
||||
@ -2,8 +2,8 @@ package logger
|
||||
|
||||
import (
|
||||
"context"
|
||||
"enaklo-pos-be/internal/constants"
|
||||
"fmt"
|
||||
"furtuna-be/internal/constants"
|
||||
"sync"
|
||||
|
||||
"go.uber.org/zap"
|
||||
|
||||
@ -2,8 +2,8 @@ package mycontext
|
||||
|
||||
import (
|
||||
"context"
|
||||
"furtuna-be/internal/constants/role"
|
||||
"furtuna-be/internal/entity"
|
||||
"enaklo-pos-be/internal/constants/role"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
)
|
||||
|
||||
type ContextKey string
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
package entity
|
||||
|
||||
import (
|
||||
"furtuna-be/internal/constants/role"
|
||||
"furtuna-be/internal/constants/userstatus"
|
||||
"enaklo-pos-be/internal/constants/role"
|
||||
"enaklo-pos-be/internal/constants/userstatus"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
package entity
|
||||
|
||||
import (
|
||||
"furtuna-be/internal/constants/role"
|
||||
"furtuna-be/internal/constants/userstatus"
|
||||
"enaklo-pos-be/internal/constants/role"
|
||||
"enaklo-pos-be/internal/constants/userstatus"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package entity
|
||||
|
||||
import (
|
||||
"furtuna-be/internal/constants/product"
|
||||
"enaklo-pos-be/internal/constants/product"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package entity
|
||||
|
||||
import (
|
||||
"furtuna-be/internal/constants/studio"
|
||||
"enaklo-pos-be/internal/constants/studio"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package entity
|
||||
|
||||
import (
|
||||
"enaklo-pos-be/internal/constants/role"
|
||||
"enaklo-pos-be/internal/constants/userstatus"
|
||||
"errors"
|
||||
"furtuna-be/internal/constants/role"
|
||||
"furtuna-be/internal/constants/userstatus"
|
||||
"time"
|
||||
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
package auth
|
||||
|
||||
import (
|
||||
"enaklo-pos-be/internal/constants/role"
|
||||
"fmt"
|
||||
"furtuna-be/internal/constants/role"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"furtuna-be/internal/common/errors"
|
||||
auth2 "furtuna-be/internal/handlers/request"
|
||||
"furtuna-be/internal/handlers/response"
|
||||
"furtuna-be/internal/services"
|
||||
"enaklo-pos-be/internal/common/errors"
|
||||
auth2 "enaklo-pos-be/internal/handlers/request"
|
||||
"enaklo-pos-be/internal/handlers/response"
|
||||
"enaklo-pos-be/internal/services"
|
||||
)
|
||||
|
||||
type AuthHandler struct {
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
package balance
|
||||
|
||||
import (
|
||||
"furtuna-be/internal/common/errors"
|
||||
"furtuna-be/internal/entity"
|
||||
"furtuna-be/internal/handlers/request"
|
||||
"furtuna-be/internal/handlers/response"
|
||||
"furtuna-be/internal/services"
|
||||
"enaklo-pos-be/internal/common/errors"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"enaklo-pos-be/internal/handlers/request"
|
||||
"enaklo-pos-be/internal/handlers/response"
|
||||
"enaklo-pos-be/internal/services"
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
@ -7,10 +7,10 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"furtuna-be/internal/common/errors"
|
||||
auth2 "furtuna-be/internal/handlers/request"
|
||||
"furtuna-be/internal/handlers/response"
|
||||
"furtuna-be/internal/services"
|
||||
"enaklo-pos-be/internal/common/errors"
|
||||
auth2 "enaklo-pos-be/internal/handlers/request"
|
||||
"enaklo-pos-be/internal/handlers/response"
|
||||
"enaklo-pos-be/internal/services"
|
||||
)
|
||||
|
||||
type AuthHandler struct {
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
package customerorder
|
||||
|
||||
import (
|
||||
"enaklo-pos-be/internal/common/errors"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"enaklo-pos-be/internal/handlers/request"
|
||||
"enaklo-pos-be/internal/handlers/response"
|
||||
"enaklo-pos-be/internal/services"
|
||||
"enaklo-pos-be/internal/utils"
|
||||
"encoding/json"
|
||||
"furtuna-be/internal/common/errors"
|
||||
"furtuna-be/internal/entity"
|
||||
"furtuna-be/internal/handlers/request"
|
||||
"furtuna-be/internal/handlers/response"
|
||||
"furtuna-be/internal/services"
|
||||
"furtuna-be/internal/utils"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
package discovery
|
||||
|
||||
import (
|
||||
"furtuna-be/internal/common/errors"
|
||||
"furtuna-be/internal/entity"
|
||||
"furtuna-be/internal/handlers/request"
|
||||
"furtuna-be/internal/handlers/response"
|
||||
"furtuna-be/internal/services"
|
||||
"enaklo-pos-be/internal/common/errors"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"enaklo-pos-be/internal/handlers/request"
|
||||
"enaklo-pos-be/internal/handlers/response"
|
||||
"enaklo-pos-be/internal/services"
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
@ -7,11 +7,11 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"furtuna-be/internal/common/errors"
|
||||
"furtuna-be/internal/entity"
|
||||
"furtuna-be/internal/handlers/request"
|
||||
"furtuna-be/internal/handlers/response"
|
||||
"furtuna-be/internal/services"
|
||||
"enaklo-pos-be/internal/common/errors"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"enaklo-pos-be/internal/handlers/request"
|
||||
"enaklo-pos-be/internal/handlers/response"
|
||||
"enaklo-pos-be/internal/services"
|
||||
)
|
||||
|
||||
type Handler struct {
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
package license
|
||||
|
||||
import (
|
||||
"furtuna-be/internal/common/errors"
|
||||
"furtuna-be/internal/handlers/request"
|
||||
"furtuna-be/internal/handlers/response"
|
||||
"furtuna-be/internal/middlewares"
|
||||
"furtuna-be/internal/services"
|
||||
"enaklo-pos-be/internal/common/errors"
|
||||
"enaklo-pos-be/internal/handlers/request"
|
||||
"enaklo-pos-be/internal/handlers/response"
|
||||
"enaklo-pos-be/internal/middlewares"
|
||||
"enaklo-pos-be/internal/services"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/go-playground/validator/v10"
|
||||
"net/http"
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
package linkqu
|
||||
|
||||
import (
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"enaklo-pos-be/internal/handlers/request"
|
||||
"enaklo-pos-be/internal/handlers/response"
|
||||
"enaklo-pos-be/internal/services"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"furtuna-be/internal/entity"
|
||||
"furtuna-be/internal/handlers/request"
|
||||
"furtuna-be/internal/handlers/response"
|
||||
"furtuna-be/internal/services"
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package mdtrns
|
||||
|
||||
import (
|
||||
"furtuna-be/internal/handlers/request"
|
||||
"furtuna-be/internal/handlers/response"
|
||||
"furtuna-be/internal/services"
|
||||
"enaklo-pos-be/internal/handlers/request"
|
||||
"enaklo-pos-be/internal/handlers/response"
|
||||
"enaklo-pos-be/internal/services"
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
package order
|
||||
|
||||
import (
|
||||
"furtuna-be/internal/common/errors"
|
||||
"furtuna-be/internal/entity"
|
||||
"furtuna-be/internal/handlers/request"
|
||||
"furtuna-be/internal/handlers/response"
|
||||
"furtuna-be/internal/services"
|
||||
"enaklo-pos-be/internal/common/errors"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"enaklo-pos-be/internal/handlers/request"
|
||||
"enaklo-pos-be/internal/handlers/response"
|
||||
"enaklo-pos-be/internal/services"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
package oss
|
||||
|
||||
import (
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"enaklo-pos-be/internal/handlers/response"
|
||||
"enaklo-pos-be/internal/services"
|
||||
"fmt"
|
||||
"furtuna-be/internal/entity"
|
||||
"furtuna-be/internal/handlers/response"
|
||||
"furtuna-be/internal/services"
|
||||
"mime/multipart"
|
||||
"net/http"
|
||||
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
package partner
|
||||
|
||||
import (
|
||||
"furtuna-be/internal/common/errors"
|
||||
"furtuna-be/internal/entity"
|
||||
"furtuna-be/internal/handlers/request"
|
||||
"furtuna-be/internal/handlers/response"
|
||||
"furtuna-be/internal/middlewares"
|
||||
"furtuna-be/internal/services"
|
||||
"enaklo-pos-be/internal/common/errors"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"enaklo-pos-be/internal/handlers/request"
|
||||
"enaklo-pos-be/internal/handlers/response"
|
||||
"enaklo-pos-be/internal/middlewares"
|
||||
"enaklo-pos-be/internal/services"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
package product
|
||||
|
||||
import (
|
||||
"furtuna-be/internal/common/errors"
|
||||
"furtuna-be/internal/entity"
|
||||
"furtuna-be/internal/handlers/request"
|
||||
"furtuna-be/internal/handlers/response"
|
||||
"furtuna-be/internal/services"
|
||||
"enaklo-pos-be/internal/common/errors"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"enaklo-pos-be/internal/handlers/request"
|
||||
"enaklo-pos-be/internal/handlers/response"
|
||||
"enaklo-pos-be/internal/services"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
package site
|
||||
|
||||
import (
|
||||
"furtuna-be/internal/common/errors"
|
||||
"furtuna-be/internal/entity"
|
||||
"furtuna-be/internal/handlers/request"
|
||||
"furtuna-be/internal/handlers/response"
|
||||
"furtuna-be/internal/services"
|
||||
"enaklo-pos-be/internal/common/errors"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"enaklo-pos-be/internal/handlers/request"
|
||||
"enaklo-pos-be/internal/handlers/response"
|
||||
"enaklo-pos-be/internal/services"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
package studio
|
||||
|
||||
import (
|
||||
"enaklo-pos-be/internal/common/errors"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"enaklo-pos-be/internal/handlers/request"
|
||||
"enaklo-pos-be/internal/handlers/response"
|
||||
"enaklo-pos-be/internal/services"
|
||||
"encoding/json"
|
||||
"furtuna-be/internal/common/errors"
|
||||
"furtuna-be/internal/entity"
|
||||
"furtuna-be/internal/handlers/request"
|
||||
"furtuna-be/internal/handlers/response"
|
||||
"furtuna-be/internal/services"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
package transaction
|
||||
|
||||
import (
|
||||
"furtuna-be/internal/common/errors"
|
||||
"furtuna-be/internal/entity"
|
||||
"furtuna-be/internal/handlers/request"
|
||||
"furtuna-be/internal/handlers/response"
|
||||
"furtuna-be/internal/services"
|
||||
"enaklo-pos-be/internal/common/errors"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"enaklo-pos-be/internal/handlers/request"
|
||||
"enaklo-pos-be/internal/handlers/response"
|
||||
"enaklo-pos-be/internal/services"
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
package user
|
||||
|
||||
import (
|
||||
"enaklo-pos-be/internal/constants/role"
|
||||
"fmt"
|
||||
"furtuna-be/internal/constants/role"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"strings"
|
||||
@ -12,11 +12,11 @@ import (
|
||||
"github.com/go-playground/validator/v10"
|
||||
"github.com/xuri/excelize/v2"
|
||||
|
||||
"furtuna-be/internal/common/errors"
|
||||
"furtuna-be/internal/entity"
|
||||
"furtuna-be/internal/handlers/request"
|
||||
"furtuna-be/internal/handlers/response"
|
||||
"furtuna-be/internal/services"
|
||||
"enaklo-pos-be/internal/common/errors"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"enaklo-pos-be/internal/handlers/request"
|
||||
"enaklo-pos-be/internal/handlers/response"
|
||||
"enaklo-pos-be/internal/services"
|
||||
)
|
||||
|
||||
type Handler struct {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package request
|
||||
|
||||
import "furtuna-be/internal/entity"
|
||||
import "enaklo-pos-be/internal/entity"
|
||||
|
||||
type BalanceReq struct {
|
||||
Amount int64 `json:"amount"`
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
"furtuna-be/internal/common/mycontext"
|
||||
"enaklo-pos-be/internal/common/mycontext"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
"furtuna-be/internal/entity"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
)
|
||||
|
||||
type DiscoveryHomeParam struct {
|
||||
|
||||
@ -6,7 +6,7 @@ import (
|
||||
|
||||
"github.com/go-playground/validator/v10"
|
||||
|
||||
"furtuna-be/internal/entity"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
)
|
||||
|
||||
type EventParam struct {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
"furtuna-be/internal/entity"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package request
|
||||
|
||||
import "furtuna-be/internal/entity"
|
||||
import "enaklo-pos-be/internal/entity"
|
||||
|
||||
type MidtransCallbackRequest struct {
|
||||
VANumbers []VANumber `json:"va_numbers"`
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
"furtuna-be/internal/common/mycontext"
|
||||
"furtuna-be/internal/constants/transaction"
|
||||
"furtuna-be/internal/entity"
|
||||
"enaklo-pos-be/internal/common/mycontext"
|
||||
"enaklo-pos-be/internal/constants/transaction"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
"furtuna-be/internal/common/mycontext"
|
||||
"furtuna-be/internal/entity"
|
||||
"enaklo-pos-be/internal/common/mycontext"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
)
|
||||
|
||||
type PartnerParam struct {
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
"furtuna-be/internal/constants/product"
|
||||
"furtuna-be/internal/entity"
|
||||
"enaklo-pos-be/internal/constants/product"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
)
|
||||
|
||||
type ProductParam struct {
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
"furtuna-be/internal/common/mycontext"
|
||||
"furtuna-be/internal/entity"
|
||||
"enaklo-pos-be/internal/common/mycontext"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
)
|
||||
|
||||
type Site struct {
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
"enaklo-pos-be/internal/constants/studio"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"encoding/json"
|
||||
"furtuna-be/internal/constants/studio"
|
||||
"furtuna-be/internal/entity"
|
||||
)
|
||||
|
||||
type StudioParam struct {
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
"furtuna-be/internal/common/mycontext"
|
||||
"furtuna-be/internal/constants/transaction"
|
||||
"furtuna-be/internal/entity"
|
||||
"enaklo-pos-be/internal/common/mycontext"
|
||||
"enaklo-pos-be/internal/constants/transaction"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"github.com/go-playground/validator/v10"
|
||||
)
|
||||
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
"furtuna-be/internal/common/mycontext"
|
||||
"furtuna-be/internal/constants/role"
|
||||
"furtuna-be/internal/entity"
|
||||
"enaklo-pos-be/internal/common/mycontext"
|
||||
"enaklo-pos-be/internal/constants/role"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"math/rand"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@ -3,7 +3,7 @@ package response
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"furtuna-be/internal/common/errors"
|
||||
"enaklo-pos-be/internal/common/errors"
|
||||
)
|
||||
|
||||
type response struct {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package response
|
||||
|
||||
import (
|
||||
"furtuna-be/internal/entity"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
)
|
||||
|
||||
type License struct {
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
package response
|
||||
|
||||
import (
|
||||
"furtuna-be/internal/constants/order"
|
||||
"furtuna-be/internal/constants/transaction"
|
||||
"enaklo-pos-be/internal/constants/order"
|
||||
"enaklo-pos-be/internal/constants/transaction"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
package middlewares
|
||||
|
||||
import (
|
||||
"furtuna-be/internal/common/mycontext"
|
||||
"enaklo-pos-be/internal/common/mycontext"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"furtuna-be/internal/repository"
|
||||
"enaklo-pos-be/internal/repository"
|
||||
)
|
||||
|
||||
func AuthorizationMiddleware(cryp repository.Crypto) gin.HandlerFunc {
|
||||
|
||||
@ -6,7 +6,7 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"furtuna-be/internal/common/logger"
|
||||
"enaklo-pos-be/internal/common/logger"
|
||||
)
|
||||
|
||||
func Cors() gin.HandlerFunc {
|
||||
|
||||
@ -6,7 +6,7 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"furtuna-be/internal/common/request"
|
||||
"enaklo-pos-be/internal/common/request"
|
||||
)
|
||||
|
||||
type ConfigLogger interface {
|
||||
|
||||
@ -13,7 +13,7 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.uber.org/zap"
|
||||
|
||||
"furtuna-be/internal/common/logger"
|
||||
"enaklo-pos-be/internal/common/logger"
|
||||
)
|
||||
|
||||
func RequestMiddleware(c ConfigLogger) (handler gin.HandlerFunc) {
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package middlewares
|
||||
|
||||
import (
|
||||
"furtuna-be/internal/common/request"
|
||||
"furtuna-be/internal/constants"
|
||||
"furtuna-be/internal/utils/generator"
|
||||
"enaklo-pos-be/internal/common/request"
|
||||
"enaklo-pos-be/internal/constants"
|
||||
"enaklo-pos-be/internal/utils/generator"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
|
||||
@ -7,8 +7,8 @@ import (
|
||||
"go.uber.org/zap"
|
||||
"gorm.io/gorm"
|
||||
|
||||
"furtuna-be/internal/common/logger"
|
||||
"furtuna-be/internal/entity"
|
||||
"enaklo-pos-be/internal/common/logger"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
)
|
||||
|
||||
type AuthRepository struct {
|
||||
|
||||
@ -3,7 +3,7 @@ package brevo
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"furtuna-be/internal/entity"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"html/template"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
|
||||
@ -8,8 +8,8 @@ import (
|
||||
"github.com/golang-jwt/jwt"
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
|
||||
"furtuna-be/internal/common/errors"
|
||||
"furtuna-be/internal/entity"
|
||||
"enaklo-pos-be/internal/common/errors"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
)
|
||||
|
||||
func NewCrypto(config CryptoConfig) *CryptoImpl {
|
||||
|
||||
@ -6,8 +6,8 @@ import (
|
||||
"go.uber.org/zap"
|
||||
"gorm.io/gorm"
|
||||
|
||||
"furtuna-be/internal/common/logger"
|
||||
"furtuna-be/internal/entity"
|
||||
"enaklo-pos-be/internal/common/logger"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
)
|
||||
|
||||
type EventRepoImpl struct {
|
||||
|
||||
@ -2,9 +2,9 @@ package license
|
||||
|
||||
import (
|
||||
"context"
|
||||
"enaklo-pos-be/internal/common/logger"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"errors"
|
||||
"furtuna-be/internal/common/logger"
|
||||
"furtuna-be/internal/entity"
|
||||
"github.com/google/uuid"
|
||||
"go.uber.org/zap"
|
||||
"gorm.io/gorm"
|
||||
|
||||
@ -4,10 +4,10 @@ import (
|
||||
"bytes"
|
||||
"crypto/hmac"
|
||||
"crypto/sha256"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"furtuna-be/internal/entity"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"reflect"
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package mdtrns
|
||||
|
||||
import (
|
||||
"enaklo-pos-be/internal/common/logger"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"fmt"
|
||||
"furtuna-be/internal/common/logger"
|
||||
"furtuna-be/internal/entity"
|
||||
"log"
|
||||
"strconv"
|
||||
|
||||
|
||||
@ -2,9 +2,9 @@ package orders
|
||||
|
||||
import (
|
||||
"context"
|
||||
"furtuna-be/internal/common/logger"
|
||||
"furtuna-be/internal/common/mycontext"
|
||||
"furtuna-be/internal/entity"
|
||||
"enaklo-pos-be/internal/common/logger"
|
||||
"enaklo-pos-be/internal/common/mycontext"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
|
||||
@ -2,8 +2,8 @@ package partners
|
||||
|
||||
import (
|
||||
"context"
|
||||
"furtuna-be/internal/common/logger"
|
||||
"furtuna-be/internal/entity"
|
||||
"enaklo-pos-be/internal/common/logger"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
|
||||
"go.uber.org/zap"
|
||||
"gorm.io/gorm"
|
||||
|
||||
@ -2,8 +2,8 @@ package payment
|
||||
|
||||
import (
|
||||
"context"
|
||||
"furtuna-be/internal/common/logger"
|
||||
"furtuna-be/internal/entity"
|
||||
"enaklo-pos-be/internal/common/logger"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"github.com/google/uuid"
|
||||
"go.uber.org/zap"
|
||||
"gorm.io/gorm"
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
package pg
|
||||
|
||||
import (
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"enaklo-pos-be/internal/repository/linkqu"
|
||||
mdtrns "enaklo-pos-be/internal/repository/midtrans"
|
||||
"fmt"
|
||||
"furtuna-be/internal/entity"
|
||||
"furtuna-be/internal/repository/linkqu"
|
||||
mdtrns "furtuna-be/internal/repository/midtrans"
|
||||
)
|
||||
|
||||
type PaymentGatewayRepo struct {
|
||||
|
||||
@ -2,8 +2,8 @@ package products
|
||||
|
||||
import (
|
||||
"context"
|
||||
"furtuna-be/internal/common/logger"
|
||||
"furtuna-be/internal/entity"
|
||||
"enaklo-pos-be/internal/common/logger"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
|
||||
"go.uber.org/zap"
|
||||
"gorm.io/gorm"
|
||||
|
||||
@ -3,32 +3,32 @@ package repository
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"furtuna-be/internal/common/mycontext"
|
||||
"furtuna-be/internal/repository/brevo"
|
||||
"furtuna-be/internal/repository/license"
|
||||
"furtuna-be/internal/repository/linkqu"
|
||||
mdtrns "furtuna-be/internal/repository/midtrans"
|
||||
"furtuna-be/internal/repository/orders"
|
||||
"furtuna-be/internal/repository/oss"
|
||||
"furtuna-be/internal/repository/partners"
|
||||
"furtuna-be/internal/repository/payment"
|
||||
pg "furtuna-be/internal/repository/payment_gateway"
|
||||
"furtuna-be/internal/repository/products"
|
||||
"furtuna-be/internal/repository/sites"
|
||||
"furtuna-be/internal/repository/studios"
|
||||
transactions "furtuna-be/internal/repository/transaction"
|
||||
"furtuna-be/internal/repository/trx"
|
||||
"furtuna-be/internal/repository/users"
|
||||
repository "furtuna-be/internal/repository/wallet"
|
||||
"enaklo-pos-be/internal/common/mycontext"
|
||||
"enaklo-pos-be/internal/repository/brevo"
|
||||
"enaklo-pos-be/internal/repository/license"
|
||||
"enaklo-pos-be/internal/repository/linkqu"
|
||||
mdtrns "enaklo-pos-be/internal/repository/midtrans"
|
||||
"enaklo-pos-be/internal/repository/orders"
|
||||
"enaklo-pos-be/internal/repository/oss"
|
||||
"enaklo-pos-be/internal/repository/partners"
|
||||
"enaklo-pos-be/internal/repository/payment"
|
||||
pg "enaklo-pos-be/internal/repository/payment_gateway"
|
||||
"enaklo-pos-be/internal/repository/products"
|
||||
"enaklo-pos-be/internal/repository/sites"
|
||||
"enaklo-pos-be/internal/repository/studios"
|
||||
transactions "enaklo-pos-be/internal/repository/transaction"
|
||||
"enaklo-pos-be/internal/repository/trx"
|
||||
"enaklo-pos-be/internal/repository/users"
|
||||
repository "enaklo-pos-be/internal/repository/wallet"
|
||||
|
||||
"github.com/golang-jwt/jwt"
|
||||
"gorm.io/gorm"
|
||||
|
||||
"furtuna-be/config"
|
||||
"furtuna-be/internal/entity"
|
||||
"furtuna-be/internal/repository/auth"
|
||||
"furtuna-be/internal/repository/crypto"
|
||||
event "furtuna-be/internal/repository/events"
|
||||
"enaklo-pos-be/config"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"enaklo-pos-be/internal/repository/auth"
|
||||
"enaklo-pos-be/internal/repository/crypto"
|
||||
event "enaklo-pos-be/internal/repository/events"
|
||||
)
|
||||
|
||||
type RepoManagerImpl struct {
|
||||
|
||||
@ -2,9 +2,9 @@ package sites
|
||||
|
||||
import (
|
||||
"context"
|
||||
"furtuna-be/internal/common/logger"
|
||||
"furtuna-be/internal/common/mycontext"
|
||||
"furtuna-be/internal/entity"
|
||||
"enaklo-pos-be/internal/common/logger"
|
||||
"enaklo-pos-be/internal/common/mycontext"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
|
||||
"go.uber.org/zap"
|
||||
"gorm.io/gorm"
|
||||
|
||||
@ -2,8 +2,8 @@ package studios
|
||||
|
||||
import (
|
||||
"context"
|
||||
"furtuna-be/internal/common/logger"
|
||||
"furtuna-be/internal/entity"
|
||||
"enaklo-pos-be/internal/common/logger"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
|
||||
"go.uber.org/zap"
|
||||
"gorm.io/gorm"
|
||||
|
||||
@ -2,8 +2,8 @@ package transactions
|
||||
|
||||
import (
|
||||
"context"
|
||||
"furtuna-be/internal/common/mycontext"
|
||||
"furtuna-be/internal/entity"
|
||||
"enaklo-pos-be/internal/common/mycontext"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"go.uber.org/zap"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
@ -2,8 +2,8 @@ package users
|
||||
|
||||
import (
|
||||
"context"
|
||||
"furtuna-be/internal/common/logger"
|
||||
"furtuna-be/internal/entity"
|
||||
"enaklo-pos-be/internal/common/logger"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
|
||||
"go.uber.org/zap"
|
||||
"gorm.io/gorm"
|
||||
|
||||
@ -2,8 +2,8 @@ package repository
|
||||
|
||||
import (
|
||||
"context"
|
||||
"furtuna-be/internal/common/logger"
|
||||
"furtuna-be/internal/entity"
|
||||
"enaklo-pos-be/internal/common/logger"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"go.uber.org/zap"
|
||||
"gorm.io/gorm"
|
||||
"gorm.io/gorm/clause"
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
package routes
|
||||
|
||||
import (
|
||||
"furtuna-be/internal/handlers/http/customerauth"
|
||||
"furtuna-be/internal/handlers/http/customerorder"
|
||||
"furtuna-be/internal/handlers/http/discovery"
|
||||
"furtuna-be/internal/middlewares"
|
||||
"enaklo-pos-be/internal/handlers/http/customerauth"
|
||||
"enaklo-pos-be/internal/handlers/http/customerorder"
|
||||
"enaklo-pos-be/internal/handlers/http/discovery"
|
||||
"enaklo-pos-be/internal/middlewares"
|
||||
|
||||
"furtuna-be/internal/app"
|
||||
"furtuna-be/internal/repository"
|
||||
"furtuna-be/internal/services"
|
||||
"enaklo-pos-be/internal/app"
|
||||
"enaklo-pos-be/internal/repository"
|
||||
"enaklo-pos-be/internal/services"
|
||||
)
|
||||
|
||||
func RegisterCustomerRoutes(app *app.Server, serviceManager *services.ServiceManagerImpl,
|
||||
|
||||
@ -1,31 +1,31 @@
|
||||
package routes
|
||||
|
||||
import (
|
||||
"furtuna-be/internal/handlers/http/balance"
|
||||
"furtuna-be/internal/handlers/http/license"
|
||||
linkqu "furtuna-be/internal/handlers/http/linqu"
|
||||
mdtrns "furtuna-be/internal/handlers/http/midtrans"
|
||||
"furtuna-be/internal/handlers/http/order"
|
||||
"furtuna-be/internal/handlers/http/oss"
|
||||
"furtuna-be/internal/handlers/http/partner"
|
||||
"furtuna-be/internal/handlers/http/product"
|
||||
site "furtuna-be/internal/handlers/http/sites"
|
||||
"furtuna-be/internal/handlers/http/studio"
|
||||
"furtuna-be/internal/handlers/http/transaction"
|
||||
"furtuna-be/internal/handlers/http/user"
|
||||
"enaklo-pos-be/internal/handlers/http/balance"
|
||||
"enaklo-pos-be/internal/handlers/http/license"
|
||||
linkqu "enaklo-pos-be/internal/handlers/http/linqu"
|
||||
mdtrns "enaklo-pos-be/internal/handlers/http/midtrans"
|
||||
"enaklo-pos-be/internal/handlers/http/order"
|
||||
"enaklo-pos-be/internal/handlers/http/oss"
|
||||
"enaklo-pos-be/internal/handlers/http/partner"
|
||||
"enaklo-pos-be/internal/handlers/http/product"
|
||||
site "enaklo-pos-be/internal/handlers/http/sites"
|
||||
"enaklo-pos-be/internal/handlers/http/studio"
|
||||
"enaklo-pos-be/internal/handlers/http/transaction"
|
||||
"enaklo-pos-be/internal/handlers/http/user"
|
||||
swaggerFiles "github.com/swaggo/files"
|
||||
ginSwagger "github.com/swaggo/gin-swagger"
|
||||
"net/http"
|
||||
|
||||
"furtuna-be/internal/handlers/http/event"
|
||||
"furtuna-be/internal/middlewares"
|
||||
"enaklo-pos-be/internal/handlers/http/event"
|
||||
"enaklo-pos-be/internal/middlewares"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"furtuna-be/internal/app"
|
||||
"furtuna-be/internal/handlers/http/auth"
|
||||
"furtuna-be/internal/repository"
|
||||
"furtuna-be/internal/services"
|
||||
"enaklo-pos-be/internal/app"
|
||||
"enaklo-pos-be/internal/handlers/http/auth"
|
||||
"enaklo-pos-be/internal/repository"
|
||||
"enaklo-pos-be/internal/services"
|
||||
)
|
||||
|
||||
func RegisterPublicRoutes(app *app.Server, serviceManager *services.ServiceManagerImpl,
|
||||
|
||||
@ -2,16 +2,16 @@ package auth
|
||||
|
||||
import (
|
||||
"context"
|
||||
"enaklo-pos-be/config"
|
||||
"enaklo-pos-be/internal/common/mycontext"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"enaklo-pos-be/internal/utils"
|
||||
"fmt"
|
||||
"furtuna-be/config"
|
||||
"furtuna-be/internal/common/mycontext"
|
||||
"furtuna-be/internal/entity"
|
||||
"furtuna-be/internal/utils"
|
||||
"go.uber.org/zap"
|
||||
|
||||
"furtuna-be/internal/common/errors"
|
||||
"furtuna-be/internal/common/logger"
|
||||
"furtuna-be/internal/repository"
|
||||
"enaklo-pos-be/internal/common/errors"
|
||||
"enaklo-pos-be/internal/common/logger"
|
||||
"enaklo-pos-be/internal/repository"
|
||||
)
|
||||
|
||||
type AuthServiceImpl struct {
|
||||
@ -130,7 +130,7 @@ func (u *AuthServiceImpl) SendPasswordResetLink(ctx context.Context, email strin
|
||||
|
||||
sender := u.emailCfg.Sender
|
||||
templatePath := u.emailCfg.ResetPassword.TemplatePath
|
||||
subject := fmt.Sprintf("Furtuna %s", u.emailCfg.ResetPassword.Subject)
|
||||
subject := fmt.Sprintf("enaklo-pos %s", u.emailCfg.ResetPassword.Subject)
|
||||
if user.UserType == "CUSTOMER" {
|
||||
sender = u.emailCfg.SenderCustomer
|
||||
templatePath = u.emailCfg.ResetPassword.TemplatePathCustomer
|
||||
|
||||
@ -2,11 +2,11 @@ package balance
|
||||
|
||||
import (
|
||||
"context"
|
||||
"enaklo-pos-be/internal/common/logger"
|
||||
"enaklo-pos-be/internal/common/mycontext"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"enaklo-pos-be/internal/repository"
|
||||
"errors"
|
||||
"furtuna-be/internal/common/logger"
|
||||
"furtuna-be/internal/common/mycontext"
|
||||
"furtuna-be/internal/entity"
|
||||
"furtuna-be/internal/repository"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
|
||||
@ -2,12 +2,12 @@ package discovery
|
||||
|
||||
import (
|
||||
"context"
|
||||
"enaklo-pos-be/config"
|
||||
"errors"
|
||||
"furtuna-be/config"
|
||||
"gorm.io/gorm"
|
||||
|
||||
"furtuna-be/internal/entity"
|
||||
"furtuna-be/internal/repository"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"enaklo-pos-be/internal/repository"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@ -5,9 +5,9 @@ import (
|
||||
|
||||
"go.uber.org/zap"
|
||||
|
||||
"furtuna-be/internal/common/logger"
|
||||
"furtuna-be/internal/entity"
|
||||
"furtuna-be/internal/repository"
|
||||
"enaklo-pos-be/internal/common/logger"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"enaklo-pos-be/internal/repository"
|
||||
)
|
||||
|
||||
type EventService struct {
|
||||
|
||||
@ -2,10 +2,10 @@ package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"furtuna-be/internal/common/logger"
|
||||
"furtuna-be/internal/common/mycontext"
|
||||
"furtuna-be/internal/entity"
|
||||
"furtuna-be/internal/repository"
|
||||
"enaklo-pos-be/internal/common/logger"
|
||||
"enaklo-pos-be/internal/common/mycontext"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"enaklo-pos-be/internal/repository"
|
||||
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@ -2,16 +2,16 @@ package order
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
errors2 "enaklo-pos-be/internal/common/errors"
|
||||
"enaklo-pos-be/internal/common/logger"
|
||||
"enaklo-pos-be/internal/common/mycontext"
|
||||
order2 "enaklo-pos-be/internal/constants/order"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"enaklo-pos-be/internal/repository"
|
||||
"enaklo-pos-be/internal/utils/generator"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
errors2 "furtuna-be/internal/common/errors"
|
||||
"furtuna-be/internal/common/logger"
|
||||
"furtuna-be/internal/common/mycontext"
|
||||
order2 "furtuna-be/internal/constants/order"
|
||||
"furtuna-be/internal/entity"
|
||||
"furtuna-be/internal/repository"
|
||||
"furtuna-be/internal/utils/generator"
|
||||
"go.uber.org/zap"
|
||||
"golang.org/x/net/context"
|
||||
"gorm.io/gorm"
|
||||
|
||||
@ -2,9 +2,9 @@ package oss
|
||||
|
||||
import (
|
||||
"context"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"enaklo-pos-be/internal/utils/generator"
|
||||
"fmt"
|
||||
"furtuna-be/internal/entity"
|
||||
"furtuna-be/internal/utils/generator"
|
||||
"path"
|
||||
|
||||
"github.com/go-playground/validator/v10"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package oss
|
||||
|
||||
import "furtuna-be/internal/repository"
|
||||
import "enaklo-pos-be/internal/repository"
|
||||
|
||||
type OssService struct {
|
||||
ossRepo repository.OSSRepository
|
||||
|
||||
@ -2,11 +2,11 @@ package partner
|
||||
|
||||
import (
|
||||
"context"
|
||||
"furtuna-be/internal/common/logger"
|
||||
"furtuna-be/internal/common/mycontext"
|
||||
"furtuna-be/internal/entity"
|
||||
"furtuna-be/internal/repository"
|
||||
"furtuna-be/internal/services/users"
|
||||
"enaklo-pos-be/internal/common/logger"
|
||||
"enaklo-pos-be/internal/common/mycontext"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"enaklo-pos-be/internal/repository"
|
||||
"enaklo-pos-be/internal/services/users"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
|
||||
@ -2,10 +2,10 @@ package product
|
||||
|
||||
import (
|
||||
"context"
|
||||
"furtuna-be/internal/common/logger"
|
||||
"furtuna-be/internal/common/mycontext"
|
||||
"furtuna-be/internal/entity"
|
||||
"furtuna-be/internal/repository"
|
||||
"enaklo-pos-be/internal/common/logger"
|
||||
"enaklo-pos-be/internal/common/mycontext"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"enaklo-pos-be/internal/repository"
|
||||
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@ -2,26 +2,26 @@ package services
|
||||
|
||||
import (
|
||||
"context"
|
||||
"furtuna-be/internal/common/mycontext"
|
||||
"furtuna-be/internal/services/balance"
|
||||
"furtuna-be/internal/services/discovery"
|
||||
service "furtuna-be/internal/services/license"
|
||||
"furtuna-be/internal/services/order"
|
||||
"furtuna-be/internal/services/oss"
|
||||
"furtuna-be/internal/services/partner"
|
||||
"furtuna-be/internal/services/product"
|
||||
site "furtuna-be/internal/services/sites"
|
||||
"furtuna-be/internal/services/studio"
|
||||
"furtuna-be/internal/services/transaction"
|
||||
"furtuna-be/internal/services/users"
|
||||
"enaklo-pos-be/internal/common/mycontext"
|
||||
"enaklo-pos-be/internal/services/balance"
|
||||
"enaklo-pos-be/internal/services/discovery"
|
||||
service "enaklo-pos-be/internal/services/license"
|
||||
"enaklo-pos-be/internal/services/order"
|
||||
"enaklo-pos-be/internal/services/oss"
|
||||
"enaklo-pos-be/internal/services/partner"
|
||||
"enaklo-pos-be/internal/services/product"
|
||||
site "enaklo-pos-be/internal/services/sites"
|
||||
"enaklo-pos-be/internal/services/studio"
|
||||
"enaklo-pos-be/internal/services/transaction"
|
||||
"enaklo-pos-be/internal/services/users"
|
||||
|
||||
"gorm.io/gorm"
|
||||
|
||||
"furtuna-be/config"
|
||||
"furtuna-be/internal/entity"
|
||||
"furtuna-be/internal/repository"
|
||||
"furtuna-be/internal/services/auth"
|
||||
"furtuna-be/internal/services/event"
|
||||
"enaklo-pos-be/config"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"enaklo-pos-be/internal/repository"
|
||||
"enaklo-pos-be/internal/services/auth"
|
||||
"enaklo-pos-be/internal/services/event"
|
||||
)
|
||||
|
||||
type ServiceManagerImpl struct {
|
||||
|
||||
@ -2,11 +2,11 @@ package site
|
||||
|
||||
import (
|
||||
"context"
|
||||
"furtuna-be/internal/common/logger"
|
||||
"furtuna-be/internal/common/mycontext"
|
||||
"furtuna-be/internal/constants/role"
|
||||
"furtuna-be/internal/entity"
|
||||
"furtuna-be/internal/repository"
|
||||
"enaklo-pos-be/internal/common/logger"
|
||||
"enaklo-pos-be/internal/common/mycontext"
|
||||
"enaklo-pos-be/internal/constants/role"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"enaklo-pos-be/internal/repository"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
|
||||
@ -2,10 +2,10 @@ package studio
|
||||
|
||||
import (
|
||||
"context"
|
||||
"furtuna-be/internal/common/logger"
|
||||
"furtuna-be/internal/common/mycontext"
|
||||
"furtuna-be/internal/entity"
|
||||
"furtuna-be/internal/repository"
|
||||
"enaklo-pos-be/internal/common/logger"
|
||||
"enaklo-pos-be/internal/common/mycontext"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"enaklo-pos-be/internal/repository"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
package transaction
|
||||
|
||||
import (
|
||||
errors2 "furtuna-be/internal/common/errors"
|
||||
"furtuna-be/internal/common/logger"
|
||||
"furtuna-be/internal/common/mycontext"
|
||||
"furtuna-be/internal/entity"
|
||||
"furtuna-be/internal/repository"
|
||||
errors2 "enaklo-pos-be/internal/common/errors"
|
||||
"enaklo-pos-be/internal/common/logger"
|
||||
"enaklo-pos-be/internal/common/mycontext"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"enaklo-pos-be/internal/repository"
|
||||
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
package users
|
||||
|
||||
import (
|
||||
"enaklo-pos-be/internal/common/mycontext"
|
||||
"errors"
|
||||
"fmt"
|
||||
"furtuna-be/internal/common/mycontext"
|
||||
|
||||
"gorm.io/gorm"
|
||||
|
||||
"go.uber.org/zap"
|
||||
|
||||
"furtuna-be/internal/common/logger"
|
||||
"furtuna-be/internal/entity"
|
||||
"furtuna-be/internal/repository"
|
||||
"enaklo-pos-be/internal/common/logger"
|
||||
"enaklo-pos-be/internal/entity"
|
||||
"enaklo-pos-be/internal/repository"
|
||||
)
|
||||
|
||||
type UserService struct {
|
||||
|
||||
@ -1,27 +1,27 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: furtuna-backend
|
||||
name: enaklo-pos-backend
|
||||
namespace: altru-production
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: furtuna-backend
|
||||
app: enaklo-pos-backend
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: furtuna-backend
|
||||
app: enaklo-pos-backend
|
||||
spec:
|
||||
serviceAccountName: custom-serviceaccount
|
||||
containers:
|
||||
- name: furtuna-backend
|
||||
image: registry.gitlab.com/altru.id/furtuna/furtuna-backend:<VERSION>
|
||||
- name: enaklo-pos-backend
|
||||
image: registry.gitlab.com/altru.id/enaklo-pos/enaklo-pos-backend:<VERSION>
|
||||
ports:
|
||||
- containerPort: 3300
|
||||
volumeMounts:
|
||||
- mountPath: "/infra"
|
||||
name: furtuna-backend-secret
|
||||
name: enaklo-pos-backend-secret
|
||||
readOnly: true
|
||||
- mountPath: "/templates"
|
||||
name: templates-configmap
|
||||
@ -29,9 +29,9 @@ spec:
|
||||
- name: ENV_MODE
|
||||
value: "production"
|
||||
volumes:
|
||||
- name: furtuna-backend-secret
|
||||
- name: enaklo-pos-backend-secret
|
||||
secret:
|
||||
secretName: furtuna-backend-secret
|
||||
secretName: enaklo-pos-backend-secret
|
||||
- name: templates-configmap
|
||||
configMap:
|
||||
name: templates-configmap
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: furtuna-backend
|
||||
name: enaklo-pos-backend
|
||||
namespace: altru-production
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: "nginx"
|
||||
@ -14,17 +14,17 @@ metadata:
|
||||
nginx.ingress.kubernetes.io/cors-allow-credentials: "true"
|
||||
spec:
|
||||
rules:
|
||||
- host: "api.furtuna.id"
|
||||
- host: "api.enaklo-pos.id"
|
||||
http:
|
||||
paths:
|
||||
- pathType: Prefix
|
||||
path: /
|
||||
backend:
|
||||
service:
|
||||
name: furtuna-backend
|
||||
name: enaklo-pos-backend
|
||||
port:
|
||||
number: 3300
|
||||
tls:
|
||||
- hosts:
|
||||
- "api.furtuna.id"
|
||||
secretName: api-furtuna-biz-id-tls
|
||||
- "api.enaklo-pos.id"
|
||||
secretName: api-enaklo-pos-biz-id-tls
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: furtuna-backend
|
||||
name: enaklo-pos-backend
|
||||
namespace: altru-production
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: "nginx" # Add this line
|
||||
@ -9,17 +9,17 @@ metadata:
|
||||
nginx.ingress.kubernetes.io/ingress-class: "nginx" # Add this line
|
||||
spec:
|
||||
rules:
|
||||
- host: "api.furtuna.id"
|
||||
- host: "api.enaklo-pos.id"
|
||||
http:
|
||||
paths:
|
||||
- pathType: Prefix
|
||||
path: /
|
||||
backend:
|
||||
service:
|
||||
name: furtuna-backend
|
||||
name: enaklo-pos-backend
|
||||
port:
|
||||
number: 3300
|
||||
tls:
|
||||
- hosts:
|
||||
- "api.furtuna.id"
|
||||
secretName: api-furtuna-biz-id-tls
|
||||
- "api.enaklo-pos.id"
|
||||
secretName: api-enaklo-pos-biz-id-tls
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: furtuna-backend
|
||||
name: enaklo-pos-backend
|
||||
namespace: altru-production
|
||||
labels:
|
||||
run: furtuna-backend
|
||||
run: enaklo-pos-backend
|
||||
spec:
|
||||
ports:
|
||||
- port: 3300
|
||||
protocol: TCP
|
||||
targetPort: 3300
|
||||
selector:
|
||||
app: furtuna-backend
|
||||
app: enaklo-pos-backend
|
||||
type: ClusterIP
|
||||
|
||||
@ -9,7 +9,7 @@ metadata:
|
||||
nginx.ingress.kubernetes.io/ingress-class: "nginx" # Add this line
|
||||
spec:
|
||||
rules:
|
||||
- host: "enaklo-pos-backend.app-dev.altru.id"
|
||||
- host: "api-dev.enaklo.co.id"
|
||||
http:
|
||||
paths:
|
||||
- pathType: Prefix
|
||||
@ -21,5 +21,5 @@ spec:
|
||||
number: 3300
|
||||
tls:
|
||||
- hosts:
|
||||
- "enaklo-pos-backend.app-dev.altru.id"
|
||||
- "api-dev.enaklo.co.id"
|
||||
secretName: enaklo-pos-backend-app-dev-biz-id-tls
|
||||
|
||||
16
main.go
16
main.go
@ -4,14 +4,14 @@ import (
|
||||
"fmt"
|
||||
"log"
|
||||
|
||||
"furtuna-be/config"
|
||||
_ "furtuna-be/docs"
|
||||
"furtuna-be/internal/app"
|
||||
"furtuna-be/internal/common/db"
|
||||
"furtuna-be/internal/common/logger"
|
||||
"furtuna-be/internal/repository"
|
||||
"furtuna-be/internal/routes"
|
||||
"furtuna-be/internal/services"
|
||||
"enaklo-pos-be/config"
|
||||
_ "enaklo-pos-be/docs"
|
||||
"enaklo-pos-be/internal/app"
|
||||
"enaklo-pos-be/internal/common/db"
|
||||
"enaklo-pos-be/internal/common/logger"
|
||||
"enaklo-pos-be/internal/repository"
|
||||
"enaklo-pos-be/internal/routes"
|
||||
"enaklo-pos-be/internal/services"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@ -19,4 +19,4 @@ CREATE TABLE users
|
||||
);
|
||||
|
||||
INSERT INTO users(id, name, email, password, status)
|
||||
VALUES (1, 'Super Admin', 'admin@furtuna.id', '$2a$10$gsDEsviRfy5gQ8ubFH/lYObL.6FuRSAoXUh6e9ZDXmWTXYzK51pPO', 'Active');
|
||||
VALUES (1, 'Super Admin', 'admin@enaklo-pos.id', '$2a$10$gsDEsviRfy5gQ8ubFH/lYObL.6FuRSAoXUh6e9ZDXmWTXYzK51pPO', 'Active');
|
||||
@ -119,7 +119,7 @@
|
||||
<body>
|
||||
<div style="padding: 50px; background-color: #f1f0f7;">
|
||||
<div class="content">
|
||||
<img src="https://res.cloudinary.com/dl0wpumax/image/upload/v1722531058/furtuna_vqk4er.png" alt="Furtuna Logo" class="logo">
|
||||
<img src="https://res.cloudinary.com/dl0wpumax/image/upload/v1722531058/enaklo-pos_vqk4er.png" alt="enaklo-pos Logo" class="logo">
|
||||
<div class="title">Lupa Kata Sandi</div>
|
||||
<div class="text">
|
||||
Kami mengirimkan Anda email ini karena Anda meminta pengaturan ulang kata sandi. Berikut adalah kata sandi sementara Anda:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user