gqlclient

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2021 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthenticatedTransport

type AuthenticatedTransport struct {
	T      http.RoundTripper
	ApiKey string
}

func (*AuthenticatedTransport) RoundTrip

func (transport *AuthenticatedTransport) RoundTrip(req *http.Request) (*http.Response, error)

type BranchMapping

type BranchMapping struct {
	EnvironmentSlug string `json:"environmentSlug"`
	Branch          string `json:"branch"`
}

type Client

type Client struct {
	Baseurl    string
	HTTPClient *http.Client
	GQLClient  *graphql.Client
	ApiKey     string
	OrgSlug    string
}

Client -

func NewClient

func NewClient(baseurl, apiKey *string) (*Client, error)

NewClient -

func (*Client) CreateCodeChangeSource

func (c *Client) CreateCodeChangeSource(input CreateCodeChangeSourceMutationInput) (*CodeChangeSource, error)

func (*Client) CreateEnvironment

func (c *Client) CreateEnvironment(input CreateEnvironmentMutationInput) (*Environment, error)

CreateEnvironment - Creates a environment

func (*Client) CreateErrorImpactSource

func (c *Client) CreateErrorImpactSource(input CreateErrorImpactSourceMutationInput) (*ErrorImpactSource, error)

CreateErrorImpactSource - Creates a environment

func (*Client) CreateMetricImpactSource

func (c *Client) CreateMetricImpactSource(input CreateMetricImpactSourceMutationInput) (*MetricImpactSource, error)

CreateMetricImpactSource - Creates a environment

func (*Client) CreateProject

func (c *Client) CreateProject(input CreateProjectMutationInput) (*Project, error)

CreateProject - Creates a project

func (*Client) DeleteChangeSource

func (c *Client) DeleteChangeSource(projectSlug *string, slug *string) error

DeleteChangeSource - Deletes a change source

func (*Client) DeleteEnvironment

func (c *Client) DeleteEnvironment(projectSlug *string, slug *string) error

DeleteEnvironment - Deletes a environment

func (*Client) DeleteImpactSource

func (c *Client) DeleteImpactSource(projectSlug *string, slug *string) error

DeleteImpactSource - Deletes a impact source

func (*Client) DeleteProject

func (c *Client) DeleteProject(slug *string) error

DeleteProject - Deletes a project

func (*Client) GetCodeChangeSource

func (c *Client) GetCodeChangeSource(projectSlug *string, slug *string) (*CodeChangeSource, error)

func (*Client) GetEnvironment

func (c *Client) GetEnvironment(projectSlug *string, slug *string) (*Environment, error)

GetEnvironment - Returns environment

func (*Client) GetEnvironmentByName

func (c *Client) GetEnvironmentByName(projectSlug *string, name *string) (*Environment, error)

func (*Client) GetErrorImpactSource

func (c *Client) GetErrorImpactSource(projectSlug *string, slug *string) (*ErrorImpactSource, error)

GetErrorImpactSource - Returns error impact source

func (*Client) GetMetricImpactSource

func (c *Client) GetMetricImpactSource(projectSlug *string, slug *string) (*MetricImpactSource, error)

GetMetricImpactSource - Returns error impact source

func (*Client) GetProject

func (c *Client) GetProject(slug *string) (*Project, error)

GetProject - Returns project

func (*Client) UpdateCodeChangeSource

func (c *Client) UpdateCodeChangeSource(input UpdateCodeChangeSourceMutationInput) (*CodeChangeSource, error)

func (*Client) UpdateEnvironment

func (c *Client) UpdateEnvironment(input UpdateEnvironmentMutationInput) (*Environment, error)

UpdateEnvironment - Updates a environment

func (*Client) UpdateErrorImpactSource

func (c *Client) UpdateErrorImpactSource(input UpdateErrorImpactSourceMutationInput) (*ErrorImpactSource, error)

UpdateErrorImpactSource - Updates a environment

func (*Client) UpdateMetricImpactSource

