功能:按资源配置平台列表搜索
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user