groups

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueryAddGroup       = "addGroup"
	AddGroupVarTemplate = `{{define "vars"}}"orgId":{{json .OrgID}},"name":{{json .Name}}{{end}}`
)
View Source
const (
	QueryGroupByName       = "groupByName"
	GroupByNameVarTemplate = `{{define "vars"}}"orgId":{{json .OrgID}},"name":{{json .Name}}{{end}}`
)
View Source
const (
	QueryGroupClusters       = "groupClusters"
	GroupClustersVarTemplate = `` /* 151-byte string literal not displayed */
)
View Source
const (
	QueryGroups       = "groups"
	GroupsVarTemplate = `{{define "vars"}}"orgId":{{json .OrgID}}{{end}}`
)
View Source
const (
	QueryRemoveGroup       = "removeGroup"
	RemoveGroupVarTemplate = `{{define "vars"}}"orgId":{{json .OrgID}},"uuid":{{json .UUID}}{{end}}`
)
View Source
const (
	QueryRemoveGroupByName       = "removeGroupByName"
	RemoveGroupByNameVarTemplate = `{{define "vars"}}"orgId":{{json .OrgID}},"name":{{json .Name}}{{end}}`
)
View Source
const (
	QueryUnGroupClusters       = "unGroupClusters"
	UnGroupClustersVarTemplate = `` /* 151-byte string literal not displayed */
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AddGroupResponse

type AddGroupResponse struct {
	Data *AddGroupResponseData `json:"data,omitempty"`
}

AddGroupResponse is the response body we get upon a successful cluster registration.

type AddGroupResponseData

type AddGroupResponseData struct {
	Details *AddGroupResponseDataDetails `json:"addGroup,omitempty"`
}

type AddGroupResponseDataDetails

type AddGroupResponseDataDetails struct {
	UUID string `json:"uuid,omitempty"`
}

type AddGroupVariables

type AddGroupVariables struct {
	actions.GraphQLQuery
	OrgID string
	Name  string
}

AddGroupVariables are the variables specific to adding a group. These include the organization ID and the group name. Rather than instantiating this directly, use NewAddGroupVariables().

func NewAddGroupVariables

func NewAddGroupVariables(orgID, name string) AddGroupVariables

NewAddGroupVariables creates a correctly formed instance of AddGroupVariables.

type Client

type Client struct {
	web.SatConClient
}

Client is an implementation of a satcon client.

func (*Client) AddGroup

func (c *Client) AddGroup(orgID, name string) (*AddGroupResponseDataDetails, error)

func (*Client) GroupByName

func (c *Client) GroupByName(orgID string, name string) (*types.Group, error)

func (*Client) GroupClusters

func (c *Client) GroupClusters(orgID, uuid string, clusters []string) (*GroupClustersResponseDataDetails, error)

func (*Client) Groups

func (c *Client) Groups(orgID string) (types.GroupList, error)

func (*Client) RemoveGroup

func (c *Client) RemoveGroup(orgID, uuid string) (*RemoveGroupResponseDataDetails, error)

func (*Client) RemoveGroupByName

func (c *Client) RemoveGroupByName(orgID, name string) (*RemoveGroupByNameResponseDataDetails, error)

func (*Client) UnGroupClusters added in v0.4.0

func (c *Client) UnGroupClusters(orgID, uuid string, clusters []string) (*UnGroupClustersResponseDataDetails, error)

type GroupByNameResponse

type GroupByNameResponse struct {
	Data *GroupByNameResponseData `json:"data,omitempty"`
}

type GroupByNameResponseData

type GroupByNameResponseData struct {
	Group *types.Group `json:"groupByName,omitempty"`
}

type GroupByNameVariables

type GroupByNameVariables struct {
	actions.GraphQLQuery
	OrgID string
	Name  string
}

func NewGroupByNameVariables

func NewGroupByNameVariables(orgID string, name string) GroupByNameVariables

type GroupClustersResponse

type GroupClustersResponse struct {
	Data *GroupClustersResponseData `json:"data,omitempty"`
}

GroupClustersResponse is the response body we get upon a successful cluster registration.

type GroupClustersResponseData

type GroupClustersResponseData struct {
	Details *GroupClustersResponseDataDetails `json:"groupClusters,omitempty"`
}

type GroupClustersResponseDataDetails

type GroupClustersResponseDataDetails struct {
	Modified int `json:"modified,omitempty"`
}

type GroupClustersVariables

type GroupClustersVariables struct {
	actions.GraphQLQuery
	OrgID    string
	UUID     string
	Clusters []string
}

GroupClustersVariables are the variables specific to grouping clusters. These include the organization ID, group UUID, and list of cluster IDs. Rather than instantiating this directly, use NewGroupClustersVariables().

func NewGroupClustersVariables

func NewGroupClustersVariables(orgID, uuid string, clusters []string) GroupClustersVariables

NewGroupClustersVariables creates a correctly formed instance of GroupClustersVariables.

type GroupService

type GroupService interface {
	Groups(orgID string) (types.GroupList, error)
	GroupByName(orgID string, name string) (*types.Group, error)
	AddGroup(orgID, name string) (*AddGroupResponseDataDetails, error)
	RemoveGroup(orgID, uuid string) (*RemoveGroupResponseDataDetails, error)
	RemoveGroupByName(orgID, name string) (*RemoveGroupByNameResponseDataDetails, error)
	GroupClusters(orgID, uuid string, clusters []string) (*GroupClustersResponseDataDetails, error)
	UnGroupClusters(orgID, uuid string, clusters []string) (*UnGroupClustersResponseDataDetails, error)
}

ClusterService is the interface used to perform all group-centric actions in Satellite Config.

func NewClient

func NewClient(endpointURL string, httpClient web.HTTPClient, authClient auth.AuthClient) (GroupService, error)

NewClient returns a configured instance of GroupService which can then be used to perform group queries against Satellite Config.

type GroupsResponse

type GroupsResponse struct {
	Data *GroupsResponseData `json:"data,omitempty"`
}

type GroupsResponseData

type GroupsResponseData struct {
	Groups types.GroupList `json:"groups,omitempty"`
}

type GroupsVariables

type GroupsVariables struct {
	actions.GraphQLQuery
	OrgID string
}

func NewGroupsVariables

func NewGroupsVariables(orgID string) GroupsVariables

type RemoveGroupByNameResponse

type RemoveGroupByNameResponse struct {
	Data *RemoveGroupByNameResponseData `json:"data,omitempty"`
}

type RemoveGroupByNameResponseData

type RemoveGroupByNameResponseData struct {
	Details *RemoveGroupByNameResponseDataDetails `json:"removeGroupByName,omitempty"`
}

type RemoveGroupByNameResponseDataDetails

type RemoveGroupByNameResponseDataDetails struct {
	UUID string `json:"uuid,omitempty"`
}

type RemoveGroupByNameVariables

type RemoveGroupByNameVariables struct {
	actions.GraphQLQuery
	OrgID string
	Name  string
}

RemoveGroupByNameVariables are the variables specific to removing a group by name. These include the organization ID and the group name. Rather than instantiating this directly, use NewRemoveGroupByNameVariables().

func NewRemoveGroupByNameVariables

func NewRemoveGroupByNameVariables(orgID, name string) RemoveGroupByNameVariables

NewRemoveGroupByNameVariables creates a correctly formed instance of RemoveGroupByNameVariables.

type RemoveGroupResponse

type RemoveGroupResponse struct {
	Data *RemoveGroupResponseData `json:"data,omitempty"`
}

type RemoveGroupResponseData

type RemoveGroupResponseData struct {
	Details *RemoveGroupResponseDataDetails `json:"removeGroup,omitempty"`
}

type RemoveGroupResponseDataDetails

type RemoveGroupResponseDataDetails struct {
	UUID string `json:"uuid,omitempty"`
}

type RemoveGroupVariables

type RemoveGroupVariables struct {
	actions.GraphQLQuery
	OrgID string
	UUID  string
}

RemoveGroupVariables are the variables specific to removing a group by name. These include the organization ID and the group name. Rather than instantiating this directly, use NewRemoveGroupVariables().

func NewRemoveGroupVariables

func NewRemoveGroupVariables(orgID, uuid string) RemoveGroupVariables

NewRemoveGroupVariables creates a correctly formed instance of RemoveGroupVariables.

type UnGroupClustersResponse added in v0.4.0

type UnGroupClustersResponse struct {
	Data *UnGroupClustersResponseData `json:"data,omitempty"`
}

UnGroupClustersResponse is the response body we get upon a successful cluster registration.

type UnGroupClustersResponseData added in v0.4.0

type UnGroupClustersResponseData struct {
	Details *UnGroupClustersResponseDataDetails `json:"unGroupClusters,omitempty"`
}

type UnGroupClustersResponseDataDetails added in v0.4.0

type UnGroupClustersResponseDataDetails struct {
	Modified int `json:"modified,omitempty"`
}

type UnGroupClustersVariables added in v0.4.0

type UnGroupClustersVariables struct {
	actions.GraphQLQuery
	OrgID    string
	UUID     string
	Clusters []string
}

UnGroupClustersVariables are the variables specific to grouping clusters. These include the organization ID, group UUID, and list of cluster IDs. Rather than instantiating this directly, use NewGroupClustersVariables().

func NewUnGroupClustersVariables added in v0.4.0

func NewUnGroupClustersVariables(orgID, uuid string, clusters []string) UnGroupClustersVariables

NewUnGroupClustersVariables creates a correctly formed instance of GroupClustersVariables.

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL