schema

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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProjectsToConfig

func ProjectsToConfig(
	projects []Project, exclude map[string]bool) ([]byte, error)

ProjectsToConfig translates an array of Projects to Lagoon Config data. It assumes a list of unique Projects.

func UnmarshalConfigYAML

func UnmarshalConfigYAML(data []byte, config *Config) error

UnmarshalConfigYAML takes config data in YAML format and unmarshals it into a Config struct.

Types

type AddDeployTargetConfigInput added in v0.12.3

type AddDeployTargetConfigInput struct {
	ID                         uint   `json:"id,omitempty"`
	Project                    uint   `json:"project,omitempty"`
	Weight                     uint   `json:"weight,omitempty"`
	Branches                   string `json:"branches,omitempty"`
	Pullrequests               string `json:"pullrequests,omitempty"`
	DeployTarget               uint   `json:"deployTarget,omitempty"`
	DeployTargetProjectPattern string `json:"deployTargetProjectPattern,omitempty"`
}

AddDeployTargetConfigInput .

type AddDeployTargetInput added in v0.15.0

type AddDeployTargetInput struct {
	ID               uint   `json:"id,omitempty"`
	Name             string `json:"name,omitempty"`
	ConsoleURL       string `json:"consoleUrl,omitempty"`
	Token            string `json:"token,omitempty"`
	RouterPattern    string `json:"routerPattern,omitempty"`
	SSHHost          string `json:"sshHost,omitempty"`
	SSHPort          string `json:"sshPort,omitempty"`
	BuildImage       string `json:"buildImage,omitempty"`
	Created          string `json:"created,omitempty"`
	MonitoringConfig string `json:"monitoringConfig,omitempty"`
	FriendlyName     string `json:"friendlyName,omitempty"`
	CloudProvider    string `json:"cloudProvider,omitempty"`
	CloudRegion      string `json:"cloudRegion,omitempty"`
}

AddDeployTargetInput is based on the input to addDeployTarget.

type AddDeployTargetResponse added in v0.15.0

type AddDeployTargetResponse struct {
	DeployTarget
}

type AddEnvironmentInput

type AddEnvironmentInput struct {
	ID                   uint           `json:"id,omitempty"`
	Name                 string         `json:"name"`
	ProjectID            uint           `json:"project"`
	DeployType           api.DeployType `json:"deployType"`
	DeployBaseRef        string         `json:"deployBaseRef"`
	DeployHeadRef        string         `json:"deployHeadRef,omitempty"`
	DeployTitle          string         `json:"deployTitle,omitempty"`
	EnvironmentType      api.EnvType    `json:"environmentType"`
	OpenshiftProjectName string         `json:"openshiftProjectName"`
}

AddEnvironmentInput is based on the input to addOrUpdateEnvironment.

type AddGroupInput

type AddGroupInput struct {
	Name        string      `json:"name"`
	ParentGroup *GroupInput `json:"parentGroup,omitempty"`
}

AddGroupInput is based on the input to addGroup.

type AddNotificationEmailInput

type AddNotificationEmailInput struct {
	Name         string `json:"name,omitempty"`
	EmailAddress string `json:"emailAddress,omitempty"`
}

AddNotificationEmailInput is based on the Lagoon API type.

type AddNotificationMicrosoftTeamsInput

type AddNotificationMicrosoftTeamsInput struct {
	Name    string `json:"name,omitempty"`
	Webhook string `json:"webhook,omitempty"`
}

AddNotificationMicrosoftTeamsInput is based on the Lagoon API type.

type AddNotificationRocketChatInput

type AddNotificationRocketChatInput struct {
	Name    string `json:"name,omitempty"`
	Webhook string `json:"webhook,omitempty"`
	Channel string `json:"channel,omitempty"`
}

AddNotificationRocketChatInput is based on the Lagoon API type.

type AddNotificationSlackInput

type AddNotificationSlackInput struct {
	Name    string `json:"name,omitempty"`
	Webhook string `json:"webhook,omitempty"`
	Channel string `json:"channel,omitempty"`
}

AddNotificationSlackInput is based on the Lagoon API type.

type AddNotificationToProjectInput

