client

package
v0.31.4 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 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) 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) 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) 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) 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) 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) 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.

Jump to

Keyboard shortcuts

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