1
0
mirror of https://github.com/rancher/types.git synced 2025-09-24 19:39:13 +00:00

Generated changes

This commit is contained in:
Dan Ramich
2019-10-23 09:59:43 -07:00
committed by Alena Prokharchyk
parent 2deb66b6fb
commit 1563e7864c
5 changed files with 61 additions and 24 deletions

View File

@@ -70,9 +70,9 @@ type CatalogOperations interface {
ByID(id string) (*Catalog, error)
Delete(container *Catalog) error
ActionRefresh(resource *Catalog) error
ActionRefresh(resource *Catalog) (*CatalogRefresh, error)
CollectionActionRefresh(resource *CatalogCollection) error
CollectionActionRefresh(resource *CatalogCollection) (*CatalogRefresh, error)
}
func newCatalogClient(apiClient *Client) *CatalogClient {
@@ -126,12 +126,14 @@ func (c *CatalogClient) Delete(container *Catalog) error {
return c.apiClient.Ops.DoResourceDelete(CatalogType, &container.Resource)
}
func (c *CatalogClient) ActionRefresh(resource *Catalog) error {
err := c.apiClient.Ops.DoAction(CatalogType, "refresh", &resource.Resource, nil, nil)
return err
func (c *CatalogClient) ActionRefresh(resource *Catalog) (*CatalogRefresh, error) {
resp := &CatalogRefresh{}
err := c.apiClient.Ops.DoAction(CatalogType, "refresh", &resource.Resource, nil, resp)
return resp, err
}
func (c *CatalogClient) CollectionActionRefresh(resource *CatalogCollection) error {
err := c.apiClient.Ops.DoCollectionAction(CatalogType, "refresh", &resource.Collection, nil, nil)
return err
func (c *CatalogClient) CollectionActionRefresh(resource *CatalogCollection) (*CatalogRefresh, error) {
resp := &CatalogRefresh{}
err := c.apiClient.Ops.DoCollectionAction(CatalogType, "refresh", &resource.Collection, nil, resp)
return resp, err
}

View File

@@ -0,0 +1,10 @@
package client
const (
CatalogRefreshType = "catalogRefresh"
CatalogRefreshFieldCatalogs = "catalogs"
)
type CatalogRefresh struct {
Catalogs []string `json:"catalogs,omitempty" yaml:"catalogs,omitempty"`
}

View File

@@ -74,9 +74,9 @@ type ClusterCatalogOperations interface {
ByID(id string) (*ClusterCatalog, error)
Delete(container *ClusterCatalog) error
ActionRefresh(resource *ClusterCatalog) error
ActionRefresh(resource *ClusterCatalog) (*CatalogRefresh, error)
CollectionActionRefresh(resource *ClusterCatalogCollection) error
CollectionActionRefresh(resource *ClusterCatalogCollection) (*CatalogRefresh, error)
}
func newClusterCatalogClient(apiClient *Client) *ClusterCatalogClient {
@@ -130,12 +130,14 @@ func (c *ClusterCatalogClient) Delete(container *ClusterCatalog) error {
return c.apiClient.Ops.DoResourceDelete(ClusterCatalogType, &container.Resource)
}
func (c *ClusterCatalogClient) ActionRefresh(resource *ClusterCatalog) error {
err := c.apiClient.Ops.DoAction(ClusterCatalogType, "refresh", &resource.Resource, nil, nil)
return err
func (c *ClusterCatalogClient) ActionRefresh(resource *ClusterCatalog) (*CatalogRefresh, error) {
resp := &CatalogRefresh{}
err := c.apiClient.Ops.DoAction(ClusterCatalogType, "refresh", &resource.Resource, nil, resp)
return resp, err
}
func (c *ClusterCatalogClient) CollectionActionRefresh(resource *ClusterCatalogCollection) error {
err := c.apiClient.Ops.DoCollectionAction(ClusterCatalogType, "refresh", &resource.Collection, nil, nil)
return err
func (c *ClusterCatalogClient) CollectionActionRefresh(resource *ClusterCatalogCollection) (*CatalogRefresh, error) {
resp := &CatalogRefresh{}
err := c.apiClient.Ops.DoCollectionAction(ClusterCatalogType, "refresh", &resource.Collection, nil, resp)
return resp, err
}

View File

@@ -74,9 +74,9 @@ type ProjectCatalogOperations interface {
ByID(id string) (*ProjectCatalog, error)
Delete(container *ProjectCatalog) error
ActionRefresh(resource *ProjectCatalog) error
ActionRefresh(resource *ProjectCatalog) (*CatalogRefresh, error)
CollectionActionRefresh(resource *ProjectCatalogCollection) error
CollectionActionRefresh(resource *ProjectCatalogCollection) (*CatalogRefresh, error)
}
func newProjectCatalogClient(apiClient *Client) *ProjectCatalogClient {
@@ -130,12 +130,14 @@ func (c *ProjectCatalogClient) Delete(container *ProjectCatalog) error {
return c.apiClient.Ops.DoResourceDelete(ProjectCatalogType, &container.Resource)
}
func (c *ProjectCatalogClient) ActionRefresh(resource *ProjectCatalog) error {
err := c.apiClient.Ops.DoAction(ProjectCatalogType, "refresh", &resource.Resource, nil, nil)
return err
func (c *ProjectCatalogClient) ActionRefresh(resource *ProjectCatalog) (*CatalogRefresh, error) {
resp := &CatalogRefresh{}
err := c.apiClient.Ops.DoAction(ProjectCatalogType, "refresh", &resource.Resource, nil, resp)
return resp, err
}
func (c *ProjectCatalogClient) CollectionActionRefresh(resource *ProjectCatalogCollection) error {
err := c.apiClient.Ops.DoCollectionAction(ProjectCatalogType, "refresh", &resource.Collection, nil, nil)
return err
func (c *ProjectCatalogClient) CollectionActionRefresh(resource *ProjectCatalogCollection) (*CatalogRefresh, error) {
resp := &CatalogRefresh{}
err := c.apiClient.Ops.DoCollectionAction(ProjectCatalogType, "refresh", &resource.Collection, nil, resp)
return resp, err
}