client

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package client implements the interfaces required by the parent lagoon package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client implements the lagoon package interfaces for the Lagoon GraphQL API.

func New

func New(endpoint, token, apiVersion string, cliVersion string, debug bool) *Client

New creates a new Client for the given endpoint.

func (*Client) AddBillingGroup

func (c *Client) AddBillingGroup(ctx context.Context,
	in *schema.AddBillingGroupInput, out *schema.BillingGroup) error

AddBillingGroup adds a Billing Group.

func (*Client) AddEnvVariable

func (c *Client) AddEnvVariable(ctx context.Context,
	in *schema.EnvVariableInput, out *schema.EnvKeyValue) error

AddEnvVariable adds an EnvVariable to an Environment or Project.

func (*Client) AddGroup

func (c *Client) AddGroup(
	ctx context.Context, in *schema.AddGroupInput, out *schema.Group) error

AddGroup adds a group.

func (*Client) AddGroupsToProject

func (c *Client) AddGroupsToProject(ctx context.Context,
	in *schema.ProjectGroupsInput, out *schema.Project) error

AddGroupsToProject adds Groups to a Project.

func (*Client) AddNotificationEmail

func (c *Client) AddNotificationEmail(ctx context.Context,
	in *schema.AddNotificationEmailInput,
	out *schema.NotificationEmail) error

AddNotificationEmail defines an Email notification.

func (*Client) AddNotificationMicrosoftTeams

func (c *Client) AddNotificationMicrosoftTeams(ctx context.Context,
	in *schema.AddNotificationMicrosoftTeamsInput,
	out *schema.NotificationMicrosoftTeams) error

AddNotificationMicrosoftTeams defines a MicrosoftTeams notification.

func (*Client) AddNotificationRocketChat

func (c *Client) AddNotificationRocketChat(ctx context.Context,
	in *schema.AddNotificationRocketChatInput,
	out *schema.NotificationRocketChat) error

AddNotificationRocketChat defines a RocketChat notification.

func (*Client) AddNotificationSlack

func (c *Client) AddNotificationSlack(ctx context.Context,
	in *schema.AddNotificationSlackInput, out *schema.NotificationSlack) error

AddNotificationSlack defines a Slack notification.

func (*Client) AddNotificationToProject

func (c *Client) AddNotificationToProject(ctx context.Context,
	in *schema.AddNotificationToProjectInput, out *schema.Project) error

AddNotificationToProject adds a Notification to a Project.

func (*Client) AddOrUpdateEnvironment

func (c *Client) AddOrUpdateEnvironment(ctx context.Context,
	in *schema.AddEnvironmentInput, out *schema.Environment) error

AddOrUpdateEnvironment adds or updates a Project Environment.

func (*Client) AddProject

func (c *Client) AddProject(
	ctx context.Context, in *schema.AddProjectInput, out *schema.Project) error

AddProject adds a project.

func (*Client) AddProjectToBillingGroup

func (c *Client) AddProjectToBillingGroup(ctx context.Context,
	in *schema.ProjectBillingGroupInput, out *schema.Project) error

AddProjectToBillingGroup adds a Project to a Billing Group.

func (*Client) AddSSHKey

func (c *Client) AddSSHKey(
	ctx context.Context, in *schema.AddSSHKeyInput, out *schema.SSHKey) error

AddSSHKey adds an SSH key to a user.

func (*Client) AddUser

func (c *Client) AddUser(
	ctx context.Context, in *schema.AddUserInput, out *schema.User) error

AddUser adds a user.

func (*Client) AddUserToGroup

func (c *Client) AddUserToGroup(
	ctx context.Context, in *schema.UserGroupRoleInput, out *schema.Group) error

AddUserToGroup adds a user to a group.

func (*Client) DeployEnvironmentBranch

func (c *Client) DeployEnvironmentBranch(ctx context.Context,
	in *schema.DeployEnvironmentBranchInput, out *schema.DeployEnvironmentBranch) error

DeployEnvironmentBranch deploys a branch.

func (*Client) DeployEnvironmentLatest

func (c *Client) DeployEnvironmentLatest(ctx context.Context,
	in *schema.DeployEnvironmentLatestInput, out *schema.DeployEnvironmentLatest) error

DeployEnvironmentLatest deploys a latest environment.

func (*Client) DeployEnvironmentPromote

func (c *Client) DeployEnvironmentPromote(ctx context.Context,
	in *schema.DeployEnvironmentPromoteInput, out *schema.DeployEnvironmentPromote) error

DeployEnvironmentPromote promotes one environment into a new environment.

func (*Client) DeployEnvironmentPullrequest

DeployEnvironmentPullrequest deploys a pullreguest.

func (*Client) EnvironmentByName

func (c *Client) EnvironmentByName(ctx context.Context, name string,
	projectID uint, environment *schema.Environment) error

EnvironmentByName queries the Lagoon API for an environment by its name and parent projectID, and unmarshals the response into environment.

func (*Client) GetTaskByID

func (c *Client) GetTaskByID(
	ctx context.Context, id int, task *schema.Task) error

GetTaskByID queries the Lagoon API for a task by its ID, and unmarshals the response.

func (*Client) LagoonAPIVersion

func (c *Client) LagoonAPIVersion(
	ctx context.Context, lagoonAPIVersion *schema.LagoonVersion) error