type AddNotificationToProjectInput struct {
	Project          string               `json:"project"`
	NotificationType api.NotificationType `json:"notificationType"`
	NotificationName string               `json:"notificationName"`
}

AddNotificationToProjectInput is based on the input to addNotificationToProject.

type AddNotificationWebhookInput added in v0.18.0

type AddNotificationWebhookInput struct {
	Name    string `json:"name,omitempty"`
	Webhook string `json:"webhook,omitempty"`
}

AddNotificationWebhookInput is based on the Lagoon API type.

type AddProjectInput

type AddProjectInput struct {
	ID                           uint                `json:"id,omitempty"`
	Name                         string              `json:"name"`
	GitURL                       string              `json:"gitUrl"`
	Subfolder                    string              `json:"subfolder,omitempty"`
	Openshift                    uint                `json:"openshift"`
	OpenshiftProjectPattern      string              `json:"openshiftProjectPattern,omitempty"`
	Branches                     string              `json:"branches,omitempty"`
	PullRequests                 string              `json:"pullrequests,omitempty"`
	ProductionEnvironment        string              `json:"productionEnvironment"`
	StandbyProductionEnvironment string              `json:"standbyProductionEnvironment,omitempty"`
	Availability                 ProjectAvailability `json:"availability,omitempty"`
	// AutoIdle and StorageCalc can't be omitempty because their zero-values are
	// significant - Lagoon uses it as a boolean (0/1).
	AutoIdle                     uint   `json:"autoIdle"`
	StorageCalc                  uint   `json:"storageCalc"`
	DevelopmentEnvironmentsLimit uint   `json:"developmentEnvironmentsLimit,omitempty"`
	PrivateKey                   string `json:"privateKey,omitempty"`
}

AddProjectInput is based on the Lagoon API type.

type AddRestoreInput added in v0.12.2

type AddRestoreInput struct {
	ID              uint   `json:"id,omitempty"`
	Status          string `json:"status"`
	Created         string `json:"created"`
	BackupID        string `json:"backupId"`
	RestoreLocation string `json:"restoreLocation"`
	Execute         bool   `json:"execute"`
}

AddRestoreInput is based on the input to addRestore.

type AddSSHKeyInput

type AddSSHKeyInput struct {
	SSHKey
	UserEmail string `json:"userEmail"`
}

AddSSHKeyInput is based on the Lagoon API type.

type AddUserInput

type AddUserInput struct {
	Email     string `json:"email"`
	FirstName string `json:"firstName,omitempty"`
	LastName  string `json:"lastName,omitempty"`
	Comment   string `json:"comment,omitempty"`
	GitlabID  uint   `json:"gitlabId,omitempty"`
}

AddUserInput is based on the Lagoon API type.

type Backup added in v0.12.2

type Backup struct {
	ID       int     `json:"id"`
	Source   string  `json:"source"`
	BackupID string  `json:"backupId"`
	Created  string  `json:"created"`
	Deleted  string  `json:"deleted"`
	Restore  Restore `json:"restore"`
}

Backup is the Lagoon API Backup object.

type Config

type Config struct {
	// API objects
	Projects      []ProjectConfig      `json:"projects,omitempty"`
	Groups        []GroupConfig        `json:"groups,omitempty"`
	Users         []User               `json:"users,omitempty"`
	Notifications *NotificationsConfig `json:"notifications,omitempty"`
}

Config represents a collection of Lagoon platform configuration. Fields for comprising structs are dictated by the add* Lagoon APIs.

func (*Config) UnmarshalJSON

func (c *Config) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler interface to control how lagoon config files are unmarshaled.

type Currency

type Currency string

Currency for billing purposes.

const (
	AUD Currency = "AUD"
	EUR Currency = "EUR"
	GBP Currency = "GBP"
	USD Currency = "USD"
	CHF Currency = "CHF"
	ZAR Currency = "ZAR"
)

These are the Currency units supported by Lagoon.

type DeleteDeployTargetConfig added in v0.12.3

type DeleteDeployTargetConfig struct {
	DeleteDeployTargetConfig string `json:"deleteDeployTargetConfig"`
}

DeleteDeployTargetConfig is the response.

