You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

30 lines
592 B

package service
import (
"net/http"
repository "sig-pub/internal/sig/repoitory"
"sig-pub/pkg/resp"
"github.com/gin-gonic/gin"
)
type BacktestService struct {
repo *repository.BacktestRepository
}
func NewBacktestService(repo *repository.BacktestRepository) *BacktestService {
return &BacktestService{
repo: repo,
}
}
func (svc *BacktestService) Route(group *gin.RouterGroup) {
group.GET("hello", svc.listBacktestLog)
}
func (svc *BacktestService) listBacktestLog(ctx *gin.Context) {
name := ctx.Query("name")
ctx.JSON(http.StatusOK, resp.H{
"text": "ojbk: " + name,
})
}