LagoonAPIVersion queries the Lagoon API for its version, and unmarshals the response.

func (*Client) LagoonSchema

func (c *Client) LagoonSchema(
	ctx context.Context, lagoonSchema *schema.LagoonSchema) error

LagoonSchema queries the Lagoon API for its schema, and unmarshals the response.

func (*Client) Me

func (c *Client) Me(
	ctx context.Context, user *schema.User) error

Me queries the Lagoon API for me, and unmarshals the response into project.

func (*Client) MinimalProjectByName added in v0.12.0

func (c *Client) MinimalProjectByName(
	ctx context.Context, name string, project *schema.Project) error

MinimalProjectByName queries the Lagoon API for a project by its name, and unmarshals the response into project.

func (*Client) ProjectByName

func (c *Client) ProjectByName(
	ctx context.Context, name string, project *schema.Project) error

ProjectByName queries the Lagoon API for a project by its name, and unmarshals the response into project.

func (*Client) ProjectByNameMetadata added in v0.12.0

func (c *Client) ProjectByNameMetadata(
	ctx context.Context, name string, project *schema.ProjectMetadata) error

ProjectByNameMetadata queries the Lagoon API for a project by its name, and unmarshals the response into project.

func (*Client) ProjectsByMetadata added in v0.12.0

func (c *Client) ProjectsByMetadata(
	ctx context.Context, key string, value string, projects *[]schema.ProjectMetadata) error

ProjectsByMetadata queries the Lagoon API for a project by its name, and unmarshals the response into project.

func (*Client) RemoveProjectMetadataByKey added in v0.12.0

func (c *Client) RemoveProjectMetadataByKey(
	ctx context.Context, id int, key string, projects *schema.ProjectMetadata) error

RemoveProjectMetadataByKey removes metadata from a project for given key.

func (*Client) RunActiveStandbySwitch

func (c *Client) RunActiveStandbySwitch(ctx context.Context,
	project string, out *schema.Task) error

RunActiveStandbySwitch deploys a branch.

func (*Client) UpdateProjectMetadata added in v0.12.0

func (c *Client) UpdateProjectMetadata(
	ctx context.Context, id int, key string, value string, projects *schema.ProjectMetadata) error

UpdateProjectMetadata updates a projects metadata.

Directories

Path Synopsis
Package lgraphql generated by go-bindata.// sources: _lgraphql/addBillingGroup.graphql _lgraphql/addEnvVariable.graphql _lgraphql/addGroup.graphql _lgraphql/addGroupsToProject.graphql _lgraphql/addNotificationEmail.graphql _lgraphql/addNotificationMicrosoftTeams.graphql _lgraphql/addNotificationRocketChat.graphql _lgraphql/addNotificationSlack.graphql _lgraphql/addNotificationToProject.graphql _lgraphql/addOrUpdateEnvironment.graphql _lgraphql/addProject.graphql _lgraphql/addProjectToBillingGroup.graphql _lgraphql/addSshKey.graphql _lgraphql/addUser.graphql _lgraphql/addUserToGroup.graphql _lgraphql/deployEnvironmentBranch.graphql _lgraphql/deployEnvironmentLatest.graphql _lgraphql/deployEnvironmentPromote.graphql _lgraphql/deployEnvironmentPullrequest.graphql _lgraphql/environmentByName.graphql _lgraphql/lagoonSchema.graphql _lgraphql/lagoonVersion.graphql _lgraphql/me.graphql _lgraphql/minimalProjectByName.graphql _lgraphql/projectByName.graphql _lgraphql/projectByNameMetadata.graphql _lgraphql/projectsByMetadata.graphql _lgraphql/removeProjectMetadataByKey.graphql _lgraphql/switchActiveStandby.graphql _lgraphql/taskByID.graphql _lgraphql/updateProjectMetadata.graphql
Package lgraphql generated by go-bindata.// sources: _lgraphql/addBillingGroup.graphql _lgraphql/addEnvVariable.graphql _lgraphql/addGroup.graphql _lgraphql/addGroupsToProject.graphql _lgraphql/addNotificationEmail.graphql _lgraphql/addNotificationMicrosoftTeams.graphql _lgraphql/addNotificationRocketChat.graphql _lgraphql/addNotificationSlack.graphql _lgraphql/addNotificationToProject.graphql _lgraphql/addOrUpdateEnvironment.graphql _lgraphql/addProject.graphql _lgraphql/addProjectToBillingGroup.graphql _lgraphql/addSshKey.graphql _lgraphql/addUser.graphql _lgraphql/addUserToGroup.graphql _lgraphql/deployEnvironmentBranch.graphql _lgraphql/deployEnvironmentLatest.graphql _lgraphql/deployEnvironmentPromote.graphql _lgraphql/deployEnvironmentPullrequest.graphql _lgraphql/environmentByName.graphql _lgraphql/lagoonSchema.graphql _lgraphql/lagoonVersion.graphql _lgraphql/me.graphql _lgraphql/minimalProjectByName.graphql _lgraphql/projectByName.graphql _lgraphql/projectByNameMetadata.graphql _lgraphql/projectsByMetadata.graphql _lgraphql/removeProjectMetadataByKey.graphql _lgraphql/switchActiveStandby.graphql _lgraphql/taskByID.graphql _lgraphql/updateProjectMetadata.graphql

Jump to

Keyboard shortcuts

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