type DeleteDeployTargetInput added in v0.15.0

type DeleteDeployTargetInput struct {
	Name string `json:"name,omitempty"`
	ID   uint   `json:"id,omitempty"`
}

type DeleteDeployTargetResponse added in v0.15.0

type DeleteDeployTargetResponse struct {
	DeleteDeployTarget string `json:"deleteDeployTarget,omitempty"`
}

type DeleteEnvVarResponse added in v0.16.0

type DeleteEnvVarResponse struct {
	DeleteEnvVar string `json:"deleteEnvVariableByName,omitempty"`
}

type DeleteEnvVariableByNameInput added in v0.16.0

type DeleteEnvVariableByNameInput struct {
	Environment string `json:"environment,omitempty"`
	Project     string `json:"project"`
	Name        string `json:"name"`
}

type DeleteNotification added in v0.18.0

type DeleteNotification struct {
	DeleteNotification string `json:"deleteNotification"`
}

DeleteNotification is the response.

type DeployEnvironmentBranch

type DeployEnvironmentBranch struct {
	DeployEnvironmentBranch string `json:"deployEnvironmentBranch"`
}

DeployEnvironmentBranch is the response.

type DeployEnvironmentBranchInput

type DeployEnvironmentBranchInput struct {
	Project        string             `json:"project"`
	Branch         string             `json:"branch"`
	BranchRef      string             `json:"branchRef"`
	ReturnData     bool               `json:"returnData"`
	BuildVariables []EnvKeyValueInput `json:"buildVariables,omitempty"`
}

DeployEnvironmentBranchInput is used as the input for deploying a branch.

type DeployEnvironmentLatest

type DeployEnvironmentLatest struct {
	DeployEnvironmentLatest string `json:"deployEnvironmentLatest"`
}

DeployEnvironmentLatest is the response.

type DeployEnvironmentLatestInput

type DeployEnvironmentLatestInput struct {
	Environment    EnvironmentInput   `json:"environment"`
	ReturnData     bool               `json:"returnData"`
	BuildVariables []EnvKeyValueInput `json:"buildVariables,omitempty"`
}

DeployEnvironmentLatestInput is used as the input for deploying an environment.

type DeployEnvironmentPromote

type DeployEnvironmentPromote struct {
	DeployEnvironmentPromote string `json:"deployEnvironmentPromote"`
}

DeployEnvironmentPromote is the response.

type DeployEnvironmentPromoteInput

type DeployEnvironmentPromoteInput struct {
	Project                string             `json:"project"`
	SourceEnvironment      string             `json:"sourceEnvironment"`
	DestinationEnvironment string             `json:"destinationEnvironment"`
	BuildVariables         []EnvKeyValueInput `json:"buildVariables,omitempty"`
	ReturnData             bool               `json:"returnData"`
}

DeployEnvironmentPromoteInput is used as the input for promoting one environment to another.

type DeployEnvironmentPullrequest

type DeployEnvironmentPullrequest struct {
	DeployEnvironmentPullrequest string `json:"deployEnvironmentPullrequest"`
}

DeployEnvironmentPullrequest is the response.

type DeployEnvironmentPullrequestInput

type DeployEnvironmentPullrequestInput struct {
	Project        ProjectInput       `json:"project"`
	Number         uint               `json:"number"`
	Title          string             `json:"title"`
	BaseBranchName string             `json:"baseBranchName"`
	BaseBranchRef  string             `json:"baseBranchRef"`
	HeadBranchName string             `json:"headBranchName"`
	HeadBranchRef  string             `json:"headBranchRef"`
	ReturnData     bool               `json:"returnData"`
	BuildVariables []EnvKeyValueInput `json:"buildVariables,omitempty"`
}

DeployEnvironmentPullrequestInput is used as the input for deploying a pull request.

type DeployTarget added in v0.12.3

type DeployTarget struct {
	AddDeployTargetInput
}

type DeployTargetConfig added in v0.12.3

type DeployTargetConfig struct {
	ID                         uint         `json:"id"`
	Project                    Project      `json:"project,omitempty"`
	Weight                     uint         `json:"weight,omitempty"`
	Branches                   string       `json:"branches,omitempty"`
	Pullrequests               string       `json:"pullrequests,omitempty"`
	DeployTarget               DeployTarget `json:"deployTarget,omitempty"`
	DeployTargetProjectPattern string       `json:"deployTargetProjectPattern,omitempty"`
}

