client

package
v0.21.3 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 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) AddDeployTarget added in v0.15.0

AddDeployTarget adds a deploytarget (kubernetes/openshift).

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) AddNotificationWebhook added in v0.18.0

func (c *Client) AddNotificationWebhook(ctx context.Context,
	in *schema.AddNotificationWebhookInput,
	out *schema.NotificationWebhook) error

AddNotificationWebhook defines a Webhook notification.

func (*Client) AddOrUpdateEnvVariableByName added in v0.16.0

func (c *Client) AddOrUpdateEnvVariableByName(ctx context.Context, in *schema.EnvVariableByNameInput, out *schema.UpdateEnvVarResponse) error

AddOrUpdateEnvVariableByName adds or updates an environment variable in the api

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) AddRestore added in v0.12.2

func (c *Client) AddRestore(
	ctx context.Context, backupID string, out *schema.Restore) error

AddRestore adds a restore.

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) BackupsForEnvironmentByName added in v0.12.2

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

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

func (*Client) DeleteDeployTarget added in v0.15.0

DeleteDeployTarget deletes a deploytarget (kubernetes/openshift).

func (*Client) DeleteDeployTargetConfiguration added in v0.12.3

func (c *Client) DeleteDeployTargetConfiguration(ctx context.Context,
	id int, project int, out *schema.DeleteDeployTargetConfig) error

DeleteDeployTargetConfig deletes a deploytarget config from a project.

func (*Client) DeleteEnvVariableByName added in v0.16.0

func (c *Client) DeleteEnvVariableByName(ctx context.Context, in *schema.DeleteEnvVariableByNameInput, out *schema.DeleteEnvVarResponse) error

DeleteEnvVariableByName deletes an environment variable from the api

func (*Client) DeleteNotificationEmail added in v0.18.0

func (c *Client) DeleteNotificationEmail(ctx context.Context,
	name string,
	out *schema.DeleteNotification) error

DeleteNotificationEmail deletes an Email notification.

func (*Client) DeleteNotificationMicrosoftTeams added in v0.18.0

func (c *Client) DeleteNotificationMicrosoftTeams(ctx context.Context,
	name string,
	out *schema.DeleteNotification) error

DeleteNotificationMicrosoftTeams deletes a MicrosoftTeams notification.

func (*Client) DeleteNotificationRocketChat added in v0.18.0

func (c *Client) DeleteNotificationRocketChat(ctx context.Context,
	name string,
	out *schema.DeleteNotification) error

DeleteNotificationRocketChat deletes a RocketChat notification.

func (*Client) DeleteNotificationSlack added in v0.18.0

func (c *Client) DeleteNotificationSlack(ctx context.Context,
	name string,
	out *schema.DeleteNotification) error

DeleteNotificationSlack deletes a Slack notification.

func (*Client) DeleteNotificationWebhook added in v0.18.0

func (c *Client) DeleteNotificationWebhook(ctx context.Context,
	name string,
	out *schema.DeleteNotification) error

DeleteNotificationWebhook deletes a Webhook notification.

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) DeployTargetConfigsByProjectID added in v0.12.3

func (c *Client) DeployTargetConfigsByProjectID(
	ctx context.Context, project int, deploytargetconfigs *[]schema.DeployTargetConfig) error

DeployTargetConfigsByProjectID queries the Lagoon API for a projects deploytarget configs by its id, and unmarshals the response into deploytargetconfigs.

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) GetAllNotificationEmail added in v0.18.0

func (c *Client) GetAllNotificationEmail(
	ctx context.Context, projects *[]schema.Project) error

GetAllNotificationEmail queries the Lagoon API for notifications of the requested type

func (*Client) GetAllNotificationMicrosoftTeams added in v0.18.0

func (c *Client) GetAllNotificationMicrosoftTeams(
	ctx context.Context, projects *[]schema.Project) error

GetAllNotificationMicrosoftTeams queries the Lagoon API for notifications of the requested type

func (*Client) GetAllNotificationRocketChat added in v0.18.0

func (c *Client) GetAllNotificationRocketChat(
	ctx context.Context, projects *[]schema.Project) error

GetAllNotificationRocketChat queries the Lagoon API for notifications of the requested type

