Files
tui/queries/generated.go
T

699 lines
22 KiB
Go

// Code generated by github.com/Khan/genqlient, DO NOT EDIT.
package queries
import (
"context"
"github.com/Khan/genqlient/graphql"
)
// CreateCloneCredentialCreateCloneCredential includes the requested fields of the GraphQL type CloneCredential.
// The GraphQL type's documentation follows.
//
// A credential for authenticating with the pipeline source host.
type CreateCloneCredentialCreateCloneCredential struct {
// The credential type.
Type string `json:"type"`
// The username to user with the credential.
Username string `json:"username"`
// The secret for the credential.
Secret string `json:"secret"`
// The name of the credential.
Name string `json:"name"`
}
// GetType returns CreateCloneCredentialCreateCloneCredential.Type, and is useful for accessing the field via an interface.
func (v *CreateCloneCredentialCreateCloneCredential) GetType() string { return v.Type }
// GetUsername returns CreateCloneCredentialCreateCloneCredential.Username, and is useful for accessing the field via an interface.
func (v *CreateCloneCredentialCreateCloneCredential) GetUsername() string { return v.Username }
// GetSecret returns CreateCloneCredentialCreateCloneCredential.Secret, and is useful for accessing the field via an interface.
func (v *CreateCloneCredentialCreateCloneCredential) GetSecret() string { return v.Secret }
// GetName returns CreateCloneCredentialCreateCloneCredential.Name, and is useful for accessing the field via an interface.
func (v *CreateCloneCredentialCreateCloneCredential) GetName() string { return v.Name }
// CreateCloneCredentialResponse is returned by CreateCloneCredential on success.
type CreateCloneCredentialResponse struct {
// Create a new CloneCredential
CreateCloneCredential *CreateCloneCredentialCreateCloneCredential `json:"createCloneCredential"`
}
// GetCreateCloneCredential returns CreateCloneCredentialResponse.CreateCloneCredential, and is useful for accessing the field via an interface.
func (v *CreateCloneCredentialResponse) GetCreateCloneCredential() *CreateCloneCredentialCreateCloneCredential {
return v.CreateCloneCredential
}
// CreatePipelineCreatePipeline includes the requested fields of the GraphQL type Pipeline.
// The GraphQL type's documentation follows.
//
// A pipeline for running ci jobs
type CreatePipelineCreatePipeline struct {
// The id of the pipeline.
Id string `json:"id"`
// The name of the pipeline.
Name string `json:"name"`
// The url of the pipeline.
Url string `json:"url"`
// The polling interval for the pipeline.
PollInterval int `json:"pollInterval"`
// The configured credential for cloning the pipeline source.
CloneCredential *CreatePipelineCreatePipelineCloneCredential `json:"cloneCredential"`
}
// GetId returns CreatePipelineCreatePipeline.Id, and is useful for accessing the field via an interface.
func (v *CreatePipelineCreatePipeline) GetId() string { return v.Id }
// GetName returns CreatePipelineCreatePipeline.Name, and is useful for accessing the field via an interface.
func (v *CreatePipelineCreatePipeline) GetName() string { return v.Name }
// GetUrl returns CreatePipelineCreatePipeline.Url, and is useful for accessing the field via an interface.
func (v *CreatePipelineCreatePipeline) GetUrl() string { return v.Url }
// GetPollInterval returns CreatePipelineCreatePipeline.PollInterval, and is useful for accessing the field via an interface.
func (v *CreatePipelineCreatePipeline) GetPollInterval() int { return v.PollInterval }
// GetCloneCredential returns CreatePipelineCreatePipeline.CloneCredential, and is useful for accessing the field via an interface.
func (v *CreatePipelineCreatePipeline) GetCloneCredential() *CreatePipelineCreatePipelineCloneCredential {
return v.CloneCredential
}
// CreatePipelineCreatePipelineCloneCredential includes the requested fields of the GraphQL type CloneCredential.
// The GraphQL type's documentation follows.
//
// A credential for authenticating with the pipeline source host.
type CreatePipelineCreatePipelineCloneCredential struct {
// The id of the credential.
Id string `json:"id"`
// The name of the credential.
Name string `json:"name"`
// The credential type.
Type string `json:"type"`
}
// GetId returns CreatePipelineCreatePipelineCloneCredential.Id, and is useful for accessing the field via an interface.
func (v *CreatePipelineCreatePipelineCloneCredential) GetId() string { return v.Id }
// GetName returns CreatePipelineCreatePipelineCloneCredential.Name, and is useful for accessing the field via an interface.
func (v *CreatePipelineCreatePipelineCloneCredential) GetName() string { return v.Name }
// GetType returns CreatePipelineCreatePipelineCloneCredential.Type, and is useful for accessing the field via an interface.
func (v *CreatePipelineCreatePipelineCloneCredential) GetType() string { return v.Type }
// CreatePipelineResponse is returned by CreatePipeline on success.
type CreatePipelineResponse struct {
// Create a new pipeline
CreatePipeline *CreatePipelineCreatePipeline `json:"createPipeline"`
}
// GetCreatePipeline returns CreatePipelineResponse.CreatePipeline, and is useful for accessing the field via an interface.
func (v *CreatePipelineResponse) GetCreatePipeline() *CreatePipelineCreatePipeline {
return v.CreatePipeline
}
// CreateRunnerCreateRunner includes the requested fields of the GraphQL type Runner.
// The GraphQL type's documentation follows.
//
// A runner available for use inside of a pipeline.
type CreateRunnerCreateRunner struct {
// The id of the runner.
Id string `json:"id"`
// The name of the runner.
Name string `json:"name"`
// The token.
Token string `json:"token"`
}
// GetId returns CreateRunnerCreateRunner.Id, and is useful for accessing the field via an interface.
func (v *CreateRunnerCreateRunner) GetId() string { return v.Id }
// GetName returns CreateRunnerCreateRunner.Name, and is useful for accessing the field via an interface.
func (v *CreateRunnerCreateRunner) GetName() string { return v.Name }
// GetToken returns CreateRunnerCreateRunner.Token, and is useful for accessing the field via an interface.
func (v *CreateRunnerCreateRunner) GetToken() string { return v.Token }
// CreateRunnerResponse is returned by CreateRunner on success.
type CreateRunnerResponse struct {
// Create a new runner
CreateRunner *CreateRunnerCreateRunner `json:"createRunner"`
}
// GetCreateRunner returns CreateRunnerResponse.CreateRunner, and is useful for accessing the field via an interface.
func (v *CreateRunnerResponse) GetCreateRunner() *CreateRunnerCreateRunner { return v.CreateRunner }
// CreateSecretCreateSecret includes the requested fields of the GraphQL type Secret.
// The GraphQL type's documentation follows.
//
// A secret available for use inside of a pipeline.
type CreateSecretCreateSecret struct {
// The id of the secret.
Id string `json:"id"`
// The name of the secret.
Name string `json:"name"`
// The secret.
Secret string `json:"secret"`
}
// GetId returns CreateSecretCreateSecret.Id, and is useful for accessing the field via an interface.
func (v *CreateSecretCreateSecret) GetId() string { return v.Id }
// GetName returns CreateSecretCreateSecret.Name, and is useful for accessing the field via an interface.
func (v *CreateSecretCreateSecret) GetName() string { return v.Name }
// GetSecret returns CreateSecretCreateSecret.Secret, and is useful for accessing the field via an interface.
func (v *CreateSecretCreateSecret) GetSecret() string { return v.Secret }
// CreateSecretResponse is returned by CreateSecret on success.
type CreateSecretResponse struct {
// Create a new secret
CreateSecret *CreateSecretCreateSecret `json:"createSecret"`
}
// GetCreateSecret returns CreateSecretResponse.CreateSecret, and is useful for accessing the field via an interface.
func (v *CreateSecretResponse) GetCreateSecret() *CreateSecretCreateSecret { return v.CreateSecret }
// CreateWebhookCreateWebhook includes the requested fields of the GraphQL type Webhook.
// The GraphQL type's documentation follows.
//
// A webhook for triggering pipelines
type CreateWebhookCreateWebhook struct {
// The id of the webhook.
Id string `json:"id"`
// The secret used to validate the webhook.
Secret string `json:"secret"`
// The format of the webhook.
ServerType string `json:"serverType"`
}
// GetId returns CreateWebhookCreateWebhook.Id, and is useful for accessing the field via an interface.
func (v *CreateWebhookCreateWebhook) GetId() string { return v.Id }
// GetSecret returns CreateWebhookCreateWebhook.Secret, and is useful for accessing the field via an interface.
func (v *CreateWebhookCreateWebhook) GetSecret() string { return v.Secret }
// GetServerType returns CreateWebhookCreateWebhook.ServerType, and is useful for accessing the field via an interface.
func (v *CreateWebhookCreateWebhook) GetServerType() string { return v.ServerType }
// CreateWebhookResponse is returned by CreateWebhook on success.
type CreateWebhookResponse struct {
// Create a new webhook
CreateWebhook *CreateWebhookCreateWebhook `json:"createWebhook"`
}
// GetCreateWebhook returns CreateWebhookResponse.CreateWebhook, and is useful for accessing the field via an interface.
func (v *CreateWebhookResponse) GetCreateWebhook() *CreateWebhookCreateWebhook {
return v.CreateWebhook
}
// GetCloneCredentialsCloneCredentialsCloneCredential includes the requested fields of the GraphQL type CloneCredential.
// The GraphQL type's documentation follows.
//
// A credential for authenticating with the pipeline source host.
type GetCloneCredentialsCloneCredentialsCloneCredential struct {
// The id of the credential.
Id string `json:"id"`
// The name of the credential.
Name string `json:"name"`
// The credential type.
Type string `json:"type"`
}
// GetId returns GetCloneCredentialsCloneCredentialsCloneCredential.Id, and is useful for accessing the field via an interface.
func (v *GetCloneCredentialsCloneCredentialsCloneCredential) GetId() string { return v.Id }
// GetName returns GetCloneCredentialsCloneCredentialsCloneCredential.Name, and is useful for accessing the field via an interface.
func (v *GetCloneCredentialsCloneCredentialsCloneCredential) GetName() string { return v.Name }
// GetType returns GetCloneCredentialsCloneCredentialsCloneCredential.Type, and is useful for accessing the field via an interface.
func (v *GetCloneCredentialsCloneCredentialsCloneCredential) GetType() string { return v.Type }
// GetCloneCredentialsResponse is returned by GetCloneCredentials on success.
type GetCloneCredentialsResponse struct {
CloneCredentials []*GetCloneCredentialsCloneCredentialsCloneCredential `json:"CloneCredentials"`
}
// GetCloneCredentials returns GetCloneCredentialsResponse.CloneCredentials, and is useful for accessing the field via an interface.
func (v *GetCloneCredentialsResponse) GetCloneCredentials() []*GetCloneCredentialsCloneCredentialsCloneCredential {
return v.CloneCredentials
}
// GetPipelinesPipelinesPipeline includes the requested fields of the GraphQL type Pipeline.
// The GraphQL type's documentation follows.
//
// A pipeline for running ci jobs
type GetPipelinesPipelinesPipeline struct {
// The id of the pipeline.
Id string `json:"id"`
// The name of the pipeline.
Name string `json:"name"`
}
// GetId returns GetPipelinesPipelinesPipeline.Id, and is useful for accessing the field via an interface.
func (v *GetPipelinesPipelinesPipeline) GetId() string { return v.Id }
// GetName returns GetPipelinesPipelinesPipeline.Name, and is useful for accessing the field via an interface.
func (v *GetPipelinesPipelinesPipeline) GetName() string { return v.Name }
// GetPipelinesResponse is returned by GetPipelines on success.
type GetPipelinesResponse struct {
Pipelines []*GetPipelinesPipelinesPipeline `json:"Pipelines"`
}
// GetPipelines returns GetPipelinesResponse.Pipelines, and is useful for accessing the field via an interface.
func (v *GetPipelinesResponse) GetPipelines() []*GetPipelinesPipelinesPipeline { return v.Pipelines }
// GetRunnersResponse is returned by GetRunners on success.
type GetRunnersResponse struct {
Runners []*GetRunnersRunnersRunner `json:"Runners"`
}
// GetRunners returns GetRunnersResponse.Runners, and is useful for accessing the field via an interface.
func (v *GetRunnersResponse) GetRunners() []*GetRunnersRunnersRunner { return v.Runners }
// GetRunnersRunnersRunner includes the requested fields of the GraphQL type Runner.
// The GraphQL type's documentation follows.
//
// A runner available for use inside of a pipeline.
type GetRunnersRunnersRunner struct {
// The id of the runner.
Id string `json:"id"`
// The name of the runner.
Name string `json:"name"`
}
// GetId returns GetRunnersRunnersRunner.Id, and is useful for accessing the field via an interface.
func (v *GetRunnersRunnersRunner) GetId() string { return v.Id }
// GetName returns GetRunnersRunnersRunner.Name, and is useful for accessing the field via an interface.
func (v *GetRunnersRunnersRunner) GetName() string { return v.Name }
// GetSecretsResponse is returned by GetSecrets on success.
type GetSecretsResponse struct {
Secrets []*GetSecretsSecretsSecret `json:"Secrets"`
}
// GetSecrets returns GetSecretsResponse.Secrets, and is useful for accessing the field via an interface.
func (v *GetSecretsResponse) GetSecrets() []*GetSecretsSecretsSecret { return v.Secrets }
// GetSecretsSecretsSecret includes the requested fields of the GraphQL type Secret.
// The GraphQL type's documentation follows.
//
// A secret available for use inside of a pipeline.
type GetSecretsSecretsSecret struct {
// The id of the secret.
Id string `json:"id"`
// The name of the secret.
Name string `json:"name"`
}
// GetId returns GetSecretsSecretsSecret.Id, and is useful for accessing the field via an interface.
func (v *GetSecretsSecretsSecret) GetId() string { return v.Id }
// GetName returns GetSecretsSecretsSecret.Name, and is useful for accessing the field via an interface.
func (v *GetSecretsSecretsSecret) GetName() string { return v.Name }
// __CreateCloneCredentialInput is used internally by genqlient
type __CreateCloneCredentialInput struct {
CredentialType string `json:"credentialType"`
Username string `json:"username"`
Secret string `json:"secret"`
Name string `json:"name"`
}
// GetCredentialType returns __CreateCloneCredentialInput.CredentialType, and is useful for accessing the field via an interface.
func (v *__CreateCloneCredentialInput) GetCredentialType() string { return v.CredentialType }
// GetUsername returns __CreateCloneCredentialInput.Username, and is useful for accessing the field via an interface.
func (v *__CreateCloneCredentialInput) GetUsername() string { return v.Username }
// GetSecret returns __CreateCloneCredentialInput.Secret, and is useful for accessing the field via an interface.
func (v *__CreateCloneCredentialInput) GetSecret() string { return v.Secret }
// GetName returns __CreateCloneCredentialInput.Name, and is useful for accessing the field via an interface.
func (v *__CreateCloneCredentialInput) GetName() string { return v.Name }
// __CreatePipelineInput is used internally by genqlient
type __CreatePipelineInput struct {
Name string `json:"name"`
Url string `json:"url"`
PollInterval *int `json:"pollInterval"`
CloneCredentialId *string `json:"cloneCredentialId"`
}
// GetName returns __CreatePipelineInput.Name, and is useful for accessing the field via an interface.
func (v *__CreatePipelineInput) GetName() string { return v.Name }
// GetUrl returns __CreatePipelineInput.Url, and is useful for accessing the field via an interface.
func (v *__CreatePipelineInput) GetUrl() string { return v.Url }
// GetPollInterval returns __CreatePipelineInput.PollInterval, and is useful for accessing the field via an interface.
func (v *__CreatePipelineInput) GetPollInterval() *int { return v.PollInterval }
// GetCloneCredentialId returns __CreatePipelineInput.CloneCredentialId, and is useful for accessing the field via an interface.
func (v *__CreatePipelineInput) GetCloneCredentialId() *string { return v.CloneCredentialId }
// __CreateRunnerInput is used internally by genqlient
type __CreateRunnerInput struct {
Name string `json:"name"`
}
// GetName returns __CreateRunnerInput.Name, and is useful for accessing the field via an interface.
func (v *__CreateRunnerInput) GetName() string { return v.Name }
// __CreateSecretInput is used internally by genqlient
type __CreateSecretInput struct {
Name string `json:"name"`
Secret string `json:"secret"`
}
// GetName returns __CreateSecretInput.Name, and is useful for accessing the field via an interface.
func (v *__CreateSecretInput) GetName() string { return v.Name }
// GetSecret returns __CreateSecretInput.Secret, and is useful for accessing the field via an interface.
func (v *__CreateSecretInput) GetSecret() string { return v.Secret }
// __CreateWebhookInput is used internally by genqlient
type __CreateWebhookInput struct {
WebhookType string `json:"webhookType"`
PipelineId string `json:"pipelineId"`
}
// GetWebhookType returns __CreateWebhookInput.WebhookType, and is useful for accessing the field via an interface.
func (v *__CreateWebhookInput) GetWebhookType() string { return v.WebhookType }
// GetPipelineId returns __CreateWebhookInput.PipelineId, and is useful for accessing the field via an interface.
func (v *__CreateWebhookInput) GetPipelineId() string { return v.PipelineId }
func CreateCloneCredential(
ctx context.Context,
client graphql.Client,
credentialType string,
username string,
secret string,
name string,
) (*CreateCloneCredentialResponse, error) {
req := &graphql.Request{
OpName: "CreateCloneCredential",
Query: `
mutation CreateCloneCredential ($credentialType: String!, $username: String!, $secret: String!, $name: String!) {
createCloneCredential(type: $credentialType, username: $username, secret: $secret, name: $name) {
type
username
secret
name
}
}
`,
Variables: &__CreateCloneCredentialInput{
CredentialType: credentialType,
Username: username,
Secret: secret,
Name: name,
},
}
var err error
var data CreateCloneCredentialResponse
resp := &graphql.Response{Data: &data}
err = client.MakeRequest(
ctx,
req,
resp,
)
return &data, err
}
func CreatePipeline(
ctx context.Context,
client graphql.Client,
name string,
url string,
pollInterval *int,
cloneCredentialId *string,
) (*CreatePipelineResponse, error) {
req := &graphql.Request{
OpName: "CreatePipeline",
Query: `
mutation CreatePipeline ($name: String!, $url: String!, $pollInterval: Int, $cloneCredentialId: String) {
createPipeline(name: $name, url: $url, pollInterval: $pollInterval, cloneCredentialId: $cloneCredentialId) {
id
name
url
pollInterval
cloneCredential {
id
name
type
}
}
}
`,
Variables: &__CreatePipelineInput{
Name: name,
Url: url,
PollInterval: pollInterval,
CloneCredentialId: cloneCredentialId,
},
}
var err error
var data CreatePipelineResponse
resp := &graphql.Response{Data: &data}
err = client.MakeRequest(
ctx,
req,
resp,
)
return &data, err
}
func CreateRunner(
ctx context.Context,
client graphql.Client,
name string,
) (*CreateRunnerResponse, error) {
req := &graphql.Request{
OpName: "CreateRunner",
Query: `
mutation CreateRunner ($name: String!) {
createRunner(name: $name) {
id
name
token
}
}
`,
Variables: &__CreateRunnerInput{
Name: name,
},
}
var err error
var data CreateRunnerResponse
resp := &graphql.Response{Data: &data}
err = client.MakeRequest(
ctx,
req,
resp,
)
return &data, err
}
func CreateSecret(
ctx context.Context,
client graphql.Client,
name string,
secret string,
) (*CreateSecretResponse, error) {
req := &graphql.Request{
OpName: "CreateSecret",
Query: `
mutation CreateSecret ($name: String!, $secret: String!) {
createSecret(name: $name, secret: $secret) {
id
name
secret
}
}
`,
Variables: &__CreateSecretInput{
Name: name,
Secret: secret,
},
}
var err error
var data CreateSecretResponse
resp := &graphql.Response{Data: &data}
err = client.MakeRequest(
ctx,
req,
resp,
)
return &data, err
}
func CreateWebhook(
ctx context.Context,
client graphql.Client,
webhookType string,
pipelineId string,
) (*CreateWebhookResponse, error) {
req := &graphql.Request{
OpName: "CreateWebhook",
Query: `
mutation CreateWebhook ($webhookType: String!, $pipelineId: String!) {
createWebhook(type: $webhookType, pipelineId: $pipelineId) {
id
secret
serverType
}
}
`,
Variables: &__CreateWebhookInput{
WebhookType: webhookType,
PipelineId: pipelineId,
},
}
var err error
var data CreateWebhookResponse
resp := &graphql.Response{Data: &data}
err = client.MakeRequest(
ctx,
req,
resp,
)
return &data, err
}
func GetCloneCredentials(
ctx context.Context,
client graphql.Client,
) (*GetCloneCredentialsResponse, error) {
req := &graphql.Request{
OpName: "GetCloneCredentials",
Query: `
query GetCloneCredentials {
CloneCredentials {
id
name
type
}
}
`,
}
var err error
var data GetCloneCredentialsResponse
resp := &graphql.Response{Data: &data}
err = client.MakeRequest(
ctx,
req,
resp,
)
return &data, err
}
func GetPipelines(
ctx context.Context,
client graphql.Client,
) (*GetPipelinesResponse, error) {
req := &graphql.Request{
OpName: "GetPipelines",
Query: `
query GetPipelines {
Pipelines {
id
name
}
}
`,
}
var err error
var data GetPipelinesResponse
resp := &graphql.Response{Data: &data}
err = client.MakeRequest(
ctx,
req,
resp,
)
return &data, err
}
func GetRunners(
ctx context.Context,
client graphql.Client,
) (*GetRunnersResponse, error) {
req := &graphql.Request{
OpName: "GetRunners",
Query: `
query GetRunners {
Runners {
id
name
}
}
`,
}
var err error
var data GetRunnersResponse
resp := &graphql.Response{Data: &data}
err = client.MakeRequest(
ctx,
req,
resp,
)
return &data, err
}
func GetSecrets(
ctx context.Context,
client graphql.Client,
) (*GetSecretsResponse, error) {
req := &graphql.Request{
OpName: "GetSecrets",
Query: `
query GetSecrets {
Secrets {
id
name
}
}
`,
}
var err error
var data GetSecretsResponse
resp := &graphql.Response{Data: &data}
err = client.MakeRequest(
ctx,
req,
resp,
)
return &data, err
}