DeployTargetConfig .

type EnvKeyValue

type EnvKeyValue struct {
	ID    uint             `json:"id,omitempty"`
	Scope EnvVariableScope `json:"scope"`
	Name  string           `json:"name"`
	Value string           `json:"value"`
}

EnvKeyValue is the base type of Environment variable.

type EnvKeyValueInput added in v0.21.0

type EnvKeyValueInput struct {
	Name  string `json:"name,omitempty"`
	Value string `json:"value,omitempty"`
}

EnvKeyValueInput is based on the Lagoon API type.

type EnvVar added in v0.16.0

type EnvVar struct {
	Scope EnvVariableScope `json:"scope"`
	Name  string           `json:"name"`
	Value string           `json:"value"`
}

type EnvVariableByNameInput added in v0.16.0

type EnvVariableByNameInput struct {
	Environment string           `json:"environment,omitempty"`
	Project     string           `json:"project"`
	Scope       EnvVariableScope `json:"scope,omitempty"`
	Name        string           `json:"name"`
	Value       string           `json:"value"`
}

type EnvVariableByProjectEnvironmentNameInput added in v0.16.0

type EnvVariableByProjectEnvironmentNameInput struct {
	Environment string `json:"environment,omitempty"`
	Project     string `json:"project"`
}

type EnvVariableInput

type EnvVariableInput struct {
	EnvKeyValue
	Type   EnvVariableType `json:"type"`
	TypeID uint            `json:"typeId"`
}

EnvVariableInput is based on the Lagoon API type.

type EnvVariableScope added in v0.16.0

type EnvVariableScope string

EnvVariableScope .

const (
	BuildVar                     EnvVariableScope = "BUILD"
	RuntimeVar                   EnvVariableScope = "RUNTIME"
	GlobalVar                    EnvVariableScope = "GLOBAL"
	InternalContainerRegistryVar EnvVariableScope = "INTERNAL_CONTAINER_REGISTRY"
	ContainerRegistryVar         EnvVariableScope = "CONTAINER_REGISTRY"
)

. .

type EnvVariableType added in v0.16.0

type EnvVariableType string

EnvVariableType .

const (
	ProjectVar     EnvVariableType = "PROJECT"
	EnvironmentVar EnvVariableType = "ENVIRONMENT"
)

. .

type Environment

type Environment struct {
	AddEnvironmentInput
	AutoIdle     uint          `json:"autoIdle"`
	EnvVariables []EnvKeyValue `json:"envVariables,omitempty"`
	Route        string        `json:"route,omitempty"`
	Routes       string        `json:"routes,omitempty"`
	Backups      []Backup      `json:"backups,omitempty"`
	DeployTarget DeployTarget  `json:"openshift,omitempty"`
	// TODO use a unixtime type
	Updated string `json:"updated,omitempty"`
	Created string `json:"created,omitempty"`
	Deleted string `json:"deleted,omitempty"`
}

Environment is the Lagoon API Environment object.

type EnvironmentConfig

type EnvironmentConfig struct {
	Environment
	// override embedded AddEnvironmentInput.ProjectID to omitempty
	ProjectID uint `json:"project,omitempty"`
}

EnvironmentConfig contains Environment configuration.

type EnvironmentInput

type EnvironmentInput struct {
	ID      int          `json:"id,omitempty"`
	Name    string       `json:"name,omitempty"`
	Project ProjectInput `json:"project"`
}

EnvironmentInput is based on the Lagoon API type.

type Group

type Group struct {
	AddGroupInput
	ID      *uuid.UUID `json:"id,omitempty"`
	Members []struct {
		User User          `json:"user"`
		Role api.GroupRole `json:"role"`
	} `json:"members,omitempty"`
}

Group provides for unmarshalling the groups contained with a Project.

type GroupConfig

type GroupConfig struct {
	AddGroupInput
	Users []UserRoleConfig `json:"users,omitempty"`
}

GroupConfig embeds AddGroupInput as well as a list of members.