func (c *Client) UpdateMetricImpactSource(input UpdateMetricImpactSourceMutationInput) (*MetricImpactSource, error)

UpdateMetricImpactSource - Updates a environment

func (*Client) UpdateProject

func (c *Client) UpdateProject(slug *string, input UpdateProjectMutationInput) (*Project, error)

UpdateProject - Updates a project

type CodeChangeSource

type CodeChangeSource struct {
	Slug                string          `json:"slug"`
	Name                string          `json:"name"`
	Repository          Repository      `json:"repository"`
	DeployTrackingType  string          `json:"deployTrackingType"`
	CollectImpact       bool            `json:"collectImpact"`
	PathPrefix          string          `json:"pathPrefix"`
	NotifyInSlack       bool            `json:"notifyInSlack"`
	IncludeInDashboard  bool            `json:"includeInDashboard"`
	AutoTrackingDelay   int             `json:"autoTrackingDelay"`
	EnvironmentMappings []BranchMapping `json:"environmentMappings"`
}

type CreateCodeChangeSourceMutationInput

type CreateCodeChangeSourceMutationInput struct {
	ProjectSlug       string `json:"projectSlug"`
	InitializeChanges bool   `json:"initializeChanges"`
	*MutableCodeChangeSource
}

type CreateEnvironmentMutationInput

type CreateEnvironmentMutationInput struct {
	ProjectSlug string `json:"projectSlug"`
	*MutableEnvironment
}

type CreateErrorImpactSourceMutationInput

type CreateErrorImpactSourceMutationInput struct {
	ProjectSlug string `json:"projectSlug"`
	*MutableErrorImpactSource
}

type CreateMetricImpactSourceMutationInput

type CreateMetricImpactSourceMutationInput struct {
	ProjectSlug string `json:"projectSlug"`
	*MutableMetricImpactSource
}

type CreateProjectMutationInput

type CreateProjectMutationInput struct {
	*MutableProject
}

type DeleteChangeSourceMutationInput

type DeleteChangeSourceMutationInput struct {
	ProjectSlug string `json:"projectSlug"`
	Slug        string `json:"slug"`
}

type DeleteEnvironmentMutationInput

type DeleteEnvironmentMutationInput struct {
	ProjectSlug string `json:"projectSlug"`
	Slug        string `json:"slug"`
}

type DeleteImpactSourceMutationInput

type DeleteImpactSourceMutationInput struct {
	ProjectSlug string `json:"projectSlug"`
	Slug        string `json:"slug"`
}

type DeleteProjectMutationInput

type DeleteProjectMutationInput struct {
	Slug string `json:"slug"`
}

type Environment

type Environment struct {
	Slug        string `json:"slug"`
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
	Color       string `json:"color,omitempty"`
}

type ErrorImpactSource

type ErrorImpactSource struct {
	Slug                       string      `json:"slug"`
	Environment                Environment `json:"environment"`
	Name                       string      `json:"name"`
	Provider                   string      `json:"provider"`
	ErrorOrgKey                string      `json:"errorOrgKey"`
	ErrorProjectKey            string      `json:"errorProjectKey"`
	ErrorEnvironment           string      `json:"errorEnvironment"`
	ManuallySetHealthThreshold float64     `json:"manuallySetHealthThreshold,omitempty"`
}

type ErrorsType

type ErrorsType []struct {
	Field    string   `json:"field"`
	Messages []string `json:"messages"`
}

type MetricImpactSource

type MetricImpactSource struct {
	Slug                       string      `json:"slug"`
	Environment                Environment `json:"environment"`
	Name                       string      `json:"name"`
	Provider                   string      `json:"provider,omitempty"`
	Query                      string      `json:"query,omitempty"`
	LessIsBetter               bool        `json:"lessIsBetter,omitempty"`
	ManuallySetHealthThreshold float64     `json:"manuallySetHealthThreshold,omitempty"`
}

type MutableCodeChangeSource

