Skip to content

Commit

Permalink
feat: 跑分插件
Browse files Browse the repository at this point in the history
  • Loading branch information
devhaozi committed Oct 19, 2024
1 parent 2be97a4 commit 0d9c8b3
Show file tree
Hide file tree
Showing 16 changed files with 1,048 additions and 12 deletions.
18 changes: 18 additions & 0 deletions internal/apps/benchmark/init.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package benchmark

import (
"github.com/go-chi/chi/v5"

"github.com/TheTNB/panel/pkg/apploader"
"github.com/TheTNB/panel/pkg/types"
)

func init() {
apploader.Register(&types.App{
Slug: "benchmark",
Route: func(r chi.Router) {
service := NewService()
r.Post("/test", service.Test)
},
})
}
6 changes: 6 additions & 0 deletions internal/apps/benchmark/request.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package benchmark

type Test struct {
Name string `json:"name" validate:"required,oneof=image machine compile encryption compression physics json memory disk"`
Multi bool `json:"multi"`
}
Loading

0 comments on commit 0d9c8b3

Please sign in to comment.