Skip to content

Commit

Permalink
refactor: rename folder
Browse files Browse the repository at this point in the history
  • Loading branch information
pupilcc committed Mar 30, 2024
1 parent 26e049b commit 3071a51
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions infrastructure/acme/setting.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package acme

import (
"autossl/middleware"
"autossl/module"
"go.uber.org/zap"
"os"
"os/exec"
Expand All @@ -10,7 +10,7 @@ import (
)

var usr, _ = user.Current()
var logger = middleware.GetLogger()
var logger = module.GetLogger()

func InitAcme() {
ca()
Expand Down
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package main

import (
"autossl/infrastructure/acme"
"autossl/middleware"
"autossl/module"
"autossl/web"
"github.com/golang-jwt/jwt/v5"
echojwt "github.com/labstack/echo-jwt/v4"
Expand All @@ -15,7 +15,7 @@ func main() {

// JWT
secret := os.Getenv("ADMIN_PASSWORD")
skipTokenMiddleware := middleware.Skip
skipTokenMiddleware := module.Skip
jwtMiddleware := echojwt.WithConfig(echojwt.Config{
NewClaimsFunc: func(c echo.Context) jwt.Claims {
return new(web.JWTCustomClaims)
Expand All @@ -31,7 +31,7 @@ func main() {
web.LoginRoutes(e)

// Logger
e.Use(middleware.RequestLogger())
e.Use(module.RequestLogger())

// Init acme.sh
acme.InitAcme()
Expand Down
2 changes: 1 addition & 1 deletion middleware/jwt.go → module/jwt.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package middleware
package module

import "github.com/labstack/echo/v4"

Expand Down
2 changes: 1 addition & 1 deletion middleware/logger.go → module/logger.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package middleware
package module

import (
"github.com/labstack/echo/v4"
Expand Down

0 comments on commit 3071a51

Please sign in to comment.