Skip to content

Commit

Permalink
refactor:目录rename
Browse files Browse the repository at this point in the history
  • Loading branch information
yahahaff committed Jul 22, 2024
1 parent 4111fb7 commit 60b0a98
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions internal/controllers/api/http/etcd_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func (tc *EtcdController) GetKey(c *gin.Context) {
request.RangeEnd = "AA=="
}

data, err := service.Entrance.HttpRequestService.GetKey(request.Key, request.RangeEnd)
data, err := service.Entrance.HttpService.GetKey(request.Key, request.RangeEnd)
if err != nil {
if err.Error() == "unexpected response format" {
logger.ErrorString("http-request", "etcd", err.Error())
Expand Down Expand Up @@ -74,7 +74,7 @@ func (tc *EtcdController) PutKey(c *gin.Context) {
return
}

data, err := service.Entrance.HttpRequestService.PutData(request.Key, request.Value)
data, err := service.Entrance.HttpService.PutData(request.Key, request.Value)
if err != nil {
if err.Error() == "unexpected response format" {
logger.ErrorString("http-request", "etcd", err.Error())
Expand Down Expand Up @@ -109,7 +109,7 @@ func (tc *EtcdController) DeleteKey(c *gin.Context) {
return
}

data, err := service.Entrance.HttpRequestService.DeleteData(request.Key)
data, err := service.Entrance.HttpService.DeleteData(request.Key)
if err != nil {
if err.Error() == "unexpected response format" {
logger.ErrorString("http-request", "etcd", err.Error())
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Package sys auth 授权相关逻辑
package httprequest
package http

import (
"encoding/base64"
Expand Down
5 changes: 5 additions & 0 deletions internal/service/http/httprequest_service.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package http

type HttpGroup struct {
EtcdService
}
5 changes: 0 additions & 5 deletions internal/service/httprequest/httprequest_service.go

This file was deleted.

6 changes: 3 additions & 3 deletions internal/service/service.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package service

import (
"github.com/yahahaff/rapide/internal/service/httprequest"
"github.com/yahahaff/rapide/internal/service/http"
"github.com/yahahaff/rapide/internal/service/sys"
)

var Entrance = ServiceGroup{}

type ServiceGroup struct {
SysService sys.SysGroup
HttpRequestService httprequest.HttpRequestGroup
SysService sys.SysGroup
HttpService http.HttpGroup
}

0 comments on commit 60b0a98

Please sign in to comment.