func (*Client) GetAllNotificationSlack added in v0.18.0

func (c *Client) GetAllNotificationSlack(
	ctx context.Context, projects *[]schema.Project) error

GetAllNotificationSlack queries the Lagoon API for notifications of the requested type

func (*Client) GetAllNotificationWebhook added in v0.18.0

func (c *Client) GetAllNotificationWebhook(
	ctx context.Context, projects *[]schema.Project) error

GetAllNotificationWebhook queries the Lagoon API for notifications of the requested type

func (*Client) GetEnvVariablesByProjectEnvironmentName added in v0.16.0

func (c *Client) GetEnvVariablesByProjectEnvironmentName(
	ctx context.Context, in *schema.EnvVariableByProjectEnvironmentNameInput, envkeyvalue *[]schema.EnvKeyValue) error

GetEnvVariablesByProjectEnvironmentName queries the Lagoon API for a envvars by project environment and unmarshals the response.

func (*Client) GetProjectNotificationEmail added in v0.18.0

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

GetProjectNotificationEmail queries the Lagoon API for notifications of the requested type

func (*Client) GetProjectNotificationMicrosoftTeams added in v0.18.0

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

GetProjectNotificationMicrosoftTeams queries the Lagoon API for notifications of the requested type

func (*Client) GetProjectNotificationRocketChat added in v0.18.0

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

GetProjectNotificationRocketChat queries the Lagoon API for notifications of the requested type

func (*Client) GetProjectNotificationSlack added in v0.18.0

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

GetProjectNotificationSlack queries the Lagoon API for notifications of the requested type

func (*Client) GetProjectNotificationWebhook added in v0.18.0

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

GetProjectNotificationWebhook queries the Lagoon API for notifications of the requested type

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) ListDeployTargets added in v0.15.0

func (c *Client) ListDeployTargets(
	ctx context.Context, deploytargets *[]schema.DeployTarget) error

ListDeployTargets queries the Lagoon API for a deploytargets and unmarshals the response into deploytargets.

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) RemoveNotificationFromProject added in v0.18.0

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

RemoveNotificationFromProject removes a Notification from a Project.

func (*Client) SSHEndpointsByProject added in v0.18.1

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

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

func (*Client) UpdateDeployTarget added in v0.15.0

UpdateDeployTarget updates a deploytarget (kubernetes/openshift).

func (*Client) UpdateDeployTargetConfiguration added in v0.12.3

func (c *Client) UpdateDeployTargetConfiguration(ctx context.Context,
	in *schema.UpdateDeployTargetConfigInput, out *schema.DeployTargetConfig) error

UpdateDeployTargetConfiguration adds a deploytarget configuration to a project.

func (*Client) UpdateNotificationEmail added in v0.18.0

func (c *Client) UpdateNotificationEmail(
	ctx context.Context, input *schema.UpdateNotificationEmailInput, out *schema.NotificationEmail) error

UpdateNotificationEmail updates an email notification.

func (*Client) UpdateNotificationMicrosoftTeams added in v0.18.0

func (c *Client) UpdateNotificationMicrosoftTeams(
	ctx context.Context, input *schema.UpdateNotificationMicrosoftTeamsInput, out *schema.NotificationMicrosoftTeams) error

UpdateNotificationMicrosoftTeams updates a microsoft teams notification.

func (*Client) UpdateNotificationRocketChat added in v0.18.0

func (c *Client) UpdateNotificationRocketChat(
	ctx context.Context, input *schema.UpdateNotificationRocketChatInput, out *schema.NotificationRocketChat) error

UpdateNotificationRocketChat updates a rocket chat notification.

func (*Client) UpdateNotificationSlack added in v0.18.0

func (c *Client) UpdateNotificationSlack(
	ctx context.Context, input *schema.UpdateNotificationSlackInput, out *schema.NotificationSlack) error

UpdateNotificationSlack updates a slack notification.

func (*Client) UpdateNotificationWebhook added in v0.18.0

func (c *Client) UpdateNotificationWebhook(
	ctx context.Context, input *schema.UpdateNotificationWebhookInput, out *schema.NotificationWebhook) error

UpdateNotificationWebhook updates a webhook notification.

Jump to

Keyboard shortcuts

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