lagoon

package
v0.31.2 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package lagoon implements high-level functions for interacting with the Lagoon API.

Package lagoon implements high-level functions for interacting with the Lagoon API.

Package lagoon implements high-level functions for interacting with the Lagoon API.

Index

Constants

This section is empty.

Variables

View Source
var ErrExist = errors.New("object already exists")

ErrExist indicates that an attempt was made to create an object that already exists.

Functions

func AddNotificationEmail added in v0.18.0

AddNotificationEmail adds a notification.

func AddNotificationMicrosoftTeams added in v0.18.0

AddNotificationMicrosoftTeams adds a notification.

func AddNotificationRocketChat added in v0.18.0

AddNotificationRocketChat adds a notification.

func AddNotificationSlack added in v0.18.0

AddNotificationSlack adds a notification.

func AddNotificationToProject added in v0.18.0

func AddNotificationToProject(ctx context.Context, input *schema.AddNotificationToProjectInput, n Notification) (*schema.Project, error)

AddNotificationToProject adds a notification to project.

func AddNotificationWebhook added in v0.18.0

AddNotificationWebhook adds a notification.

func ExportProject

func ExportProject(ctx context.Context,
	e Exporter, name string, exclude map[string]bool) ([]byte, error)

ExportProject exports the given project by name.

func GetLagoonAPIVersion

func GetLagoonAPIVersion(ctx context.Context, l APIVersion) (*schema.LagoonVersion, error)

GetLagoonAPIVersion gets info on the current API version of lagoon, supported in lagoon v1.4.1+

func Import

func Import(ctx context.Context, i Importer, r io.Reader, keepGoing bool,
	openshiftID uint) error

Import creates objects in the Lagoon API based on a configuration object.

Types

type APIVersion

type APIVersion interface {
	LagoonAPIVersion(ctx context.Context, apiVersion *schema.LagoonVersion) error
	LagoonSchema(ctx context.Context, lagoonSchema *schema.LagoonSchema) error
}

APIVersion interface contains methods for getting info on the current version of lagoon.

type Config

type Config struct {
	Current                  string             `json:"current"`
	Default                  string             `json:"default"`
	Lagoons                  map[string]Context `json:"lagoons"`
	UpdateCheckDisable       bool               `json:"updatecheckdisable,omitempty"`
	EnvironmentFromDirectory bool               `json:"environmentfromdirectory,omitempty"`
	StrictHostKeyChecking    string             `json:"stricthostkeychecking,omitempty"`
}

Config is used for the lagoon configuration.

type Context

type Context struct {
	GraphQL             string   `json:"graphql"`
	HostName            string   `json:"hostname"`
	UI                  string   `json:"ui,omitempty"`
	Kibana              string   `json:"kibana,omitempty"`
	Port                string   `json:"port"`
	Token               string   `json:"token,omitempty"`
	Version             string   `json:"version,omitempty"`
	SSHKey              string   `json:"sshkey,omitempty"`
	SSHPortal           bool     `json:"sshPortal,omitempty"`
	PublicKeyIdentities []string `json:"publickeyidentities,omitempty"`
}

Context is used for each lagoon context in the config file.

type Exporter

type Exporter interface {
	ProjectByName(ctx context.Context, name string, project *schema.Project) error
}

Exporter interface contains methods for exporting data from Lagoon.

type Importer

Importer interface contains methods for exporting data from Lagoon. TODO: compose this once simpler interfaces are defined.

type Notification added in v0.18.0

type Notification interface {
	AddNotificationWebhook(ctx context.Context, input *schema.AddNotificationWebhookInput, result *schema.NotificationWebhook) error
	AddNotificationEmail(ctx context.Context, input *schema.AddNotificationEmailInput, result *schema.NotificationEmail) error
	AddNotificationRocketChat(ctx context.Context, input *schema.AddNotificationRocketChatInput, result *schema.NotificationRocketChat) error
	AddNotificationMicrosoftTeams(ctx context.Context, input *schema.AddNotificationMicrosoftTeamsInput, result *schema.NotificationMicrosoftTeams) error
	AddNotificationSlack(ctx context.Context, input *schema.AddNotificationSlackInput, result *schema.NotificationSlack) error
	AddNotificationToProject(context.Context, *schema.AddNotificationToProjectInput, *schema.Project) error
}

Notification interface contains methods for adding notifications in Lagoon.

Directories

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

Jump to

Keyboard shortcuts

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