type GroupInput

type GroupInput ProjectInput

GroupInput is based on the Lagoon API type.

type Groups

type Groups struct {
	Groups []Group
}

Groups represents possible Lagoon group types. These are unmarshalled from a projectByName query response.

func (*Groups) UnmarshalJSON

func (g *Groups) UnmarshalJSON(b []byte) error

UnmarshalJSON unmashals a quoted json string to the Notification values.

type LagoonSchema

type LagoonSchema struct {
	QueryType struct {
		Name string `json:"name"`
	} `json:"queryType"`
	MutationType struct {
		Name string `json:"name"`
	} `json:"mutationType"`
	SubscriptionType struct {
		Name string `json:"name"`
	} `json:"subscriptionType"`
	Types []struct {
		Kind        string `json:"kind"`
		Name        string `json:"name"`
		Description string `json:"description"`
		Fields      []struct {
			Name        string        `json:"name"`
			Description string        `json:"description"`
			Args        []interface{} `json:"args"`
			Type        struct {
				Kind   string      `json:"kind"`
				Name   string      `json:"name"`
				OfType interface{} `json:"ofType"`
			} `json:"type"`
			IsDeprecated      bool        `json:"isDeprecated"`
			DeprecationReason interface{} `json:"deprecationReason"`
		} `json:"fields"`
		InputFields   interface{}   `json:"inputFields"`
		Interfaces    []interface{} `json:"interfaces"`
		EnumValues    interface{}   `json:"enumValues"`
		PossibleTypes interface{}   `json:"possibleTypes"`
	} `json:"types"`
	Directives []struct {
		Name        string   `json:"name"`
		Description string   `json:"description"`
		Locations   []string `json:"locations"`
		Args        []struct {
			Name        string `json:"name"`
			Description string `json:"description"`
			Type        struct {
				Kind   string      `json:"kind"`
				Name   interface{} `json:"name"`
				OfType struct {
					Kind   string      `json:"kind"`
					Name   string      `json:"name"`
					OfType interface{} `json:"ofType"`
				} `json:"ofType"`
			} `json:"type"`
			DefaultValue interface{} `json:"defaultValue"`
		} `json:"args"`
	} `json:"directives"`
}

LagoonSchema is the supported schema for a lagoon

type LagoonVersion

type LagoonVersion struct {
	LagoonVersion string `json:"lagoonVersion,omitempty"`
}

LagoonVersion is for the lagoon API version.

type NotificationEmail

type NotificationEmail struct {
	AddNotificationEmailInput
	ID uint `json:"id,omitempty"`
}

NotificationEmail is based on the Lagoon API type.

type NotificationMicrosoftTeams

type NotificationMicrosoftTeams struct {
	AddNotificationMicrosoftTeamsInput
	ID uint `json:"id,omitempty"`
}

NotificationMicrosoftTeams is based on the Lagoon API type.

type NotificationRocketChat

type NotificationRocketChat struct {
	AddNotificationRocketChatInput
	ID uint `json:"id,omitempty"`
}

NotificationRocketChat is based on the Lagoon API type.

type NotificationSlack

type NotificationSlack struct {
	AddNotificationSlackInput
	ID uint `json:"id,omitempty"`
}

NotificationSlack is based on the Lagoon API type.

type NotificationWebhook added in v0.18.0

type NotificationWebhook struct {
	AddNotificationWebhookInput
	ID uint `json:"id,omitempty"`
}

NotificationWebhook is based on the Lagoon API type.

type Notifications

type Notifications struct {
	Slack          []AddNotificationSlackInput          `json:"slack,omitempty"`
	RocketChat     []AddNotificationRocketChatInput     `json:"rocketchat,omitempty"`
	Email          []AddNotificationEmailInput          `json:"email,omitempty"`
	MicrosoftTeams []AddNotificationMicrosoftTeamsInput `json:"microsoftteams,omitempty"`
	Webhook        []AddNotificationWebhookInput        `json:"webhook,omitempty"`
}

Notifications represents possible Lagoon notification types. These are unmarshalled from a projectByName query response.

func (*Notifications) UnmarshalJSON

func (n *Notifications) UnmarshalJSON(b []byte) error

