Documentation ¶
Index ¶
- func GetResourceDetails(ctx context.Context, clusterName string, lister client.ListResourcesClient, ...) (map[string]types.ResourceDetails, error)
- func GetResourceIDsByCluster(r types.AccessRequest) map[string][]types.ResourceID
- func GetResourcesByKind(ctx context.Context, clt client.ListResourcesClient, ...) ([]types.ResourceWithLabels, error)
- func GetResourcesByResourceIDs(ctx context.Context, lister client.ListResourcesClient, ...) ([]types.ResourceWithLabels, error)
- type ListResourcesRequestOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetResourceDetails ¶
func GetResourceDetails(ctx context.Context, clusterName string, lister client.ListResourcesClient, ids []types.ResourceID) (map[string]types.ResourceDetails, error)
GetResourceDetails gets extra details for a list of resources in a given cluster.
func GetResourceIDsByCluster ¶
func GetResourceIDsByCluster(r types.AccessRequest) map[string][]types.ResourceID
GetResourceIDsByCluster will return resource IDs grouped by cluster.
func GetResourcesByKind ¶
func GetResourcesByKind(ctx context.Context, clt client.ListResourcesClient, req proto.ListResourcesRequest, kind string) ([]types.ResourceWithLabels, error)
GetResourcesByKind is an alternative to client.GetResourcesWithFilters that searches with the resource kinds used in access requests instead of the resource types expected by ListResources.
The ResourceType field in the request should not be set by the caller, as it will be overridden.
func GetResourcesByResourceIDs ¶
func GetResourcesByResourceIDs(ctx context.Context, lister client.ListResourcesClient, resourceIDs []types.ResourceID, opts ...ListResourcesRequestOption) ([]types.ResourceWithLabels, error)
GetResourcesByResourceID gets a list of resources by their resource IDs.
Types ¶
type ListResourcesRequestOption ¶
type ListResourcesRequestOption func(*proto.ListResourcesRequest)
Click to show internal directories.
Click to hide internal directories.