mirror of
https://github.com/acepanel/panel.git
synced 2026-02-06 02:37:16 +08:00
39 lines
864 B
Go
39 lines
864 B
Go
package requests
|
|
|
|
import (
|
|
"github.com/goravel/framework/contracts/http"
|
|
"github.com/goravel/framework/contracts/validation"
|
|
)
|
|
|
|
type Search struct {
|
|
Path string `form:"path" json:"path"`
|
|
KeyWord string `form:"keyword" json:"keyword"`
|
|
}
|
|
|
|
func (r *Search) Authorize(ctx http.Context) error {
|
|
return nil
|
|
}
|
|
|
|
func (r *Search) Rules(ctx http.Context) map[string]string {
|
|
return map[string]string{
|
|
"path": `regex:^/.*$|path_exists`,
|
|
"keyword": "required|string",
|
|
}
|
|
}
|
|
|
|
func (r *Search) Filters(ctx http.Context) map[string]string {
|
|
return map[string]string{}
|
|
}
|
|
|
|
func (r *Search) Messages(ctx http.Context) map[string]string {
|
|
return map[string]string{}
|
|
}
|
|
|
|
func (r *Search) Attributes(ctx http.Context) map[string]string {
|
|
return map[string]string{}
|
|
}
|
|
|
|
func (r *Search) PrepareForValidation(ctx http.Context, data validation.Data) error {
|
|
return nil
|
|
}
|