🎉 搭完基本框架
This commit is contained in:
25
internal/handler/connection.go
Normal file
25
internal/handler/connection.go
Normal file
@ -0,0 +1,25 @@
|
||||
package handler
|
||||
|
||||
import (
|
||||
"nf-disk/internal/ndh"
|
||||
)
|
||||
|
||||
func ConnectionTest(c *ndh.Ctx) error {
|
||||
type Req struct {
|
||||
Name string `json:"name"`
|
||||
Endpoint string `json:"endpoint"`
|
||||
Access string `json:"access"`
|
||||
Key string `json:"key"`
|
||||
}
|
||||
|
||||
var (
|
||||
err error
|
||||
req = new(Req)
|
||||
)
|
||||
|
||||
if err = c.ReqParse(req); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return c.Send200("test success")
|
||||
}
|
Reference in New Issue
Block a user