UnmarshalJSON unmashals a quoted json string to the Notification values returned from the Lagoon API.

type NotificationsConfig

type NotificationsConfig struct {
	Notifications
}

NotificationsConfig represents possible Lagoon notification types and (un)marshals to the config file format.

func (*NotificationsConfig) MarshalJSON

func (n *NotificationsConfig) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Notifications as a quoted json string.

func (*NotificationsConfig) UnmarshalJSON

func (n *NotificationsConfig) UnmarshalJSON(b []byte) error

UnmarshalJSON unmashals a quoted json string to the Notification values.

type OpenshiftID

type OpenshiftID struct {
	ID uint `json:"id,omitempty"`
}

OpenshiftID is unmarshalled during export.

type Project

type Project struct {
	AddProjectInput
	Environments []EnvironmentConfig `json:"environments,omitempty"`
	EnvVariables []EnvKeyValue       `json:"envVariables,omitempty"`
	// Notifications is unmarshalled during export.
	Notifications *Notifications `json:"notifications,omitempty"`
	// Openshift is unmarshalled during export.
	OpenshiftID *OpenshiftID `json:"openshift,omitempty"`
	// Groups are unmarshalled during export.
	Groups             *Groups              `json:"groups,omitempty"`
	DeployTargetConfig []DeployTargetConfig `json:"deployTargetConfigs,omitempty"`
}

Project is the Lagoon API Project object.

type ProjectAvailability

type ProjectAvailability string

ProjectAvailability determines the number of pods used to run a project.

const (
	High     ProjectAvailability = "HIGH"
	Standard ProjectAvailability = "STANDARD"
)

High tells Lagoon to load balance across multiple pods. Standard tells Lagoon to use a single pod for the site.

type ProjectConfig

type ProjectConfig struct {
	Project
	// ProjectNotifications are (un)marshalled during import.
	Notifications *ProjectNotifications `json:"notifications,omitempty"`
	// Group are (un)marshalled during import.
	Groups []string `json:"groups,omitempty"`
	// Users are members of the project.
	// Note that in Lagoon this is implemented as being a member of the
	// project-<projectname> group.
	Users []UserRoleConfig `json:"users,omitempty"`
}

ProjectConfig contains project configuration.

type ProjectGroupsInput

type ProjectGroupsInput struct {
	Project ProjectInput `json:"project"`
	Groups  []GroupInput `json:"groups"`
}

ProjectGroupsInput is based on the input to addGroupsToProject.

type ProjectInput

