brand: GohCMS -> GoCMS, project-wide

This commit is contained in:
Florian Sylvain
2024-05-15 19:34:38 +02:00
parent 7097d71f45
commit 29fce9a241
39 changed files with 68 additions and 68 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ HOST=example.com
PORT=8080
JWT_SECRET=abc123
CORS_ALLOWED_ORIGINS=*
DB_FILE=./gohcms.db
DB_FILE=./gocms.db
DOCKER_DB_FOLDER=./data
SMTP_EMAIL=a@b.c
SMTP_PASSWORD=12341234
+2 -2
View File
@@ -1,4 +1,4 @@
# GohCMS
# GoCMS
## 🚧 This project is under development !
@@ -46,7 +46,7 @@ of course required, but not necessarily via the `.env` file.
| PORT | int | port the API will use | required |
| JWT_SECRET | string | secret for the jwt auth | required |
| CORS_ALLOWED_ORIGINS | string | allowed origins for CORS | required, semicolon separated list |
| DB_FILE | string | path to the sqlite db file | required, can be at the root but name still required (e.g. `./gohcms.db`) ; have to end up with `.db` |
| DB_FILE | string | path to the sqlite db file | required, can be at the root but name still required (e.g. `./gocms.db`) ; have to end up with `.db` |
| DOCKER_DB_FOLDER | string | path to the sqlite db file's folder | required with docker, this will basically be the host machine folder (e.g. `./data`) that contains the sqlite db file |
| SMTP_EMAIL | string | sender email | required |
| SMTP_PASSWORD | string | smtp account password | required |
@@ -2,11 +2,11 @@
<html lang="en">
<body>
<h1>
<img src="{{.Host}}/static/gohcms-favicon-128.png" alt="G" style="width: 2.5rem"/>
GohCMS
<img src="{{.Host}}/static/gocms-favicon-128.png" alt="G" style="width: 2.5rem"/>
GoCMS
</h1>
<main>
<p>You or someone tried to create a GohCMS admin account with this e-mail address. If you are not responsible for
<p>You or someone tried to create a GoCMS admin account with this e-mail address. If you are not responsible for
this, please do not validate the account creation.</p>
<p><b>If you want to validate the account creation, please <a href="{{.Host}}/register/validate?c={{.VerificationCode}}" target="_blank">click HERE</a>.</b>
</p>
@@ -1,7 +1,7 @@
package gateways
import (
"GohCMS2/domain/gateways"
"GoCMS/domain/gateways"
"bytes"
"embed"
"gopkg.in/gomail.v2"
@@ -39,12 +39,12 @@ func (m MailRepository) Send(receiverAddress string, templateName string, data i
msg := gomail.NewMessage()
msg.SetHeaders(map[string][]string{
"From": {"GohCMS <" + from + ">"},
"From": {"GoCMS <" + from + ">"},
"To": {receiverAddress},
"MIME-version": {"1.0"},
"Content-Type": {"text/html"},
"charset": {"UTF-8"},
"Subject": {"GohCMS | Action required"},
"Subject": {"GoCMS | Action required"},
})
msg.SetBody("text/html", body.String())
@@ -1,7 +1,7 @@
package gateways
import (
"GohCMS2/domain/gateways"
"GoCMS/domain/gateways"
"bytes"
"embed"
"html/template"
@@ -1,9 +1,9 @@
package gateways
import (
entity "GohCMS2/adapters/secondary/gateways/models"
"GohCMS2/domain/gateways"
domain "GohCMS2/domain/post"
entity "GoCMS/adapters/secondary/gateways/models"
"GoCMS/domain/gateways"
domain "GoCMS/domain/post"
"gorm.io/gorm"
)
@@ -1,10 +1,10 @@
package gateways
import (
entity "GohCMS2/adapters/secondary/gateways/models"
"GohCMS2/domain/gateways"
"GohCMS2/domain/user"
domain "GohCMS2/domain/user"
entity "GoCMS/adapters/secondary/gateways/models"
"GoCMS/domain/gateways"
"GoCMS/domain/user"
domain "GoCMS/domain/user"
"golang.org/x/crypto/bcrypt"
"gorm.io/gorm"
)
@@ -1,9 +1,9 @@
<nav class="navbar navbar-expand-lg bg-body-tertiary">
<div class="container">
<div class="d-flex gap-2 justify-content-center align-items-center">
<img src="/static/gohcms-favicon-128.png" alt="Logo" style="width: 2.5rem"/>
<a class="navbar-brand h1 my-auto" href="https://github.com/Floriansylvain/GohCMS" target="_blank">
GohCMS
<img src="/static/gocms-favicon-128.png" alt="Logo" style="width: 2.5rem"/>
<a class="navbar-brand h1 my-auto" href="https://github.com/Floriansylvain/GoCMS" target="_blank">
GoCMS
</a>
</div>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
@@ -1,14 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>GohCMS | Home</title>
<title>GoCMS | Home</title>
{{.Head}}
</head>
<body class="text-dark">
{{.Navbar}}
<div class="container mt-3 text-black-50">
<h1>Accueil</h1>
<p>Welcome on GohCMS !</p>
<p>Welcome on GoCMS !</p>
<a href="/post">
<button class="btn btn-outline-primary">Posts &raquo;</button>
</a>
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>GohCMS | Login</title>
<title>GoCMS | Login</title>
{{.Head}}
<style>
@@ -14,7 +14,7 @@
<div class="container">
<div class="d-flex flex-column m-auto form-container">
<div>
<h1>GohCMS</h1>
<h1>GoCMS</h1>
<h2>Login</h2>
</div>
<form action="login" method="POST" class="mt-5" id="loginForm">
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>GohCMS | Post edition</title>
<title>GoCMS | Post edition</title>
{{.Head}}
</head>
<body class="text-dark vh-100 d-flex flex-column">
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>GohCMS | Posts</title>
<title>GoCMS | Posts</title>
{{.Head}}
</head>
<body class="text-dark">
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>GohCMS | Setup</title>
<title>GoCMS | Setup</title>
{{.Head}}
<style>
@@ -14,7 +14,7 @@
<div class="container">
<div class="d-flex flex-column m-auto form-container">
<div>
<h1>GohCMS</h1>
<h1>GoCMS</h1>
<h2>Admin account creation</h2>
</div>
<form action="register" method="POST" class="mt-5" id="registerForm">
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>GohCMS | Setup</title>
<title>GoCMS | Setup</title>
{{.Head}}
<style>
@@ -14,11 +14,11 @@
<div class="container">
<div class="d-flex flex-column m-auto form-container">
<div>
<h1>GohCMS</h1>
<h1>GoCMS</h1>
<h2>Verify your email</h2>
</div>
<p>An e-mail with the validation link was sent to the address you just registered.</p>
<p>If you misspelled the address or just didn't receive any e-mails, please check your spams or cancel the
<p>If you misspelled theF address or just didn't receive any e-mails, please check your spams or cancel the
account creation.</p>
<form action="" method="post" class="d-flex">
<button class="btn btn-outline-primary w-100" type="submit">
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>GohCMS | Setup</title>
<title>GoCMS | Setup</title>
{{.Head}}
<style>
@@ -14,7 +14,7 @@
<div class="container">
<div class="d-flex flex-column gap-5 m-auto form-container">
<div>
<h1>GohCMS</h1>
<h1>GoCMS</h1>
<h2>E-mail verification</h2>
</div>
{{ if .PageError.IsError }}
+2 -2
View File
@@ -1,8 +1,8 @@
package api
import (
"GohCMS2/domain/user"
"GohCMS2/useCases"
"GoCMS/domain/user"
"GoCMS/useCases"
"encoding/json"
"github.com/go-chi/chi/v5"
"github.com/go-chi/jwtauth/v5"
+2 -2
View File
@@ -1,8 +1,8 @@
package api
import (
"GohCMS2/adapters/secondary/gateways/models"
"GohCMS2/useCases"
"GoCMS/adapters/secondary/gateways/models"
"GoCMS/useCases"
"github.com/glebarez/sqlite"
"go.uber.org/dig"
"gorm.io/gorm"
+1 -1
View File
@@ -1,7 +1,7 @@
package api
import (
"GohCMS2/useCases"
"GoCMS/useCases"
"encoding/json"
"github.com/go-chi/chi/v5"
"net/http"

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

+1 -1
View File
@@ -7,6 +7,6 @@ services:
- ${DOCKER_DB_FOLDER}:/app/db/
environment:
- PORT=8080
- DB_FILE=/app/db/gohcms.db
- DB_FILE=/app/db/gocms.db
env_file:
- ./.env
+1 -1
View File
@@ -1,7 +1,7 @@
package gateways
import (
"GohCMS2/domain/post"
"GoCMS/domain/post"
)
type IPostRepository interface {
+1 -1
View File
@@ -1,6 +1,6 @@
package gateways
import "GohCMS2/domain/user"
import "GoCMS/domain/user"
type IUserRepository interface {
Get(id uint32) (user.User, error)
+1 -1
View File
@@ -1,4 +1,4 @@
module GohCMS2
module GoCMS
go 1.20
+1 -1
View File
@@ -1,6 +1,6 @@
package main
import "GohCMS2/main/server"
import "GoCMS/main/server"
func main() {
router := server.InitServer()
+1 -1
View File
@@ -1,7 +1,7 @@
package route
import (
"GohCMS2/api"
"GoCMS/api"
"encoding/json"
"github.com/MadAppGang/httplog"
"github.com/go-chi/chi/v5"
+2 -2
View File
@@ -1,8 +1,8 @@
package server
import (
"GohCMS2/api"
"GohCMS2/main/route"
"GoCMS/api"
"GoCMS/main/route"
"fmt"
"github.com/go-chi/chi/v5"
"github.com/joho/godotenv"
+1 -1
View File
@@ -4,7 +4,7 @@ export GOARCH=amd64
OUTPUT_DIR=./bin
GO_FILE_PATH="./main/main.go"
PROGRAM_NAME=GohCMS
PROGRAM_NAME=GoCMS
# Compile for Windows
GOOS=windows go build -o "$OUTPUT_DIR/${PROGRAM_NAME}_windows.exe" "$GO_FILE_PATH"
+1 -1
View File
@@ -1,7 +1,7 @@
package test
import (
"GohCMS2/domain/post"
"GoCMS/domain/post"
"bytes"
"encoding/json"
"github.com/stretchr/testify/assert"
+3 -3
View File
@@ -1,9 +1,9 @@
package test
import (
"GohCMS2/adapters/secondary/gateways/models"
"GohCMS2/api"
"GohCMS2/main/server"
"GoCMS/adapters/secondary/gateways/models"
"GoCMS/api"
"GoCMS/main/server"
"github.com/glebarez/sqlite"
"gorm.io/gorm"
"io"
+2 -2
View File
@@ -1,8 +1,8 @@
package useCases
import (
"GohCMS2/adapters/secondary/gateways"
"GohCMS2/domain/post"
"GoCMS/adapters/secondary/gateways"
"GoCMS/domain/post"
"gorm.io/gorm"
)
+2 -2
View File
@@ -1,8 +1,8 @@
package useCases
import (
"GohCMS2/adapters/secondary/gateways"
"GohCMS2/domain/user"
"GoCMS/adapters/secondary/gateways"
"GoCMS/domain/user"
"gorm.io/gorm"
)
+1 -1
View File
@@ -1,7 +1,7 @@
package useCases
import (
"GohCMS2/adapters/secondary/gateways"
"GoCMS/adapters/secondary/gateways"
"gorm.io/gorm"
)
+1 -1
View File
@@ -1,7 +1,7 @@
package useCases
import (
"GohCMS2/adapters/secondary/gateways"
"GoCMS/adapters/secondary/gateways"
)
type GetPageUseCase struct {
+2 -2
View File
@@ -1,8 +1,8 @@
package useCases
import (
"GohCMS2/adapters/secondary/gateways"
"GohCMS2/domain/post"
"GoCMS/adapters/secondary/gateways"
"GoCMS/domain/post"
"gorm.io/gorm"
)
+2 -2
View File
@@ -1,8 +1,8 @@
package useCases
import (
"GohCMS2/adapters/secondary/gateways"
"GohCMS2/domain/user"
"GoCMS/adapters/secondary/gateways"
"GoCMS/domain/user"
"gorm.io/gorm"
)
+2 -2
View File
@@ -1,8 +1,8 @@
package useCases
import (
"GohCMS2/adapters/secondary/gateways"
"GohCMS2/domain/post"
"GoCMS/adapters/secondary/gateways"
"GoCMS/domain/post"
"gorm.io/gorm"
)
+2 -2
View File
@@ -1,8 +1,8 @@
package useCases
import (
"GohCMS2/adapters/secondary/gateways"
"GohCMS2/domain/user"
"GoCMS/adapters/secondary/gateways"
"GoCMS/domain/user"
"gorm.io/gorm"
)
+1 -1
View File
@@ -1,7 +1,7 @@
package useCases
import (
"GohCMS2/adapters/secondary/gateways"
"GoCMS/adapters/secondary/gateways"
)
type SendMailUseCase struct {
+2 -2
View File
@@ -1,8 +1,8 @@
package useCases
import (
"GohCMS2/adapters/secondary/gateways"
"GohCMS2/domain/user"
"GoCMS/adapters/secondary/gateways"
"GoCMS/domain/user"
"gorm.io/gorm"
)