mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
fix: adjust from boilerplate to lti project
This commit is contained in:
+1
-1
@@ -6,7 +6,7 @@ RUN apk add --no-cache git curl bash build-base
|
|||||||
# Install Air (pakai repo baru air-verse)
|
# Install Air (pakai repo baru air-verse)
|
||||||
RUN go install github.com/air-verse/air@v1.52.3
|
RUN go install github.com/air-verse/air@v1.52.3
|
||||||
|
|
||||||
WORKDIR /golang-boilerplate
|
WORKDIR /lti-api
|
||||||
|
|
||||||
# Cache dependencies
|
# Cache dependencies
|
||||||
COPY go.mod go.sum ./
|
COPY go.mod go.sum ./
|
||||||
|
|||||||
+4
-4
@@ -3,7 +3,7 @@ FROM golang:1.23-alpine AS builder
|
|||||||
# Install tools build
|
# Install tools build
|
||||||
RUN apk add --no-cache git curl bash build-base
|
RUN apk add --no-cache git curl bash build-base
|
||||||
|
|
||||||
WORKDIR /golang-boilerplate
|
WORKDIR /lti-api
|
||||||
|
|
||||||
# Cache dependencies
|
# Cache dependencies
|
||||||
COPY go.mod go.sum ./
|
COPY go.mod go.sum ./
|
||||||
@@ -20,13 +20,13 @@ FROM alpine:3.20
|
|||||||
# Install tools
|
# Install tools
|
||||||
RUN apk add --no-cache curl
|
RUN apk add --no-cache curl
|
||||||
|
|
||||||
WORKDIR /golang-boilerplate
|
WORKDIR /lti-api
|
||||||
|
|
||||||
# Copy binary hasil build
|
# Copy binary hasil build
|
||||||
COPY --from=builder /golang-boilerplate/app .
|
COPY --from=builder /lti-api/app .
|
||||||
|
|
||||||
# Copy file env example
|
# Copy file env example
|
||||||
COPY --from=builder /golang-boilerplate/.env.example .env
|
COPY --from=builder /lti-api/.env.example .env
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ endif
|
|||||||
|
|
||||||
# --- Konfigurasi umum ---
|
# --- Konfigurasi umum ---
|
||||||
COMPOSE ?= docker compose -f docker-compose.dev.yml
|
COMPOSE ?= docker compose -f docker-compose.dev.yml
|
||||||
NETWORK ?= boilerplate-template_go-network
|
NETWORK ?= lti-api_go-network
|
||||||
MIGRATE_IMAGE ?= migrate/migrate
|
MIGRATE_IMAGE ?= migrate/migrate
|
||||||
MIGRATIONS_DIR := $(PWD)/internal/database/migrations
|
MIGRATIONS_DIR := $(PWD)/internal/database/migrations
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Golang Boilerplate (golang-boilerplate)
|
# Lumbung Telur Indonesia ERP API (lti-api)
|
||||||
|
|
||||||
Boilerplate RESTful API, built with **Go, Fiber, GORM** and **PostgreSQL**.
|
Lumbung Telur Indonesia RESTful API, built with **Go, Fiber, GORM** and **PostgreSQL**.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -23,8 +23,8 @@ Boilerplate RESTful API, built with **Go, Fiber, GORM** and **PostgreSQL**.
|
|||||||
### 1. Clone Project
|
### 1. Clone Project
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/hafizhproject45/Golang-Boilerplate.git
|
git clone https://gitlab.com/mbugroup/lti-api.git
|
||||||
cd golang-boilerplate
|
cd lti-api
|
||||||
```
|
```
|
||||||
|
|
||||||
### 2. Install Dependencies
|
### 2. Install Dependencies
|
||||||
@@ -105,8 +105,8 @@ internal/
|
|||||||
|
|
||||||
## ✨ Author
|
## ✨ Author
|
||||||
|
|
||||||
Hafizh Athallah Yovanka
|
IT Development PT Mitra Berlian Unggas
|
||||||
|
|
||||||
## 📃 License
|
## 📃 License
|
||||||
|
|
||||||
Free to use
|
Free to use --change here
|
||||||
|
|||||||
+5
-5
@@ -8,11 +8,11 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/hafizhproject45/Golang-Boilerplate.git/internal/config"
|
"gitlab.com/mbugroup/lti-api.git/internal/config"
|
||||||
"github.com/hafizhproject45/Golang-Boilerplate.git/internal/database"
|
"gitlab.com/mbugroup/lti-api.git/internal/database"
|
||||||
"github.com/hafizhproject45/Golang-Boilerplate.git/internal/middleware"
|
"gitlab.com/mbugroup/lti-api.git/internal/middleware"
|
||||||
"github.com/hafizhproject45/Golang-Boilerplate.git/internal/route"
|
"gitlab.com/mbugroup/lti-api.git/internal/route"
|
||||||
"github.com/hafizhproject45/Golang-Boilerplate.git/internal/utils"
|
"gitlab.com/mbugroup/lti-api.git/internal/utils"
|
||||||
|
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
"github.com/gofiber/fiber/v2/middleware/compress"
|
"github.com/gofiber/fiber/v2/middleware/compress"
|
||||||
|
|||||||
+3
-3
@@ -3,9 +3,9 @@ package main
|
|||||||
import (
|
import (
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
"github.com/hafizhproject45/Golang-Boilerplate.git/internal/config"
|
"gitlab.com/mbugroup/lti-api.git/internal/config"
|
||||||
"github.com/hafizhproject45/Golang-Boilerplate.git/internal/database"
|
"gitlab.com/mbugroup/lti-api.git/internal/database"
|
||||||
"github.com/hafizhproject45/Golang-Boilerplate.git/internal/database/seed"
|
"gitlab.com/mbugroup/lti-api.git/internal/database/seed"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|||||||
@@ -47,9 +47,9 @@ services:
|
|||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile.dev
|
dockerfile: Dockerfile.dev
|
||||||
image: cosmtrek/air:v1.52.3
|
image: cosmtrek/air:v1.52.3
|
||||||
working_dir: /golang-boilerplate
|
working_dir: /lti-api
|
||||||
volumes:
|
volumes:
|
||||||
- .:/golang-boilerplate
|
- .:/lti-api
|
||||||
- ./internal/config/jwtRS256.key:/run/keys/jwtRS256.key:ro
|
- ./internal/config/jwtRS256.key:/run/keys/jwtRS256.key:ro
|
||||||
- ./internal/config/jwtRS256.key.pub:/run/keys/jwtRS256.key.pub:ro
|
- ./internal/config/jwtRS256.key.pub:/run/keys/jwtRS256.key.pub:ro
|
||||||
command: air -c .air.toml
|
command: air -c .air.toml
|
||||||
@@ -84,5 +84,5 @@ volumes:
|
|||||||
|
|
||||||
networks:
|
networks:
|
||||||
go-network:
|
go-network:
|
||||||
name: boilerplate-template_go-network
|
name: lti-api_go-network
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile.prod
|
dockerfile: Dockerfile.prod
|
||||||
image: golang-boilerplate-app
|
image: lti-api-app
|
||||||
working_dir: /golang-boilerplate
|
working_dir: /lti-api
|
||||||
command: ./app # asumsi Dockerfile.prod menghasilkan binary bernama "app"
|
command: ./app # asumsi Dockerfile.prod menghasilkan binary bernama "app"
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
@@ -46,5 +46,5 @@ volumes:
|
|||||||
|
|
||||||
networks:
|
networks:
|
||||||
go-network:
|
go-network:
|
||||||
name: boilerplate-template_go-network
|
name: lti-api_go-network
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
module github.com/hafizhproject45/Golang-Boilerplate.git
|
module gitlab.com/mbugroup/lti-api.git
|
||||||
|
|
||||||
go 1.23
|
go 1.23
|
||||||
|
|
||||||
|
|||||||
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
@@ -1,42 +0,0 @@
|
|||||||
package config
|
|
||||||
|
|
||||||
import (
|
|
||||||
"os"
|
|
||||||
"time"
|
|
||||||
)
|
|
||||||
|
|
||||||
type AuthCfg struct {
|
|
||||||
Issuer string
|
|
||||||
JWTSecret string
|
|
||||||
AccessTTL time.Duration
|
|
||||||
RefreshTTL time.Duration
|
|
||||||
RefreshCookieName string
|
|
||||||
RefreshCookiePath string
|
|
||||||
}
|
|
||||||
|
|
||||||
func LoadAuth() AuthCfg {
|
|
||||||
return AuthCfg{
|
|
||||||
JWTSecret: getenv("JWT_SECRET", "dev-secret-change-me"),
|
|
||||||
AccessTTL: getenvDuration("ACCESS_TTL", 10*time.Minute),
|
|
||||||
RefreshTTL: getenvDuration("REFRESH_TTL", 30*24*time.Hour),
|
|
||||||
RefreshCookieName: getenv("REFRESH_COOKIE_NAME", "rt"),
|
|
||||||
RefreshCookiePath: getenv("REFRESH_COOKIE_PATH", "/api/auth"),
|
|
||||||
Issuer: getenv("ISSUER", "http://localhost:8080"),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func getenv(k, def string) string {
|
|
||||||
if v := os.Getenv(k); v != "" {
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
return def
|
|
||||||
}
|
|
||||||
func getenvDuration(k string, def time.Duration) time.Duration {
|
|
||||||
if v := os.Getenv(k); v != "" {
|
|
||||||
d, err := time.ParseDuration(v)
|
|
||||||
if err == nil {
|
|
||||||
return d
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return def
|
|
||||||
}
|
|
||||||
@@ -3,7 +3,7 @@ package config
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/hafizhproject45/Golang-Boilerplate.git/internal/utils"
|
"gitlab.com/mbugroup/lti-api.git/internal/utils"
|
||||||
|
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package config
|
package config
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/hafizhproject45/Golang-Boilerplate.git/internal/utils"
|
"gitlab.com/mbugroup/lti-api.git/internal/utils"
|
||||||
|
|
||||||
"github.com/bytedance/sonic"
|
"github.com/bytedance/sonic"
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/hafizhproject45/Golang-Boilerplate.git/internal/config"
|
"gitlab.com/mbugroup/lti-api.git/internal/config"
|
||||||
"github.com/hafizhproject45/Golang-Boilerplate.git/internal/utils"
|
"gitlab.com/mbugroup/lti-api.git/internal/utils"
|
||||||
|
|
||||||
"gorm.io/driver/postgres"
|
"gorm.io/driver/postgres"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package seed
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
mUser "github.com/hafizhproject45/Golang-Boilerplate.git/internal/modules/users/models"
|
mUser "gitlab.com/mbugroup/lti-api.git/internal/modules/users/models"
|
||||||
|
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ package middleware
|
|||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/hafizhproject45/Golang-Boilerplate.git/internal/config"
|
"gitlab.com/mbugroup/lti-api.git/internal/config"
|
||||||
service "github.com/hafizhproject45/Golang-Boilerplate.git/internal/modules/users/services"
|
service "gitlab.com/mbugroup/lti-api.git/internal/modules/users/services"
|
||||||
"github.com/hafizhproject45/Golang-Boilerplate.git/internal/utils"
|
"gitlab.com/mbugroup/lti-api.git/internal/utils"
|
||||||
|
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package middleware
|
|||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/hafizhproject45/Golang-Boilerplate.git/internal/response"
|
"gitlab.com/mbugroup/lti-api.git/internal/response"
|
||||||
|
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
"github.com/gofiber/fiber/v2/middleware/limiter"
|
"github.com/gofiber/fiber/v2/middleware/limiter"
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ import (
|
|||||||
"math"
|
"math"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/hafizhproject45/Golang-Boilerplate.git/internal/modules/users/dto"
|
"gitlab.com/mbugroup/lti-api.git/internal/modules/users/dto"
|
||||||
service "github.com/hafizhproject45/Golang-Boilerplate.git/internal/modules/users/services"
|
service "gitlab.com/mbugroup/lti-api.git/internal/modules/users/services"
|
||||||
validation "github.com/hafizhproject45/Golang-Boilerplate.git/internal/modules/users/validations"
|
validation "gitlab.com/mbugroup/lti-api.git/internal/modules/users/validations"
|
||||||
"github.com/hafizhproject45/Golang-Boilerplate.git/internal/response"
|
"gitlab.com/mbugroup/lti-api.git/internal/response"
|
||||||
|
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package dto
|
|||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
model "github.com/hafizhproject45/Golang-Boilerplate.git/internal/modules/users/models"
|
model "gitlab.com/mbugroup/lti-api.git/internal/modules/users/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
// === DTO Structs ===
|
// === DTO Structs ===
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
|
|
||||||
rUser "github.com/hafizhproject45/Golang-Boilerplate.git/internal/modules/users/repositories"
|
rUser "gitlab.com/mbugroup/lti-api.git/internal/modules/users/repositories"
|
||||||
sUser "github.com/hafizhproject45/Golang-Boilerplate.git/internal/modules/users/services"
|
sUser "gitlab.com/mbugroup/lti-api.git/internal/modules/users/services"
|
||||||
)
|
)
|
||||||
|
|
||||||
type UserModule struct{}
|
type UserModule struct{}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package repository
|
package repository
|
||||||
|
|
||||||
import (
|
import (
|
||||||
model "github.com/hafizhproject45/Golang-Boilerplate.git/internal/modules/users/models"
|
model "gitlab.com/mbugroup/lti-api.git/internal/modules/users/models"
|
||||||
"github.com/hafizhproject45/Golang-Boilerplate.git/internal/repository"
|
"gitlab.com/mbugroup/lti-api.git/internal/repository"
|
||||||
|
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package users
|
package users
|
||||||
|
|
||||||
import (
|
import (
|
||||||
controller "github.com/hafizhproject45/Golang-Boilerplate.git/internal/modules/users/controllers"
|
controller "gitlab.com/mbugroup/lti-api.git/internal/modules/users/controllers"
|
||||||
user "github.com/hafizhproject45/Golang-Boilerplate.git/internal/modules/users/services"
|
user "gitlab.com/mbugroup/lti-api.git/internal/modules/users/services"
|
||||||
|
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,10 +3,10 @@ package service
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
model "github.com/hafizhproject45/Golang-Boilerplate.git/internal/modules/users/models"
|
model "gitlab.com/mbugroup/lti-api.git/internal/modules/users/models"
|
||||||
repository "github.com/hafizhproject45/Golang-Boilerplate.git/internal/modules/users/repositories"
|
repository "gitlab.com/mbugroup/lti-api.git/internal/modules/users/repositories"
|
||||||
validation "github.com/hafizhproject45/Golang-Boilerplate.git/internal/modules/users/validations"
|
validation "gitlab.com/mbugroup/lti-api.git/internal/modules/users/validations"
|
||||||
"github.com/hafizhproject45/Golang-Boilerplate.git/internal/utils"
|
"gitlab.com/mbugroup/lti-api.git/internal/utils"
|
||||||
|
|
||||||
"github.com/go-playground/validator/v10"
|
"github.com/go-playground/validator/v10"
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
package route
|
package route
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/hafizhproject45/Golang-Boilerplate.git/internal/modules"
|
"gitlab.com/mbugroup/lti-api.git/internal/modules"
|
||||||
"github.com/hafizhproject45/Golang-Boilerplate.git/internal/validation"
|
"gitlab.com/mbugroup/lti-api.git/internal/validation"
|
||||||
|
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
|
|
||||||
users "github.com/hafizhproject45/Golang-Boilerplate.git/internal/modules/users"
|
users "gitlab.com/mbugroup/lti-api.git/internal/modules/users"
|
||||||
// MODULE IMPORTS
|
// MODULE IMPORTS
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package utils
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"github.com/hafizhproject45/Golang-Boilerplate.git/internal/response"
|
"gitlab.com/mbugroup/lti-api.git/internal/response"
|
||||||
"github.com/hafizhproject45/Golang-Boilerplate.git/internal/validation"
|
"gitlab.com/mbugroup/lti-api.git/internal/validation"
|
||||||
|
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
)
|
)
|
||||||
|
|||||||
+1
-1
@@ -156,7 +156,7 @@ func updateMainRoute(d Data) {
|
|||||||
pkgName := toPascalCase(d.Entity) + "Module"
|
pkgName := toPascalCase(d.Entity) + "Module"
|
||||||
|
|
||||||
// Inject import
|
// Inject import
|
||||||
importLine := fmt.Sprintf("\t%[1]s \"%s/internal/modules/%s\"", modName, "github.com/hafizhproject45/Golang-Boilerplate.git", modPath)
|
importLine := fmt.Sprintf("\t%[1]s \"%s/internal/modules/%s\"", modName, "gitlab.com/mbugroup/lti-api.git", modPath)
|
||||||
if !strings.Contains(string(content), importLine) {
|
if !strings.Contains(string(content), importLine) {
|
||||||
content = []byte(strings.Replace(string(content),
|
content = []byte(strings.Replace(string(content),
|
||||||
"// MODULE IMPORTS",
|
"// MODULE IMPORTS",
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ import (
|
|||||||
"math"
|
"math"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/hafizhproject45/Golang-Boilerplate.git/internal/modules/{{Kebab .FeatName}}s/dto"
|
"gitlab.com/mbugroup/lti-api.git/internal/modules/{{Kebab .FeatName}}s/dto"
|
||||||
service "github.com/hafizhproject45/Golang-Boilerplate.git/internal/modules/{{Kebab .FeatName}}s/services"
|
service "gitlab.com/mbugroup/lti-api.git/internal/modules/{{Kebab .FeatName}}s/services"
|
||||||
validation "github.com/hafizhproject45/Golang-Boilerplate.git/internal/modules/{{Kebab .FeatName}}s/validations"
|
validation "gitlab.com/mbugroup/lti-api.git/internal/modules/{{Kebab .FeatName}}s/validations"
|
||||||
"github.com/hafizhproject45/Golang-Boilerplate.git/internal/response"
|
"gitlab.com/mbugroup/lti-api.git/internal/response"
|
||||||
|
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
model "github.com/hafizhproject45/Golang-Boilerplate.git/internal/modules/{{Kebab .FeatName}}s/models"
|
model "gitlab.com/mbugroup/lti-api.git/internal/modules/{{Kebab .FeatName}}s/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
// === DTO Structs ===
|
// === DTO Structs ===
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ import (
|
|||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
|
|
||||||
r{{Pascal .Entity}} "github.com/hafizhproject45/Golang-Boilerplate.git/internal/modules/{{Kebab .FeatName}}s/repositories"
|
r{{Pascal .Entity}} "gitlab.com/mbugroup/lti-api.git/internal/modules/{{Kebab .FeatName}}s/repositories"
|
||||||
s{{Pascal .Entity}} "github.com/hafizhproject45/Golang-Boilerplate.git/internal/modules/{{Kebab .FeatName}}s/services"
|
s{{Pascal .Entity}} "gitlab.com/mbugroup/lti-api.git/internal/modules/{{Kebab .FeatName}}s/services"
|
||||||
|
|
||||||
rUser "github.com/hafizhproject45/Golang-Boilerplate.git/internal/modules/users/repositories"
|
rUser "gitlab.com/mbugroup/lti-api.git/internal/modules/users/repositories"
|
||||||
sUser "github.com/hafizhproject45/Golang-Boilerplate.git/internal/modules/users/services"
|
sUser "gitlab.com/mbugroup/lti-api.git/internal/modules/users/services"
|
||||||
)
|
)
|
||||||
|
|
||||||
type {{Pascal .Entity}}Module struct{}
|
type {{Pascal .Entity}}Module struct{}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{{define "repository"}}package repository
|
{{define "repository"}}package repository
|
||||||
|
|
||||||
import (
|
import (
|
||||||
model "github.com/hafizhproject45/Golang-Boilerplate.git/internal/modules/{{Kebab .FeatName}}s/models"
|
model "gitlab.com/mbugroup/lti-api.git/internal/modules/{{Kebab .FeatName}}s/models"
|
||||||
"github.com/hafizhproject45/Golang-Boilerplate.git/internal/repository"
|
"gitlab.com/mbugroup/lti-api.git/internal/repository"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
{{define "route"}}package {{Kebab .Entity}}s
|
{{define "route"}}package {{Kebab .Entity}}s
|
||||||
|
|
||||||
import (
|
import (
|
||||||
m "github.com/hafizhproject45/Golang-Boilerplate.git/internal/middleware"
|
m "gitlab.com/mbugroup/lti-api.git/internal/middleware"
|
||||||
controller "github.com/hafizhproject45/Golang-Boilerplate.git/internal/modules/{{Kebab .FeatName}}s/controllers"
|
controller "gitlab.com/mbugroup/lti-api.git/internal/modules/{{Kebab .FeatName}}s/controllers"
|
||||||
{{Camel .Entity}} "github.com/hafizhproject45/Golang-Boilerplate.git/internal/modules/{{Kebab .FeatName}}s/services"
|
{{Camel .Entity}} "gitlab.com/mbugroup/lti-api.git/internal/modules/{{Kebab .FeatName}}s/services"
|
||||||
user "github.com/hafizhproject45/Golang-Boilerplate.git/internal/modules/users/services"
|
user "gitlab.com/mbugroup/lti-api.git/internal/modules/users/services"
|
||||||
|
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
model "github.com/hafizhproject45/Golang-Boilerplate.git/internal/modules/{{Kebab .FeatName}}s/models"
|
model "gitlab.com/mbugroup/lti-api.git/internal/modules/{{Kebab .FeatName}}s/models"
|
||||||
repository "github.com/hafizhproject45/Golang-Boilerplate.git/internal/modules/{{Kebab .FeatName}}s/repositories"
|
repository "gitlab.com/mbugroup/lti-api.git/internal/modules/{{Kebab .FeatName}}s/repositories"
|
||||||
validation "github.com/hafizhproject45/Golang-Boilerplate.git/internal/modules/{{Kebab .FeatName}}s/validations"
|
validation "gitlab.com/mbugroup/lti-api.git/internal/modules/{{Kebab .FeatName}}s/validations"
|
||||||
"github.com/hafizhproject45/Golang-Boilerplate.git/internal/utils"
|
"gitlab.com/mbugroup/lti-api.git/internal/utils"
|
||||||
|
|
||||||
"github.com/go-playground/validator/v10"
|
"github.com/go-playground/validator/v10"
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
|
|||||||
Reference in New Issue
Block a user