功能:按资源配置平台列表搜索

This commit is contained in:
czl231
2026-08-11 22:22:36 +08:00
parent 8d6ffca1e2
commit 95d0f7dc54
19 changed files with 741 additions and 62 deletions

View File

@@ -20,11 +20,12 @@ const (
// ResourceContract is the expected cross-layer representation of one resource.
type ResourceContract struct {
Domain string
Name string
Path string
PageKind string
Mode ResourceMode
Domain string
Name string
Path string
PageKind string
Mode ResourceMode
SearchFields []common.KeywordSearchField
}
// ResourceDefinition describes a route resource and the fields it may change.
@@ -94,7 +95,10 @@ func ExpectedResources() []ResourceContract {
}
func resourceContract(domain, name string, mode ResourceMode, pageKind string) ResourceContract {
return ResourceContract{Domain: domain, Name: name, Path: resourcePath(domain, name), Mode: mode, PageKind: pageKind}
return ResourceContract{
Domain: domain, Name: name, Path: resourcePath(domain, name), Mode: mode,
PageKind: pageKind, SearchFields: resourceSearchFields(name),
}
}
func resourcePath(domain, name string) string {