Documentation
¶
Index ¶
- type Client
- func (c *Client) CreateBasicDeploymentWithCloudSlack(t *testing.T, ...) (*gqlModel.Deployment, error)
- func (c *Client) DeleteDeployment(t *testing.T, id graphql.ID) error
- func (c *Client) MustCreateAlias(t *testing.T, name, displayName, command, deploymentId string) gqlModel.Alias
- func (c *Client) MustCreateBasicDeploymentWithCloudSlack(t *testing.T, ...) *gqlModel.Deployment
- func (c *Client) MustDeleteDeployment(t *testing.T, id graphql.ID)
- type Organization
- type OrganizationConnectedPlatforms
- type Organizations
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
*graphql.Client
}
Client provides helper functions for queries and mutations that across different test cases. It simplifies setting up a given test prerequisites that are not a part of the test itself.
func NewClientForAPIKey ¶
NewClientForAPIKey returns new GraphQL client with API Key header.
func (*Client) CreateBasicDeploymentWithCloudSlack ¶
func (c *Client) CreateBasicDeploymentWithCloudSlack(t *testing.T, clusterName, slackTeamID, firstChannel, secondChannel, thirdChannel string) (*gqlModel.Deployment, error)
CreateBasicDeploymentWithCloudSlack create deployment with Slack platform and three plugins.
func (*Client) DeleteDeployment ¶
DeleteDeployment deletes a given deployment scoped to a given user.
func (*Client) MustCreateAlias ¶
func (c *Client) MustCreateAlias(t *testing.T, name, displayName, command, deploymentId string) gqlModel.Alias
MustCreateAlias creates alias.
func (*Client) MustCreateBasicDeploymentWithCloudSlack ¶
func (c *Client) MustCreateBasicDeploymentWithCloudSlack(t *testing.T, clusterName, slackTeamID, firstChannel, secondChannel, thirdChannel string) *gqlModel.Deployment
MustCreateBasicDeploymentWithCloudSlack is like CreateBasicDeploymentWithCloudSlack but fails on error.
func (*Client) MustDeleteDeployment ¶
MustDeleteDeployment is like DeleteDeployment but panics on error.
type Organization ¶
type Organization struct { ID string `json:"id"` DisplayName string `json:"displayName"` Subscription *gqlModel.OrganizationSubscription `json:"subscription"` ConnectedPlatforms *OrganizationConnectedPlatforms `json:"connectedPlatforms"` OwnerID string `json:"ownerId"` Owner *gqlModel.User `json:"owner"` Members []*gqlModel.User `json:"members"` Quota *gqlModel.Quota `json:"quota"` BillingHistoryAvailable bool `json:"billingHistoryAvailable"` UpdateOperations *gqlModel.OrganizationUpdateOperations `json:"updateOperations"` Usage *gqlModel.Usage `json:"usage"` }
Organization is a custom model that allow us to skip the 'connectedPlatforms.slack' field. Otherwise, we get such error:
Field "slack" argument "id" of type "ID!" is required, but it was not provided.
func (Organization) ToModel ¶
func (o Organization) ToModel() gqlModel.Organization
ToModel returns official gql model.
type OrganizationConnectedPlatforms ¶
type OrganizationConnectedPlatforms struct {
Slacks []*gqlModel.SlackWorkspace `json:"slacks"`
}
OrganizationConnectedPlatforms skips the 'slack' field.
type Organizations ¶
type Organizations []Organization
Organizations holds organization collection.
func (Organizations) ToModel ¶
func (o Organizations) ToModel() []gqlModel.Organization
ToModel returns official gql model.