mirror of
https://github.com/project-zot/zot.git
synced 2026-06-16 20:38:08 +08:00
feat(global-search): add filtering options by starred and bookmarked (#1336)
Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>
This commit is contained in:
@@ -1580,6 +1580,14 @@ input Filter {
|
||||
Only return images or repositories with at least one signature
|
||||
"""
|
||||
HasToBeSigned: Boolean
|
||||
"""
|
||||
Only returns images or repositories that are bookmarked or not bookmarked
|
||||
"""
|
||||
IsBookmarked: Boolean
|
||||
"""
|
||||
Only returns images or repositories that are starred or not starred
|
||||
"""
|
||||
IsStarred: Boolean
|
||||
}
|
||||
|
||||
"""
|
||||
@@ -8750,7 +8758,7 @@ func (ec *executionContext) unmarshalInputFilter(ctx context.Context, obj interf
|
||||
asMap[k] = v
|
||||
}
|
||||
|
||||
fieldsInOrder := [...]string{"Os", "Arch", "HasToBeSigned"}
|
||||
fieldsInOrder := [...]string{"Os", "Arch", "HasToBeSigned", "IsBookmarked", "IsStarred"}
|
||||
for _, k := range fieldsInOrder {
|
||||
v, ok := asMap[k]
|
||||
if !ok {
|
||||
@@ -8781,6 +8789,22 @@ func (ec *executionContext) unmarshalInputFilter(ctx context.Context, obj interf
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
case "IsBookmarked":
|
||||
var err error
|
||||
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("IsBookmarked"))
|
||||
it.IsBookmarked, err = ec.unmarshalOBoolean2ᚖbool(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
case "IsStarred":
|
||||
var err error
|
||||
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("IsStarred"))
|
||||
it.IsStarred, err = ec.unmarshalOBoolean2ᚖbool(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -55,6 +55,10 @@ type Filter struct {
|
||||
Arch []*string `json:"Arch,omitempty"`
|
||||
// Only return images or repositories with at least one signature
|
||||
HasToBeSigned *bool `json:"HasToBeSigned,omitempty"`
|
||||
// Only returns images or repositories that are bookmarked or not bookmarked
|
||||
IsBookmarked *bool `json:"IsBookmarked,omitempty"`
|
||||
// Only returns images or repositories that are starred or not starred
|
||||
IsStarred *bool `json:"IsStarred,omitempty"`
|
||||
}
|
||||
|
||||
// Search results, can contain images, repositories and layers
|
||||
|
||||
Reference in New Issue
Block a user