-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e2b1b09
commit 4ab6975
Showing
7 changed files
with
87 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package v1 | ||
|
||
import ( | ||
"AAStarCommunity/EthPaymaster_BackService/rpc_server/models" | ||
"AAStarCommunity/EthPaymaster_BackService/service" | ||
"fmt" | ||
"github.com/gin-gonic/gin" | ||
"net/http" | ||
) | ||
|
||
// GetSupportEntrypoint | ||
// @Tags Sponsor | ||
// @Description get the support entrypoint | ||
// @Accept json | ||
// @Product json | ||
// @Router /api/v1/get_support_entrypoint [get] | ||
// @Success 200 {object} gin.H | ||
func GetSupportEntrypoint(c *gin.Context) { | ||
//1.TODO API validate | ||
//2. recall service | ||
result, err := service.GetSupportEntrypointExecute() | ||
response := models.GetResponse() | ||
if err != nil { | ||
errStr := fmt.Sprintf("%v", err) | ||
response.SetHttpCode(http.StatusInternalServerError).FailCode(c, http.StatusInternalServerError, errStr) | ||
} | ||
response.WithData(result).Success(c) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package v1 | ||
|
||
import ( | ||
"AAStarCommunity/EthPaymaster_BackService/rpc_server/models" | ||
"AAStarCommunity/EthPaymaster_BackService/service" | ||
"fmt" | ||
"github.com/gin-gonic/gin" | ||
"net/http" | ||
) | ||
|
||
// GetSupportStrategy | ||
// @Tags Sponsor | ||
// @Description get the support strategy | ||
// @Accept json | ||
// @Produce json | ||
// @Success 200 {object} gin.H | ||
// @Router /api/v1/get_support_strategy [get] | ||
func GetSupportStrategy(c *gin.Context) { | ||
//1.TODO API validate | ||
//2. recall service | ||
result, err := service.GetSupportStrategyExecute() | ||
response := models.GetResponse() | ||
if err != nil { | ||
errStr := fmt.Sprintf("%v", err) | ||
response.SetHttpCode(http.StatusInternalServerError).FailCode(c, http.StatusInternalServerError, errStr) | ||
} | ||
response.WithData(result).Success(c) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package service | ||
|
||
import "AAStarCommunity/EthPaymaster_BackService/rpc_server/models" | ||
|
||
func TryPayUserOpExecute() (models.Result, error) { | ||
return models.Result{}, nil | ||
} | ||
func GetSupportEntrypointExecute() (models.Result, error) { | ||
return models.Result{}, nil | ||
} | ||
func GetSupportStrategyExecute() (models.Result, error) { | ||
return models.Result{}, nil | ||
} |