type ProjectInput struct {
	ID   uint   `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

ProjectInput is based on the Lagoon API type.

type ProjectMetadata added in v0.12.0

type ProjectMetadata struct {
	Project
	Metadata map[string]string `json:"metadata"`
}

ProjectMetadata .

type ProjectNotifications

type ProjectNotifications struct {
	Slack          []string `json:"slack,omitempty"`
	RocketChat     []string `json:"rocketChat,omitempty"`
	Email          []string `json:"email,omitempty"`
	MicrosoftTeams []string `json:"microsoftTeams,omitempty"`
	Webhook        []string `json:"webhook,omitempty"`
}

ProjectNotifications lists the notifications for a project within a ProjectConfig.

type RemoveNotificationFromProjectInput added in v0.18.0

type RemoveNotificationFromProjectInput struct {
	Project          string               `json:"project"`
	NotificationType api.NotificationType `json:"notificationType"`
	NotificationName string               `json:"notificationName"`
}

RemoveNotificationFromProjectInput is based on the input to removeNotificationFromProject.

type Restore added in v0.12.2

type Restore struct {
	ID              int    `json:"id"`
	Status          string `json:"status"`
	Created         string `json:"created"`
	BackupID        string `json:"backupId"`
	RestoreLocation string `json:"restoreLocation"`
}

Restore is the Lagoon API Restore object.

type SSHKey

type SSHKey struct {
	Name           string         `json:"name"`
	KeyValue       string         `json:"keyValue"`
	Created        string         `json:"created"`
	KeyType        api.SSHKeyType `json:"keyType"`
	KeyFingerprint string         `json:"keyFingerprint"`
}

SSHKey is the basic SSH key information, used by both config and API data. @TODO: once Lagoon API returns proper TZ, fix up `Created` to time.Time.

type Task

type Task struct {
	ID          uint        `json:"id,omitempty"`
	Name        string      `json:"name,omitempty"`
	Status      string      `json:"status,omitempty"`
	Created     string      `json:"created,omitempty"`
	Started     string      `json:"started,omitempty"`
	Completed   string      `json:"completed,omitempty"`
	Service     string      `json:"service,omitempty"`
	Command     string      `json:"command,omitempty"`
	RemoteID    string      `json:"remoteId,omitempty"`
	Logs        string      `json:"logs,omitempty"`
	Environment Environment `json:"environment,omitempty"`
}

Task is based on the Lagoon API type.

type UpdateDeployTargetConfigInput added in v0.12.3

type UpdateDeployTargetConfigInput struct {
	ID                         uint   `json:"id,omitempty"`
	Weight                     uint   `json:"weight,omitempty"`
	Branches                   string `json:"branches,omitempty"`
	Pullrequests               string `json:"pullrequests,omitempty"`
	DeployTarget               uint   `json:"deployTarget,omitempty"`
	DeployTargetProjectPattern string `json:"deployTargetProjectPattern,omitempty"`
}

UpdateDeployTargetConfigInput .

type UpdateDeployTargetInput added in v0.15.0

type UpdateDeployTargetInput struct {
	AddDeployTargetInput
	// `null` is valid graphql, use a pointer to allow `nil` to be empty
	BuildImage *null.String `json:"buildImage,omitempty"`
}

UpdateDeployTargetInput is based on the input to addDeployTarget.

type UpdateDeployTargetResponse added in v0.15.0

type UpdateDeployTargetResponse struct {
	DeployTarget
}

type UpdateEnvVarResponse added in v0.16.0

type UpdateEnvVarResponse struct {
	EnvKeyValue
}

type UpdateNotificationEmailInput added in v0.18.0

type UpdateNotificationEmailInput struct {
	Name  string                    `json:"name"`
	Patch AddNotificationEmailInput `json:"patch"`
}

UpdateNotificationEmailPatchInput is based on the Lagoon API type.

type UpdateNotificationMicrosoftTeamsInput added in v0.18.0

type UpdateNotificationMicrosoftTeamsInput struct {
	Name  string                             `json:"name"`
	Patch AddNotificationMicrosoftTeamsInput `json:"patch"`
}

UpdateNotificationMicrosoftTeamsPatchInput is based on the Lagoon API type.

type UpdateNotificationRocketChatInput added in v0.18.0

type UpdateNotificationRocketChatInput struct {
	Name  string                         `json:"name"`
	Patch AddNotificationRocketChatInput `json:"patch"`
}

UpdateNotificationRocketChatPatchInput is based on the Lagoon API type.

type UpdateNotificationSlackInput added in v0.18.0

type UpdateNotificationSlackInput struct {
	Name  string                    `json:"name"`
	Patch AddNotificationSlackInput `json:"patch"`
}

UpdateNotificationSlackPatchInput is based on the Lagoon API type.

type UpdateNotificationWebhookInput added in v0.18.0

type UpdateNotificationWebhookInput struct {
	Name  string                      `json:"name"`
	Patch AddNotificationWebhookInput `json:"patch"`
}

UpdateNotificationWebhookPatchInput is based on the Lagoon API type.

type User

type User struct {
	AddUserInput
	ID      *uuid.UUID `json:"id,omitempty"`
	SSHKeys []SSHKey   `json:"sshKeys,omitempty"`
}

User provides for unmarshalling the users contained withing a Group.

type UserGroupRoleInput

type UserGroupRoleInput struct {
	UserEmail string        `json:"userEmail"`
	GroupName string        `json:"groupName"`
	GroupRole api.GroupRole `json:"groupRole"`
}

UserGroupRoleInput is based on the Lagoon API type.

type UserRoleConfig

type UserRoleConfig struct {
	Email string        `json:"email"`
	Role  api.GroupRole `json:"role"`
}

UserRoleConfig stores a user/role config within a group.

Jump to

Keyboard shortcuts

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