mirror of
https://github.com/Floriansylvain/RenewCMS.git
synced 2026-08-19 11:43:22 +02:00
refac: renamed 'GoCMS' -> 'RenewCMS'
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@ HOST=example.com
|
|||||||
PORT=8080
|
PORT=8080
|
||||||
JWT_SECRET=abc123
|
JWT_SECRET=abc123
|
||||||
CORS_ALLOWED_ORIGINS=*
|
CORS_ALLOWED_ORIGINS=*
|
||||||
DB_FILE=./gocms.db
|
DB_FILE=./renewcms.db
|
||||||
DOCKER_DB_FOLDER=./data
|
DOCKER_DB_FOLDER=./data
|
||||||
SMTP_EMAIL=a@b.c
|
SMTP_EMAIL=a@b.c
|
||||||
SMTP_PASSWORD=12341234
|
SMTP_PASSWORD=12341234
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# GoCMS
|
# RenewCMS
|
||||||
|
|
||||||
## 🚧 This project is under development !
|
## 🚧 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 |
|
| PORT | int | port the API will use | required |
|
||||||
| JWT_SECRET | string | secret for the jwt auth | required |
|
| JWT_SECRET | string | secret for the jwt auth | required |
|
||||||
| CORS_ALLOWED_ORIGINS | string | allowed origins for CORS | required, semicolon separated list |
|
| 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. `./gocms.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. `./RenewCMS.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 |
|
| 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_EMAIL | string | sender email | required |
|
||||||
| SMTP_PASSWORD | string | smtp account password | required |
|
| SMTP_PASSWORD | string | smtp account password | required |
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package gateways
|
package gateways
|
||||||
|
|
||||||
import (
|
import (
|
||||||
entity "GoCMS/adapters/secondary/gateways/models"
|
entity "RenewCMS/adapters/secondary/gateways/models"
|
||||||
domain "GoCMS/domain/article"
|
domain "RenewCMS/domain/article"
|
||||||
"GoCMS/domain/gateways"
|
"RenewCMS/domain/gateways"
|
||||||
|
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package gateways
|
package gateways
|
||||||
|
|
||||||
import (
|
import (
|
||||||
entity "GoCMS/adapters/secondary/gateways/models"
|
entity "RenewCMS/adapters/secondary/gateways/models"
|
||||||
"GoCMS/domain/gateways"
|
"RenewCMS/domain/gateways"
|
||||||
domain "GoCMS/domain/image"
|
domain "RenewCMS/domain/image"
|
||||||
"errors"
|
"errors"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<body>
|
<body>
|
||||||
<h1>
|
<h1>
|
||||||
<img src="{{.Host}}/static/gocms-favicon-128.png" alt="G" style="width: 2.5rem"/>
|
<img src="{{.Host}}/static/renewcms-favicon-64.png" alt="G" style="width: 2.5rem"/>
|
||||||
GoCMS
|
RenewCMS
|
||||||
</h1>
|
</h1>
|
||||||
<main>
|
<main>
|
||||||
<p>You or someone tried to create a GoCMS admin account with this e-mail address. If you are not responsible for
|
<p>You or someone tried to create a RenewCMS admin account with this e-mail address. If you are not responsible for
|
||||||
this, please do not validate the account creation.</p>
|
this, please do not validate the account creation.</p>
|
||||||
<p><b>If you want to validate the account creation, please <a
|
<p><b>If you want to validate the account creation, please <a
|
||||||
href="{{.Host}}/register/validate?c={{.VerificationCode}}" target="_blank">click HERE</a>.</b>
|
href="{{.Host}}/register/validate?c={{.VerificationCode}}" target="_blank">click HERE</a>.</b>
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<body>
|
<body>
|
||||||
<h1>
|
<h1>
|
||||||
<img src="{{.Host}}/static/gocms-favicon-128.png" alt="G" style="width: 2.5rem"/>
|
<img src="{{.Host}}/static/renewcms-favicon-64.png" alt="G" style="width: 2.5rem"/>
|
||||||
GoCMS
|
RenewCMS
|
||||||
</h1>
|
</h1>
|
||||||
<main>
|
<main>
|
||||||
<p>You or someone tried to create reset your GoCMS account with this e-mail address. If you are not responsible for
|
<p>You or someone tried to create reset your RenewCMS account with this e-mail address. If you are not responsible for
|
||||||
this, please do not validate the password reset.</p>
|
this, please do not validate the password reset.</p>
|
||||||
<p><b>If you want to reset your password, please <a
|
<p><b>If you want to reset your password, please <a
|
||||||
href="{{.Host}}/register/reset/validate?c={{.VerificationCode}}&email={{.Email}}" target="_blank">click HERE</a>.</b>
|
href="{{.Host}}/register/reset/validate?c={{.VerificationCode}}&email={{.Email}}" target="_blank">click HERE</a>.</b>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package gateways
|
package gateways
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/domain/gateways"
|
"RenewCMS/domain/gateways"
|
||||||
"bytes"
|
"bytes"
|
||||||
"embed"
|
"embed"
|
||||||
"html/template"
|
"html/template"
|
||||||
@@ -44,12 +44,12 @@ func (m MailRepository) Send(receiverAddress string, templateName string, data a
|
|||||||
|
|
||||||
msg := gomail.NewMessage()
|
msg := gomail.NewMessage()
|
||||||
msg.SetHeaders(map[string][]string{
|
msg.SetHeaders(map[string][]string{
|
||||||
"From": {"GoCMS <" + from + ">"},
|
"From": {"RenewCMS <" + from + ">"},
|
||||||
"To": {receiverAddress},
|
"To": {receiverAddress},
|
||||||
"MIME-version": {"1.0"},
|
"MIME-version": {"1.0"},
|
||||||
"Content-Type": {"text/html"},
|
"Content-Type": {"text/html"},
|
||||||
"charset": {"UTF-8"},
|
"charset": {"UTF-8"},
|
||||||
"Subject": {"GoCMS | Action required"},
|
"Subject": {"RenewCMS | Action required"},
|
||||||
})
|
})
|
||||||
msg.SetBody("text/html", body.String())
|
msg.SetBody("text/html", body.String())
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package gateways
|
package gateways
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/domain/gateways"
|
"RenewCMS/domain/gateways"
|
||||||
"bytes"
|
"bytes"
|
||||||
"embed"
|
"embed"
|
||||||
"html/template"
|
"html/template"
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package gateways
|
package gateways
|
||||||
|
|
||||||
import (
|
import (
|
||||||
entity "GoCMS/adapters/secondary/gateways/models"
|
entity "RenewCMS/adapters/secondary/gateways/models"
|
||||||
"GoCMS/domain/gateways"
|
"RenewCMS/domain/gateways"
|
||||||
"GoCMS/domain/user"
|
"RenewCMS/domain/user"
|
||||||
domain "GoCMS/domain/user"
|
domain "RenewCMS/domain/user"
|
||||||
"golang.org/x/crypto/bcrypt"
|
"golang.org/x/crypto/bcrypt"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>GoCMS | Create article</title>
|
<title>RenewCMS | Create article</title>
|
||||||
{{.Head}}
|
{{.Head}}
|
||||||
<style>
|
<style>
|
||||||
form {
|
form {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>GoCMS | Article edition</title>
|
<title>RenewCMS | Article edition</title>
|
||||||
{{.Head}}
|
{{.Head}}
|
||||||
</head>
|
</head>
|
||||||
<body class="text-dark vh-100 d-flex flex-column">
|
<body class="text-dark vh-100 d-flex flex-column">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>GoCMS | Articles</title>
|
<title>RenewCMS | Articles</title>
|
||||||
{{.Head}}
|
{{.Head}}
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<nav class="navbar navbar-expand-lg bg-body-tertiary">
|
<nav class="navbar navbar-expand-lg bg-body-tertiary">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="d-flex gap-2 justify-content-center align-items-center">
|
<div class="d-flex gap-2 justify-content-center align-items-center">
|
||||||
<img src="/static/gocms-favicon-128.png" alt="Logo" style="width: 2.5rem"/>
|
<img src="/static/renewcms-favicon-64.png" alt="Logo" style="width: 2.5rem"/>
|
||||||
<a class="navbar-brand h1 my-auto" href="https://github.com/Floriansylvain/GoCMS" target="_blank">
|
<a class="navbar-brand h1 my-auto" href="https://github.com/Floriansylvain/RenewCMS" target="_blank">
|
||||||
GoCMS
|
RenewCMS
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>GoCMS | Home</title>
|
<title>RenewCMS | Home</title>
|
||||||
{{.Head}}
|
{{.Head}}
|
||||||
</head>
|
</head>
|
||||||
<body class="text-dark">
|
<body class="text-dark">
|
||||||
{{.Navbar}}
|
{{.Navbar}}
|
||||||
<div class="container mt-3 text-black-50">
|
<div class="container mt-3 text-black-50">
|
||||||
<h1>Home</h1>
|
<h1>Home</h1>
|
||||||
<p>Welcome on GoCMS !</p>
|
<p>Welcome on RenewCMS !</p>
|
||||||
<a href="/article">
|
<a href="/article">
|
||||||
<button class="btn btn-outline-primary">Articles »</button>
|
<button class="btn btn-outline-primary">Articles »</button>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>GoCMS | Home</title>
|
<title>RenewCMS | Home</title>
|
||||||
{{.Head}}
|
{{.Head}}
|
||||||
</head>
|
</head>
|
||||||
<body class="text-dark">
|
<body class="text-dark">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>GoCMS | Login</title>
|
<title>RenewCMS | Login</title>
|
||||||
{{.Head}}
|
{{.Head}}
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="d-flex flex-column m-auto form-container">
|
<div class="d-flex flex-column m-auto form-container">
|
||||||
<div>
|
<div>
|
||||||
<h1>GoCMS</h1>
|
<h1>RenewCMS</h1>
|
||||||
<h2>Login</h2>
|
<h2>Login</h2>
|
||||||
</div>
|
</div>
|
||||||
<form action="login" method="POST" class="mt-5" id="loginForm">
|
<form action="login" method="POST" class="mt-5" id="loginForm">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>GoCMS | Password reset</title>
|
<title>RenewCMS | Password reset</title>
|
||||||
{{.Head}}
|
{{.Head}}
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="d-flex flex-column m-auto form-container">
|
<div class="d-flex flex-column m-auto form-container">
|
||||||
<div>
|
<div>
|
||||||
<h1>GoCMS</h1>
|
<h1>RenewCMS</h1>
|
||||||
<h2>Admin account password reset</h2>
|
<h2>Admin account password reset</h2>
|
||||||
</div>
|
</div>
|
||||||
<form action="request" method="POST" class="mt-5" id="registerForm">
|
<form action="request" method="POST" class="mt-5" id="registerForm">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>GoCMS | Password reset</title>
|
<title>RenewCMS | Password reset</title>
|
||||||
{{.Head}}
|
{{.Head}}
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="d-flex flex-column m-auto form-container">
|
<div class="d-flex flex-column m-auto form-container">
|
||||||
<div>
|
<div>
|
||||||
<h1>GoCMS</h1>
|
<h1>RenewCMS</h1>
|
||||||
<h2>Admin account password reset</h2>
|
<h2>Admin account password reset</h2>
|
||||||
</div>
|
</div>
|
||||||
<form action="validate" method="POST" class="mt-5" id="registerForm">
|
<form action="validate" method="POST" class="mt-5" id="registerForm">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>GoCMS | Setup</title>
|
<title>RenewCMS | Setup</title>
|
||||||
{{.Head}}
|
{{.Head}}
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="d-flex flex-column m-auto form-container">
|
<div class="d-flex flex-column m-auto form-container">
|
||||||
<div>
|
<div>
|
||||||
<h1>GoCMS</h1>
|
<h1>RenewCMS</h1>
|
||||||
<h2>Admin account creation</h2>
|
<h2>Admin account creation</h2>
|
||||||
</div>
|
</div>
|
||||||
<form action="register" method="POST" class="mt-5" id="registerForm">
|
<form action="register" method="POST" class="mt-5" id="registerForm">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>GoCMS | Setup</title>
|
<title>RenewCMS | Setup</title>
|
||||||
{{.Head}}
|
{{.Head}}
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="d-flex flex-column m-auto form-container">
|
<div class="d-flex flex-column m-auto form-container">
|
||||||
<div>
|
<div>
|
||||||
<h1>GoCMS</h1>
|
<h1>RenewCMS</h1>
|
||||||
<h2>Verify your email</h2>
|
<h2>Verify your email</h2>
|
||||||
</div>
|
</div>
|
||||||
<p>An e-mail with the validation link was sent to the address you just registered.</p>
|
<p>An e-mail with the validation link was sent to the address you just registered.</p>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>GoCMS | Setup</title>
|
<title>RenewCMS | Setup</title>
|
||||||
{{.Head}}
|
{{.Head}}
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="d-flex flex-column gap-5 m-auto form-container">
|
<div class="d-flex flex-column gap-5 m-auto form-container">
|
||||||
<div>
|
<div>
|
||||||
<h1>GoCMS</h1>
|
<h1>RenewCMS</h1>
|
||||||
<h2>E-mail verification</h2>
|
<h2>E-mail verification</h2>
|
||||||
</div>
|
</div>
|
||||||
{{ if .PageError.IsError }}
|
{{ if .PageError.IsError }}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package article
|
package article
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/api"
|
"RenewCMS/api"
|
||||||
"GoCMS/api/controllers/auth"
|
"RenewCMS/api/controllers/auth"
|
||||||
"GoCMS/domain/article"
|
"RenewCMS/domain/article"
|
||||||
"GoCMS/useCases"
|
"RenewCMS/useCases"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package auth
|
package auth
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/api"
|
"RenewCMS/api"
|
||||||
"GoCMS/domain/user"
|
"RenewCMS/domain/user"
|
||||||
"GoCMS/useCases"
|
"RenewCMS/useCases"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package image
|
package image
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/api"
|
"RenewCMS/api"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package pages
|
package pages
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/api"
|
"RenewCMS/api"
|
||||||
"GoCMS/useCases"
|
"RenewCMS/useCases"
|
||||||
"html/template"
|
"html/template"
|
||||||
"net/http"
|
"net/http"
|
||||||
"regexp"
|
"regexp"
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package pages
|
package pages
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/api"
|
"RenewCMS/api"
|
||||||
"GoCMS/api/controllers/article"
|
"RenewCMS/api/controllers/article"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package pages
|
package pages
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/api"
|
"RenewCMS/api"
|
||||||
"GoCMS/domain/article"
|
"RenewCMS/domain/article"
|
||||||
"html/template"
|
"html/template"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package pages
|
package pages
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/api"
|
"RenewCMS/api"
|
||||||
"errors"
|
"errors"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package pages
|
package pages
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/api"
|
"RenewCMS/api"
|
||||||
"html/template"
|
"html/template"
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package pages
|
package pages
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/api"
|
"RenewCMS/api"
|
||||||
"html/template"
|
"html/template"
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package pages
|
package pages
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/api"
|
"RenewCMS/api"
|
||||||
"html/template"
|
"html/template"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package pages
|
package pages
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/api"
|
"RenewCMS/api"
|
||||||
"GoCMS/api/controllers/auth"
|
"RenewCMS/api/controllers/auth"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package pages
|
package pages
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/api"
|
"RenewCMS/api"
|
||||||
"GoCMS/api/controllers/auth"
|
"RenewCMS/api/controllers/auth"
|
||||||
"GoCMS/api/controllers/image"
|
"RenewCMS/api/controllers/image"
|
||||||
"html/template"
|
"html/template"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package pages
|
package pages
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/api"
|
"RenewCMS/api"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package pages
|
package pages
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/api"
|
"RenewCMS/api"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"golang.org/x/crypto/bcrypt"
|
"golang.org/x/crypto/bcrypt"
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package pages
|
package pages
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/api"
|
"RenewCMS/api"
|
||||||
"GoCMS/api/controllers/auth"
|
"RenewCMS/api/controllers/auth"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package pages
|
package pages
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/api"
|
"RenewCMS/api"
|
||||||
"GoCMS/api/controllers/auth"
|
"RenewCMS/api/controllers/auth"
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package pages
|
package pages
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/api"
|
"RenewCMS/api"
|
||||||
"GoCMS/api/controllers/auth"
|
"RenewCMS/api/controllers/auth"
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/adapters/secondary/gateways"
|
"RenewCMS/adapters/secondary/gateways"
|
||||||
"GoCMS/adapters/secondary/gateways/models"
|
"RenewCMS/adapters/secondary/gateways/models"
|
||||||
domainGateways "GoCMS/domain/gateways"
|
domainGateways "RenewCMS/domain/gateways"
|
||||||
"GoCMS/useCases"
|
"RenewCMS/useCases"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
|
|||||||
Vendored
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 15 KiB |
Vendored
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 KiB |
Vendored
BIN
Binary file not shown.
|
After Width: | Height: | Size: 472 B |
+1
-1
@@ -7,6 +7,6 @@ services:
|
|||||||
- ${DOCKER_DB_FOLDER}:/app/db/
|
- ${DOCKER_DB_FOLDER}:/app/db/
|
||||||
environment:
|
environment:
|
||||||
- PORT=8080
|
- PORT=8080
|
||||||
- DB_FILE=/app/db/gocms.db
|
- DB_FILE=/app/db/RenewCMS.db
|
||||||
env_file:
|
env_file:
|
||||||
- ./.env
|
- ./.env
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package article
|
package article
|
||||||
|
|
||||||
import (
|
import (
|
||||||
entity "GoCMS/adapters/secondary/gateways/models"
|
entity "RenewCMS/adapters/secondary/gateways/models"
|
||||||
domain "GoCMS/domain/image"
|
domain "RenewCMS/domain/image"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package gateways
|
package gateways
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/domain/article"
|
"RenewCMS/domain/article"
|
||||||
)
|
)
|
||||||
|
|
||||||
type IArticleRepository interface {
|
type IArticleRepository interface {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package gateways
|
package gateways
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/domain/image"
|
"RenewCMS/domain/image"
|
||||||
"mime/multipart"
|
"mime/multipart"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package gateways
|
package gateways
|
||||||
|
|
||||||
import "GoCMS/domain/user"
|
import "RenewCMS/domain/user"
|
||||||
|
|
||||||
type IUserRepository interface {
|
type IUserRepository interface {
|
||||||
Get(id uint32) (user.User, error)
|
Get(id uint32) (user.User, error)
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import "GoCMS/main/server"
|
import "RenewCMS/main/server"
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
router := server.InitServer()
|
router := server.InitServer()
|
||||||
|
|||||||
+3
-3
@@ -1,9 +1,9 @@
|
|||||||
package route
|
package route
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/api/controllers/article"
|
"RenewCMS/api/controllers/article"
|
||||||
"GoCMS/api/controllers/auth"
|
"RenewCMS/api/controllers/auth"
|
||||||
"GoCMS/api/controllers/pages"
|
"RenewCMS/api/controllers/pages"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package server
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/api"
|
"RenewCMS/api"
|
||||||
"GoCMS/main/route"
|
"RenewCMS/main/route"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
"github.com/joho/godotenv"
|
"github.com/joho/godotenv"
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
OUTPUT_DIR=./bin
|
OUTPUT_DIR=./bin
|
||||||
GO_FILE_PATH="./main/main.go"
|
GO_FILE_PATH="./main/main.go"
|
||||||
PROGRAM_NAME=GoCMS
|
PROGRAM_NAME=RenewCMS
|
||||||
|
|
||||||
platforms=("windows/amd64" "windows/arm64" "linux/amd64" "linux/arm64" "darwin/amd64" "darwin/arm64")
|
platforms=("windows/amd64" "windows/arm64" "linux/amd64" "linux/arm64" "darwin/amd64" "darwin/arm64")
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package useCases
|
package useCases
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/domain/article"
|
"RenewCMS/domain/article"
|
||||||
"GoCMS/domain/gateways"
|
"RenewCMS/domain/gateways"
|
||||||
)
|
)
|
||||||
|
|
||||||
type CreateArticleUseCase struct {
|
type CreateArticleUseCase struct {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package useCases
|
package useCases
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/domain/gateways"
|
"RenewCMS/domain/gateways"
|
||||||
"GoCMS/domain/image"
|
"RenewCMS/domain/image"
|
||||||
"mime/multipart"
|
"mime/multipart"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package useCases
|
package useCases
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/domain/gateways"
|
"RenewCMS/domain/gateways"
|
||||||
"GoCMS/domain/user"
|
"RenewCMS/domain/user"
|
||||||
)
|
)
|
||||||
|
|
||||||
type CreateUserUseCase struct {
|
type CreateUserUseCase struct {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package useCases
|
package useCases
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/domain/gateways"
|
"RenewCMS/domain/gateways"
|
||||||
)
|
)
|
||||||
|
|
||||||
type DeleteArticleUseCase struct {
|
type DeleteArticleUseCase struct {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package useCases
|
package useCases
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/domain/gateways"
|
"RenewCMS/domain/gateways"
|
||||||
)
|
)
|
||||||
|
|
||||||
type DeleteImageUseCase struct {
|
type DeleteImageUseCase struct {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package useCases
|
package useCases
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/domain/gateways"
|
"RenewCMS/domain/gateways"
|
||||||
)
|
)
|
||||||
|
|
||||||
type DeleteUserUseCase struct {
|
type DeleteUserUseCase struct {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package useCases
|
package useCases
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/domain/article"
|
"RenewCMS/domain/article"
|
||||||
"GoCMS/domain/gateways"
|
"RenewCMS/domain/gateways"
|
||||||
)
|
)
|
||||||
|
|
||||||
type GetArticleUseCase struct {
|
type GetArticleUseCase struct {
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
package useCases
|
package useCases
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/domain/gateways"
|
"RenewCMS/domain/gateways"
|
||||||
)
|
)
|
||||||
|
|
||||||
type GetPageUseCase struct {
|
type GetPageUseCase struct {
|
||||||
|
|||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
package useCases
|
package useCases
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/domain/gateways"
|
"RenewCMS/domain/gateways"
|
||||||
"GoCMS/domain/user"
|
"RenewCMS/domain/user"
|
||||||
)
|
)
|
||||||
|
|
||||||
type GetUserUseCase struct {
|
type GetUserUseCase struct {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package useCases
|
package useCases
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/domain/article"
|
"RenewCMS/domain/article"
|
||||||
"GoCMS/domain/gateways"
|
"RenewCMS/domain/gateways"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ListArticlesUseCase struct {
|
type ListArticlesUseCase struct {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package useCases
|
package useCases
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/domain/gateways"
|
"RenewCMS/domain/gateways"
|
||||||
"GoCMS/domain/user"
|
"RenewCMS/domain/user"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ListUsersUseCase struct {
|
type ListUsersUseCase struct {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package useCases
|
package useCases
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/domain/gateways"
|
"RenewCMS/domain/gateways"
|
||||||
)
|
)
|
||||||
|
|
||||||
type SendMailUseCase struct {
|
type SendMailUseCase struct {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package useCases
|
package useCases
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/domain/article"
|
"RenewCMS/domain/article"
|
||||||
"GoCMS/domain/gateways"
|
"RenewCMS/domain/gateways"
|
||||||
)
|
)
|
||||||
|
|
||||||
type UpdateArticleUseCase struct {
|
type UpdateArticleUseCase struct {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package useCases
|
package useCases
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"GoCMS/domain/gateways"
|
"RenewCMS/domain/gateways"
|
||||||
"GoCMS/domain/user"
|
"RenewCMS/domain/user"
|
||||||
)
|
)
|
||||||
|
|
||||||
type UpdateUserUseCase struct {
|
type UpdateUserUseCase struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user