type MutableCodeChangeSource struct {
	Name                string          `json:"name"`
	Repository          Repository      `json:"repository"`
	DeployTrackingType  string          `json:"deployTrackingType"`
	CollectImpact       bool            `json:"collectImpact"`
	PathPrefix          string          `json:"pathPrefix"`
	NotifyInSlack       bool            `json:"notifyInSlack"`
	IncludeInDashboard  bool            `json:"includeInDashboard"`
	AutoTrackingDelay   int             `json:"autoTrackingDelay"`
	EnvironmentMappings []BranchMapping `json:"environmentMappings"`
}

type MutableEnvironment

type MutableEnvironment struct {
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
	Color       string `json:"color,omitempty"`
}

type MutableErrorImpactSource

type MutableErrorImpactSource struct {
	EnvironmentSlug            string  `json:"environment"`
	Name                       string  `json:"name"`
	Provider                   string  `json:"provider"`
	ErrorOrgKey                string  `json:"errorOrgKey"`
	ErrorProjectKey            string  `json:"errorProjectKey"`
	ErrorEnvironment           string  `json:"errorEnvironment"`
	ManuallySetHealthThreshold float64 `json:"manuallySetHealthThreshold,omitempty"`
}

type MutableMetricImpactSource

type MutableMetricImpactSource struct {
	EnvironmentSlug            string  `json:"environment"`
	Name                       string  `json:"name"`
	Provider                   string  `json:"provider"`
	Query                      string  `json:"query,omitempty"`
	LessIsBetter               bool    `json:"lessIsBetter,omitempty"`
	ManuallySetHealthThreshold float64 `json:"manuallySetHealthThreshold,omitempty"`
}

type MutableProject

type MutableProject struct {
	Name                      string `json:"name"`
	Description               string `json:"description,omitempty"`
	IssueTrackerProvider      string `json:"issueTrackerProvider,omitempty"`
	BuildProvider             string `json:"buildProvider,omitempty"`
	ChangeFailureRateBoundary string `json:"changeFailureRateBoundary,omitempty"`
	ImpactSensitivity         string `json:"impactSensitivity,omitempty"`
	FailureSensitivity        int    `json:"failureSensitivity,omitempty"`
}

type Project

type Project struct {
	Slug                      string `json:"slug"`
	Name                      string `json:"name"`
	Description               string `json:"description,omitempty"`
	IssueTrackerProvider      string `json:"issueTrackerProvider,omitempty"`
	BuildProvider             string `json:"buildProvider,omitempty"`
	ChangeFailureRateBoundary string `json:"changeFailureRateBoundary,omitempty"`
	ImpactSensitivity         string `json:"impactSensitivity,omitempty"`
	FailureSensitivity        int    `json:"failureSensitivity,omitempty"`
}

Project -

type Repository

type Repository struct {
	Owner    string `json:"owner"`
	Name     string `json:"name"`
	Provider string `json:"provider"`
	Url      string `json:"url,omitempty"`
}

type UpdateCodeChangeSourceMutationInput

type UpdateCodeChangeSourceMutationInput struct {
	ProjectSlug string `json:"projectSlug"`
	Slug        string `json:"slug"`
	*MutableCodeChangeSource
}

type UpdateEnvironmentMutationInput

type UpdateEnvironmentMutationInput struct {
	ProjectSlug string `json:"projectSlug"`
	Slug        string `json:"slug"`
	*MutableEnvironment
}

type UpdateErrorImpactSourceMutationInput

type UpdateErrorImpactSourceMutationInput struct {
	ProjectSlug string `json:"projectSlug"`
	Slug        string `json:"slug"`
	*MutableErrorImpactSource
}

type UpdateMetricImpactSourceMutationInput

type UpdateMetricImpactSourceMutationInput struct {
	ProjectSlug string `json:"projectSlug"`
	Slug        string `json:"slug"`
	*MutableMetricImpactSource
}

type UpdateProjectMutationInput

type UpdateProjectMutationInput struct {
	Slug string `json:"slug"`
	*MutableProject
}

Jump to

Keyboard shortcuts

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