graphql

package
v0.2.42 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Client = NewClient()

Functions

func NewClient

func NewClient() *graphql.Client

func WithHeader added in v0.1.34

func WithHeader(rt http.RoundTripper) withHeader

Types

type Error

type Error interface {
	error
	Network() bool // Is the error a network error?
	Server() bool  // Is the server error?
}

type GraphqlError

type GraphqlError struct {
	Message   string `json:"message"`
	Locations []struct {
		Line   int `json:"line"`
		Column int `json:"column"`
	} `json:"locations"`
	Extensions struct {
		Code string `json:"code"`
	} `json:"extensions"`
}

type MutationCancelDeployment

type MutationCancelDeployment struct {
	CancelDeployment bool `graphql:"cancel(deploymentID:$deploymentID)""`
}

type MutationDeploy

type MutationDeploy struct {
	Deploy struct {
		ID           string `graphql:"id" json:"id"`
		TargetFQDN   string `graphql:"targetFQDN" json:"targetFQDN"`
		NetworkStage string `graphql:"networkStage" json:"networkStage"`
		PackerStage  string `graphql:"packerStage" json:"packerStage"`
		Status       string `graphql:"status" json:"status"`
		Project      struct {
			ID string `graphql:"id" json:"id"`
		} `graphql:"project" json:"project"`
	} `graphql:"deploy(input:{type:$type, projectName:$name, config:$config, channel:$channel, cn:$cn})"`
}

func Deploy added in v0.2.32

func Deploy(projectType, projectName, config, channel string, cn bool) (m MutationDeploy, err error)

type MutationDeployWithCheckRunID added in v0.2.32

type MutationDeployWithCheckRunID struct {
	Deploy struct {
		ID           string `graphql:"id" json:"id"`
		TargetFQDN   string `graphql:"targetFQDN" json:"targetFQDN"`
		NetworkStage string `graphql:"networkStage" json:"networkStage"`
		PackerStage  string `graphql:"packerStage" json:"packerStage"`
		Status       string `graphql:"status" json:"status"`
		Project      struct {
			ID string `graphql:"id" json:"id"`
		} `graphql:"project" json:"project"`
	} `graphql:"deploy(input:{type:$type, projectName:$name, config:$config, channel:$channel, cn:$cn, checkRunID:$checkRunID})"`
}

func DeployWithCheckRunID added in v0.2.32

func DeployWithCheckRunID(projectType, projectName, config, channel string, cn bool,
	checkRunID int64) (m MutationDeployWithCheckRunID, err error)
type MutationLink struct {
	Link bool `graphql:"link(projectID:$projectID,hostname:$hostname)"`
}
func Link(projectID string, hostname string) (m MutationLink, err error)

type MutationSetPreference

type MutationSetPreference struct {
	SetPreference bool `graphql:"setPreference(name: $name, value: $value)"`
}

func SetPreference

func SetPreference(name, value string) (m MutationSetPreference, err error)

type MutationStartDevelopment

type MutationStartDevelopment struct {
	StartDevelopment struct {
		RemotePort    int    `graphql:"remotePort" json:"remotePort,omitempty"`
		RemoteAddress string `graphql:"remoteAddress" json:"remoteAddress,omitempty"`
		Fqdn          string `graphql:"fqdn" json:"fqdn,omitempty"`
	} `graphql:"startDevelopment(projectID:$projectID)"`
}

func StartDevelopment added in v0.2.32

func StartDevelopment(projectID string) (m MutationStartDevelopment, err error)

type MutationStopDevelopment

type MutationStopDevelopment struct {
	StopDevelopment bool `graphql:"stopDevelopment(projectID:$projectID)"`
}

func StopDevelopment added in v0.2.32

func StopDevelopment(projectID string) (m MutationStopDevelopment, err error)
type MutationUnlink struct {
	Unlink bool `graphql:"unlink(projectID:$projectID,hostname:$hostname)"`
}
func Unlink(projectID string, hostname string) (m MutationUnlink, err error)

type QueryAllPreference

type QueryAllPreference struct {
	AllPreference struct {
		Channel string `graphql:"channel"`
	}
}

func GetAllPreference

func GetAllPreference() (q QueryAllPreference, err error)

type QueryBuildTemplate

type QueryBuildTemplate struct {
	BuildTemplate struct {
		ContainsStatic   bool     `graphql:"containsStatic"`
		ContainsDynamic  bool     `graphql:"containsDynamic"`
		RequireCompiling bool     `graphql:"requireCompiling"`
		LocalCompiling   bool     `graphql:"localCompiling"`
		CompileCommands  []string `graphql:"compileCommands"`
		DistDir          string   `graphql:"distDir"`
	} `graphql:"buildTemplate(type:$type)"`
}

type QueryCheckDeployCapability

type QueryCheckDeployCapability struct {
	CheckDeployCapability struct {
		HashID string `graphql:"hashID"`
		Exists bool   `graphql:"exists"`
	} `graphql:"checkDeployCapability(projectName:$projectName,cn:$cn)"`
}

type QueryDeployment

type QueryDeployment struct {
	Deployment struct {
		TargetFQDN   string `graphql:"targetFQDN"`
		NetworkStage string `graphql:"networkStage"`
		PackerStage  string `graphql:"packerStage"`
		Status       string `graphql:"status"`
		Done         bool   `graphql:"done"`
		ErrorLogs    string `graphql:"errorLogs"`
	} `graphql:"deployment(id:$id)"`
}

type QueryDeployments

type QueryDeployments struct {
	Deployments struct {
		Edges []struct {
			Node struct {
				ID string `graphql:"id"`
			} `graphql:"node"`
		} `graphql:"edges"`
	} `graphql:"deployments(first:$first,projectName:$projectName,orderBy:{direction:DESC,field:UPDATED_AT})"`
}

type QueryPreference

type QueryPreference struct {
	Preference string `graphql:"preference(name: $name)"`
}

func GetPreference added in v0.2.32

func GetPreference(name string) (q QueryPreference, err error)

type QueryProject

type QueryProject struct {
	Project struct {
		ID   string `graphql:"id"`
		Name string `graphql:"name"`
	} `graphql:"project(name:$projectName)"`
}

type QueryStsToken

type QueryStsToken struct {
	StsToken struct {
		Host            string `graphql:"host"`
		AccessKeyID     string `graphql:"accessKeyID"`
		AccessKeySecret string `graphql:"accessKeySecret"`
		SecurityToken   string `graphql:"securityToken"`
	} `graphql:"stsToken(type:$tokenType,projectName:$projectName,cn:$cn)"`
}

type QueryUser added in v0.2.32

type QueryUser struct {
	User struct {
		Channel string `graphql:"channel"`
	}
}

Jump to

Keyboard shortcuts

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