Add aliases to the client cache daemon and make them searchable (#4418)
* Add aliases to the client cache daemon and make them searchable
This commit is contained in:
1 parent
2e55ae72ba
commit
a2ea1f8f90
16 files changed
+1359
-18
No files matched your search
@@ -11,6 +11,7 @@ import (
|
||||
"strconv"
|
||||
|
||||
"github.com/hashicorp/boundary/api"
|
||||
"github.com/hashicorp/boundary/api/aliases"
|
||||
"github.com/hashicorp/boundary/api/sessions"
|
||||
"github.com/hashicorp/boundary/api/targets"
|
||||
"github.com/hashicorp/boundary/internal/clientcache/internal/cache"
|
||||
@@ -22,6 +23,7 @@ import (
|
||||
|
||||
// SearchResult is the struct returned to search requests.
|
||||
type SearchResult struct {
|
||||
Aliases []*aliases.Alias `json:"aliases,omitempty"`
|
||||
Targets []*targets.Target `json:"targets,omitempty"`
|
||||
Sessions []*sessions.Session `json:"sessions,omitempty"`
|
||||
}
|
||||
@@ -147,6 +149,7 @@ func newSearchHandlerFunc(ctx context.Context, repo *cache.Repository, refreshSe
|
||||
// toApiResult converts a domain search result to an api search result
|
||||
func toApiResult(sr *cache.SearchResult) *SearchResult {
|
||||
return &SearchResult{
|
||||
Aliases: sr.Aliases,
|
||||
Targets: sr.Targets,
|
||||
Sessions: sr.Sessions,
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user