api

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

README

WIP

This package is still very much a WIP

Lagoon API

This package is intended to be moved into https://github.com/uselagoon/lagoon/ at some stage, but for now is bundled with the lagoon-cli

It is to be similar, but not identical to node-packages/commons/src/api.js

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddBackup

type AddBackup struct {
	ID          int    `json:"id,omitempty"`
	Environment string `json:"environment"`
	Source      string `json:"source"`
	BackupID    string `json:"backupId"`
	Created     string `json:"created"`
}

AddBackup struct.

type AddGroup

type AddGroup struct {
	Name        string `json:"name"`
	ParentGroup Group  `json:"parentGroup,omitempty"`
}

AddGroup struct.

type AddNotificationRocketChat

type AddNotificationRocketChat struct {
	Name    string `json:"name"`
	Webhook string `json:"webhook"`
	Channel string `json:"channel"`
}

AddNotificationRocketChat struct.

type AddNotificationSlack

type AddNotificationSlack struct {
	Name    string `json:"name"`
	Webhook string `json:"webhook"`
	Channel string `json:"channel"`
}

AddNotificationSlack struct.

type AddNotificationToProject

type AddNotificationToProject struct {
	Project          string           `json:"project"`
	NotificationType NotificationType `json:"notificationType"`
	NotificationName string           `json:"notificationName"`
}

AddNotificationToProject struct.

type AddOrUpdateEnvironmentStorage

type AddOrUpdateEnvironmentStorage struct {
	Environment            int    `json:"environment"`
	PersistentStorageClaim string `json:"persistentStorageClaim"`
	BytesUsed              int    `json:"bytesUsed"`
}

AddOrUpdateEnvironmentStorage struct.

type AddRestore

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

AddRestore struct.

type AddSSHKey

type AddSSHKey struct {
	ID       string     `json:"id,omitempty"`
	Name     string     `json:"name"`
	KeyValue string     `json:"keyValue"`
	KeyType  SSHKeyType `json:"keyType"`
	User     User       `json:"user"`
}

AddSSHKey .

type AddUpdateEnvironment

type AddUpdateEnvironment struct {
	Name  string      `json:"name"`
	Patch Environment `json:"patch"`
}

AddUpdateEnvironment struct.

type AddUserToGroup

type AddUserToGroup struct {
	User  User      `json:"user"`
	Group string    `json:"group"`
	Role  GroupRole `json:"role"`
}

AddUserToGroup struct.

type AdvancedTask

type AdvancedTask struct {
	ID          int    `json:"id,omitempty"`
	Name        string `json:"name,omitempty"`
	Description string `json:"description"`
}

AdvancedTask task def struct

type Backup

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

Backup struct.

type Client

type Client interface {
	// Assorted
	RunQuery(*graphql.Request, interface{}) (interface{}, error)
	Request(CustomRequest) ([]byte, error)
	SanitizeGroupName(string) string
	SanitizeProjectName(string) string
	Debug(bool)
	// Users
	AddUser(User) ([]byte, error)
	UpdateUser(UpdateUser) ([]byte, error)
	DeleteUser(User) ([]byte, error)
	GetUserBySSHKey(SSHKeyValue) ([]byte, error)
	AddSSHKey(AddSSHKey) ([]byte, error)
	DeleteSSHKey(DeleteSSHKey) ([]byte, error)
	// Tasks
	UpdateTask(UpdateTask) ([]byte, error)
	// Backups
	AddBackup(AddBackup) ([]byte, error)
	DeleteBackup(DeleteBackup) ([]byte, error)
	UpdateRestore(UpdateRestore) ([]byte, error)
	GetAllEnvironmentBackups() ([]byte, error)
	GetEnvironmentBackups(EnvironmentBackups) ([]byte, error)
	// Groups
	AddGroup(AddGroup) ([]byte, error)
	AddGroupWithParent(AddGroup) ([]byte, error)
	UpdateGroup(UpdateGroup) ([]byte, error)
	DeleteGroup(AddGroup) ([]byte, error)
	AddUserToGroup(AddUserToGroup) ([]byte, error)
	AddGroupToProject(ProjectToGroup) ([]byte, error)
	RemoveGroupFromProject(ProjectToGroup) ([]byte, error)
	RemoveUserFromGroup(UserGroup) ([]byte, error)
	// Environments
	GetEnvironmentByName(EnvironmentByName, string) ([]byte, error)
	AddOrUpdateEnvironment(AddUpdateEnvironment) ([]byte, error)
	UpdateEnvironment(UpdateEnvironment) ([]byte, error)
	DeleteEnvironment(DeleteEnvironment) ([]byte, error)
	SetEnvironmentServices(SetEnvironmentServices) ([]byte, error)
	// Projects
	GetOpenShiftInfoForProject(Project) ([]byte, error)
	AddProject(ProjectPatch, string) ([]byte, error)
	UpdateProject(UpdateProject, string) ([]byte, error)
	DeleteProject(Project) ([]byte, error)
	GetProductionEnvironmentForProject(Project) ([]byte, error)
	GetEnvironmentByOpenshiftProjectName(Environment) ([]byte, error)
	GetProjectsByGitURL(Project) ([]byte, error)
	GetProjectByName(Project, string) ([]byte, error)
	GetAllProjects(string) ([]byte, error)
	GetRocketChatInfoForProject(Project, string) ([]byte, error)
	GetSlackInfoForProject(Project, string) ([]byte, error)
	GetEnvironmentsForProject(Project) ([]byte, error)
	GetDeploymentByRemoteID(Deployment) ([]byte, error)
	AddDeployment(Deployment) ([]byte, error)
	UpdateDeployment(UpdateDeployment) ([]byte, error)
}

Client struct

func New

func New(tokenSigningKey string, jwtAudience string, graphQLEndpoint string) (Client, error)

New creates an interface against an endpoint with the api using jwt signing key and audience

func NewWithToken

func NewWithToken(tokenString string, graphQLEndpoint string) (Client, error)

NewWithToken creates an interface against an endpoint with the api using a jwt token

type CustomRequest

type CustomRequest struct {
	Query        string
	Variables    map[string]interface{}
	MappedResult string
}

CustomRequest .

type Data

type Data struct {
	Data  interface{}
	Error interface{}
}

Data .

type DebugData

type DebugData struct {
	Query string     `json:"query"`
	Vars  []DebugVar `json:"variables"`
}

DebugData .

type DebugVar

type DebugVar struct {
	Name  string      `json:"name"`
	Value interface{} `json:"value"`
}

DebugVar .

type DeleteBackup

type DeleteBackup struct {
	BackupID string `json:"backupId"`
}

DeleteBackup struct.

type DeleteDeployment

type DeleteDeployment struct {
	ID int `json:"id"`
}

DeleteDeployment struct.

type DeleteEnvVariable

type DeleteEnvVariable struct {
	ID int `json:"id"`
}

DeleteEnvVariable struct.

type DeleteEnvironment

type DeleteEnvironment struct {
	Name    string `json:"name"`
	Project string `json:"project"`
	Execute bool   `json:"execute"`
}

DeleteEnvironment struct.

type DeleteFilesForTask

type DeleteFilesForTask struct {
	ID int `json:"id"`
}

DeleteFilesForTask struct.

type DeleteGroup

type DeleteGroup struct {
	Group Group `json:"group"`
}

DeleteGroup struct.

type DeleteNotificationRocketChat

type DeleteNotificationRocketChat struct {
	Name string `json:"name"`
}

DeleteNotificationRocketChat struct.

type DeleteNotificationSlack

type DeleteNotificationSlack struct {
	Name string `json:"name"`
}

DeleteNotificationSlack struct.

type DeleteOpenshift

type DeleteOpenshift struct {
	Name string `json:"name"`
}

DeleteOpenshift struct.

type DeleteProject

type DeleteProject struct {
	Project string `json:"project"`
}

DeleteProject struct.

type DeleteProjectResult

type DeleteProjectResult struct {
	DeleteProject string `json:"deleteProject"`
}

DeleteProjectResult struct.

type DeleteSSHKey

type DeleteSSHKey struct {
	Name string `json:"name"`
}

DeleteSSHKey .

type DeleteTask

type DeleteTask struct {
	ID int `json:"id"`
}

DeleteTask struct.

type DeleteUser

type DeleteUser struct {
	User User `json:"user"`
}

DeleteUser struct.

type DeployEnvironmentBranch

type DeployEnvironmentBranch struct {
	Project    Project `json:"project"`
	BranchName string  `json:"branchName"`
	BranchRef  string  `json:"branchRef,omitempty"`
}

DeployEnvironmentBranch struct.

type DeployEnvironmentLatest

type DeployEnvironmentLatest struct {
	Environment Environment `json:"environment"`
}

DeployEnvironmentLatest struct.

type DeployEnvironmentPromote

type DeployEnvironmentPromote struct {
	SourceEnvironment      Environment `json:"sourceEnvironment"`
	Project                Project     `json:"project"`
	DestinationEnvironment string      `json:"destinationEnvironment"`
}

DeployEnvironmentPromote struct.

type DeployEnvironmentPullrequest

type DeployEnvironmentPullrequest struct {
	Project        Project `json:"project"`
	Number         int     `json:"number"`
	Title          string  `json:"title"`
	BaseBranchName string  `json:"baseBranchName"`
	BaseBranchRef  string  `json:"baseBranchRef"`
	HeadBranchName string  `json:"headBranchName"`
	HeadBranchRef  string  `json:"headBranchRef"`
}

DeployEnvironmentPullrequest struct.

type DeployType

type DeployType string

DeployType .

const (
	Branch      DeployType = "BRANCH"
	PullRequest DeployType = "PULLREQUEST"
	Promote     DeployType = "PROMOTE"
)

. .

type Deployment

type Deployment struct {
	ID          int                  `json:"id,omitempty"`
	Name        string               `json:"name,omitempty"`
	Status      DeploymentStatusType `json:"status,omitempty"`
	Created     string               `json:"created,omitempty"`
	Started     string               `json:"started,omitempty"`
	Completed   string               `json:"completed,omitempty"`
	Environment int                  `json:"environment,omitempty"`
	RemoteID    string               `json:"remoteId,omitempty"`
	BuildLog    string               `json:"buildLog,omitempty"`
}

Deployment struct.

type DeploymentEnv

type DeploymentEnv struct {
	ID          int                  `json:"id,omitempty"`
	Name        string               `json:"name,omitempty"`
	Status      DeploymentStatusType `json:"status,omitempty"`
	Created     string               `json:"created,omitempty"`
	Started     string               `json:"started,omitempty"`
	Completed   string               `json:"completed,omitempty"`
	Environment Environment          `json:"environment,omitempty"`
	RemoteID    string               `json:"remoteId,omitempty"`
	BuildLog    string               `json:"buildLog,omitempty"`
}

DeploymentEnv struct.

type DeploymentStatusType

type DeploymentStatusType string

DeploymentStatusType .

const (
	NewDeploy       DeploymentStatusType = "NEW"
	PendingDeploy   DeploymentStatusType = "PENDING"
	RunningDeploy   DeploymentStatusType = "RUNNING"
	CancelledDeploy DeploymentStatusType = "CANCELLED"
	ErrorDeploy     DeploymentStatusType = "ERROR"
	FailedDeploy    DeploymentStatusType = "FAILED"
	CompleteDeploy  DeploymentStatusType = "COMPLETE"
)

. .

type EnvOrderType

type EnvOrderType string

EnvOrderType .

const (
	NameEnvOrder    EnvOrderType = "NAME"
	UpdatedEnvOrder EnvOrderType = "UPDATED"
)

. .

type EnvType

type EnvType string

EnvType .

const (
	ProductionEnv  EnvType = "PRODUCTION"
	DevelopmentEnv EnvType = "DEVELOPMENT"
)

. .

type EnvVariable

type EnvVariable struct {
	ID     int              `json:"id,omitempty"`
	Type   EnvVariableType  `json:"type,omitempty"`
	TypeID int              `json:"typeId"`
	Name   string           `json:"name"`
	Scope  EnvVariableScope `json:"scope"`
	Value  string           `json:"value"`
}

EnvVariable struct.

type EnvVariableScope

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

type EnvVariableType string

EnvVariableType .

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

. .

type Environment

type Environment struct {
	ID                   int                   `json:"id,omitempty"`
	Name                 string                `json:"name,omitempty"`
	DeployType           DeployType            `json:"deployType,omitempty"`
	DeployTitle          string                `json:"deployTitle,omitempty"`
	DeployBaseRef        string                `json:"deployBaseRef,omitempty"`
	DeployHeadRef        string                `json:"deployHeadRef,omitempty"`
	AutoIdle             *int                  `json:"autoIdle,omitempty"`
	EnvironmentType      EnvType               `json:"environmentType,omitempty"`
	OpenshiftProjectName string                `json:"openshiftProjectName,omitempty"`
	Created              string                `json:"created,omitempty"`
	Deleted              string                `json:"deleted,omitempty"`
	Route                string                `json:"route,omitempty"`
	Routes               string                `json:"routes,omitempty"`
	EnvVariables         []EnvironmentVariable `json:"envVariables,omitempty"`
	Backups              []Backup              `json:"backups,omitempty"`
	Tasks                []Task                `json:"tasks,omitempty"`
	Project              int                   `json:"project,omitempty"`
	AdvancedTasks        []AdvancedTask        `json:"advancedTasks"`
}

Environment struct.

type EnvironmentBackups

type EnvironmentBackups struct {
	OpenshiftProjectName string `json:"openshiftProjectName"`
}

EnvironmentBackups struct.

type EnvironmentByName

type EnvironmentByName struct {
	Name    string `json:"name"`
	Project int    `json:"project"`
}

EnvironmentByName struct.

type EnvironmentVariable

type EnvironmentVariable struct {
	ID    int    `json:"id,omitempty"`
	Name  string `json:"name,omitempty"`
	Scope string `json:"scope,omitempty"`
	Value string `json:"value,omitempty"`
}

EnvironmentVariable struct.

type File

type File struct {
	ID       int    `json:"id,omitempty"`
	Filename string `json:"filename,omitempty"`
	Download string `json:"download,omitempty"`
	Created  string `json:"created,omitempty"`
}

File .

type Group

type Group struct {
	ID      string  `json:"id,omitempty"`
	Name    string  `json:"name,omitempty"`
	Groups  []Group `json:"groups,omitempty"`
	Members string  `json:"members,omitempty"`
}

Group struct.

type GroupMembership

type GroupMembership struct {
	User User      `json:"user"`
	Role GroupRole `json:"role"`
}

GroupMembership .

type GroupRole

type GroupRole string

GroupRole .

const (
	GuestRole      GroupRole = "GUEST"
	ReporterRole   GroupRole = "REPORTER"
	DeveloperRole  GroupRole = "DEVELOPER"
	MaintainerRole GroupRole = "MAINTAINER"
	OwnerRole      GroupRole = "OWNER"
)

Guest .

type Interface

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

Interface struct

func (*Interface) AddBackup

func (api *Interface) AddBackup(backup AddBackup) ([]byte, error)

AddBackup .

func (*Interface) AddDeployment

func (api *Interface) AddDeployment(deployment Deployment) ([]byte, error)

AddDeployment .

func (*Interface) AddGroup

func (api *Interface) AddGroup(group AddGroup) ([]byte, error)

AddGroup .

func (*Interface) AddGroupToProject

func (api *Interface) AddGroupToProject(group ProjectToGroup) ([]byte, error)

AddGroupToProject .

func (*Interface) AddGroupWithParent

func (api *Interface) AddGroupWithParent(group AddGroup) ([]byte, error)

AddGroupWithParent .

func (*Interface) AddOrUpdateEnvironment

func (api *Interface) AddOrUpdateEnvironment(environment AddUpdateEnvironment) ([]byte, error)

AddOrUpdateEnvironment .

func (*Interface) AddProject

func (api *Interface) AddProject(project ProjectPatch, fragment string) ([]byte, error)

AddProject .

func (*Interface) AddSSHKey

func (api *Interface) AddSSHKey(sshKey AddSSHKey) ([]byte, error)

AddSSHKey .

func (*Interface) AddUser

func (api *Interface) AddUser(user User) ([]byte, error)

AddUser .

func (*Interface) AddUserToGroup

func (api *Interface) AddUserToGroup(user AddUserToGroup) ([]byte, error)

AddUserToGroup .

func (*Interface) Debug

func (api *Interface) Debug(debug bool)

Debug .

func (*Interface) DeleteBackup

func (api *Interface) DeleteBackup(backup DeleteBackup) ([]byte, error)

DeleteBackup .

func (*Interface) DeleteEnvironment

func (api *Interface) DeleteEnvironment(environment DeleteEnvironment) ([]byte, error)

DeleteEnvironment .

func (*Interface) DeleteGroup

func (api *Interface) DeleteGroup(group AddGroup) ([]byte, error)

DeleteGroup .

func (*Interface) DeleteProject

func (api *Interface) DeleteProject(project Project) ([]byte, error)

DeleteProject .

func (*Interface) DeleteSSHKey

func (api *Interface) DeleteSSHKey(sshKey DeleteSSHKey) ([]byte, error)

DeleteSSHKey .

func (*Interface) DeleteUser

func (api *Interface) DeleteUser(user User) ([]byte, error)

DeleteUser .

func (*Interface) GetAllEnvironmentBackups

func (api *Interface) GetAllEnvironmentBackups() ([]byte, error)

GetAllEnvironmentBackups .

func (*Interface) GetAllProjects

func (api *Interface) GetAllProjects(fragment string) ([]byte, error)

GetAllProjects .

func (*Interface) GetDeploymentByRemoteID

func (api *Interface) GetDeploymentByRemoteID(deployment Deployment) ([]byte, error)

GetDeploymentByRemoteID .

func (*Interface) GetEnvironmentBackups

func (api *Interface) GetEnvironmentBackups(backups EnvironmentBackups) ([]byte, error)

GetEnvironmentBackups .

func (*Interface) GetEnvironmentByName

func (api *Interface) GetEnvironmentByName(environment EnvironmentByName, fragment string) ([]byte, error)

GetEnvironmentByName .

func (*Interface) GetEnvironmentByOpenshiftProjectName

func (api *Interface) GetEnvironmentByOpenshiftProjectName(environment Environment) ([]byte, error)

GetEnvironmentByOpenshiftProjectName .

func (*Interface) GetEnvironmentsForProject

func (api *Interface) GetEnvironmentsForProject(project Project) ([]byte, error)

GetEnvironmentsForProject .

func (*Interface) GetOpenShiftInfoForProject

func (api *Interface) GetOpenShiftInfoForProject(project Project) ([]byte, error)

GetOpenShiftInfoForProject .

func (*Interface) GetProductionEnvironmentForProject

func (api *Interface) GetProductionEnvironmentForProject(project Project) ([]byte, error)

GetProductionEnvironmentForProject .

func (*Interface) GetProjectByName

func (api *Interface) GetProjectByName(project Project, fragment string) ([]byte, error)

GetProjectByName .

func (*Interface) GetProjectsByGitURL

func (api *Interface) GetProjectsByGitURL(project Project) ([]byte, error)

GetProjectsByGitURL .

func (*Interface) GetRocketChatInfoForProject

func (api *Interface) GetRocketChatInfoForProject(project Project, fragment string) ([]byte, error)

GetRocketChatInfoForProject .

func (*Interface) GetSlackInfoForProject

func (api *Interface) GetSlackInfoForProject(project Project, fragment string) ([]byte, error)

GetSlackInfoForProject .

func (*Interface) GetUserBySSHKey

func (api *Interface) GetUserBySSHKey(sshKey SSHKeyValue) ([]byte, error)

GetUserBySSHKey .

func (*Interface) RemoveGroupFromProject

func (api *Interface) RemoveGroupFromProject(group ProjectToGroup) ([]byte, error)

RemoveGroupFromProject .

func (*Interface) RemoveUserFromGroup

func (api *Interface) RemoveUserFromGroup(user UserGroup) ([]byte, error)

RemoveUserFromGroup .

func (*Interface) Request

func (api *Interface) Request(request CustomRequest) ([]byte, error)

Request .

func (*Interface) RunQuery

func (api *Interface) RunQuery(graphQLQuery *graphql.Request, returnType interface{}) (interface{}, error)

RunQuery run a graphql query against an api endpoint, return the result

func (*Interface) SanitizeGroupName

func (api *Interface) SanitizeGroupName(name string) string

SanitizeGroupName .

func (*Interface) SanitizeProjectName

func (api *Interface) SanitizeProjectName(name string) string

SanitizeProjectName .

func (*Interface) SetEnvironmentServices

func (api *Interface) SetEnvironmentServices(environment SetEnvironmentServices) ([]byte, error)

SetEnvironmentServices .

func (*Interface) UpdateDeployment

func (api *Interface) UpdateDeployment(deployment UpdateDeployment) ([]byte, error)

UpdateDeployment .

func (*Interface) UpdateEnvironment

func (api *Interface) UpdateEnvironment(environment UpdateEnvironment) ([]byte, error)

UpdateEnvironment .

func (*Interface) UpdateGroup

func (api *Interface) UpdateGroup(group UpdateGroup) ([]byte, error)

UpdateGroup .

func (*Interface) UpdateProject

func (api *Interface) UpdateProject(project UpdateProject, fragment string) ([]byte, error)

UpdateProject .

func (*Interface) UpdateRestore

func (api *Interface) UpdateRestore(update UpdateRestore) ([]byte, error)

UpdateRestore .

func (*Interface) UpdateTask

func (api *Interface) UpdateTask(task UpdateTask) ([]byte, error)

UpdateTask .

func (*Interface) UpdateUser

func (api *Interface) UpdateUser(user UpdateUser) ([]byte, error)

UpdateUser .

type NotificationRocketChat

type NotificationRocketChat struct {
	ID      int    `json:"id,omitempty"`
	Name    string `json:"name,omitempty"`
	Webhook string `json:"webhook,omitempty"`
	Channel string `json:"channel,omitempty"`
}

NotificationRocketChat struct.

type NotificationSlack

type NotificationSlack struct {
	ID      int    `json:"id,omitempty"`
	Name    string `json:"name,omitempty"`
	Webhook string `json:"webhook,omitempty"`
	Channel string `json:"channel,omitempty"`
}

NotificationSlack struct.

type NotificationType

type NotificationType string

NotificationType .

const (
	SlackNotification          NotificationType = "SLACK"
	RocketChatNotification     NotificationType = "ROCKETCHAT"
	EmailNotification          NotificationType = "EMAIL"
	MicrosoftTeamsNotification NotificationType = "MICROSOFTTEAMS"
	WebhookNotification        NotificationType = "WEBHOOK"
)

. .

type Openshift

type Openshift struct {
	ID            int    `json:"id,omitempty"`
	Name          string `json:"name,omitempty"`
	ConsoleURL    string `json:"consoleUrl,omitempty"`
	Token         string `json:"token,omitempty"`
	RouterPattern string `json:"routerPattern,omitempty"`
	ProjectUser   string `json:"projectUser,omitempty"`
	SSHHost       string `json:"sshHost,omitempty"`
	SSHPort       string `json:"sshPort,omitempty"`
	Created       string `json:"created,omitempty"`
}

Openshift struct.

type Project

type Project struct {
	ID                           int                   `json:"id,omitempty"`
	Name                         string                `json:"name,omitempty"`
	GitURL                       string                `json:"gitUrl,omitempty"`
	PrivateKey                   string                `json:"privateKey,omitempty"`
	PublicKey                    string                `json:"publicKey,omitempty"`
	Subfolder                    string                `json:"subfolder,omitempty"`
	RouterPattern                string                `json:"routerPattern,omitempty"`
	Branches                     string                `json:"branches,omitempty"`
	Pullrequests                 string                `json:"pullrequests,omitempty"`
	ProductionEnvironment        string                `json:"productionEnvironment,omitempty"`
	StandbyProductionEnvironment string                `json:"standbyProductionEnvironment,omitempty"`
	AutoIdle                     *int                  `json:"autoIdle,omitempty"`
	StorageCalc                  *int                  `json:"storageCalc,omitempty"`
	OpenshiftProjectPattern      string                `json:"openshiftProjectPattern,omitempty"`
	DevelopmentEnvironmentsLimit int                   `json:"developmentEnvironmentsLimit,omitempty"`
	Created                      string                `json:"created,omitempty"`
	Openshift                    Openshift             `json:"openshift,omitempty"`
	EnvVariables                 []EnvironmentVariable `json:"envVariables,omitempty"`
	Environments                 []Environment         `json:"environments,omitempty"`
	Deployments                  []Deployment          `json:"deployments,omitempty"`
	Notifications                []interface{}         `json:"notifications,omitempty"`
	FactsUI                      *int                  `json:"factsUi,omitempty"`
	ProblemsUI                   *int                  `json:"problemsUi,omitempty"`
}

Project struct.

type ProjectGroups

type ProjectGroups struct {
	Project Project `json:"project"`
	Groups  []Group `json:"groups"`
}

ProjectGroups struct.

type ProjectOrderType

type ProjectOrderType string

ProjectOrderType .

const (
	NameProjectOrder    ProjectOrderType = "NAME"
	CreatedProjectOrder ProjectOrderType = "UPCREATEDDATED"
)

. .

type ProjectPatch

type ProjectPatch struct {
	ID                           int    `json:"id,omitempty"`
	Name                         string `json:"name,omitempty"`
	GitURL                       string `json:"gitUrl,omitempty"`
	PrivateKey                   string `json:"privateKey,omitempty"`
	Subfolder                    string `json:"subfolder,omitempty"`
	RouterPattern                string `json:"routerPattern,omitempty"`
	Branches                     string `json:"branches,omitempty"`
	Pullrequests                 string `json:"pullrequests,omitempty"`
	ProductionEnvironment        string `json:"productionEnvironment,omitempty"`
	StandbyProductionEnvironment string `json:"standbyProductionEnvironment,omitempty"`
	AutoIdle                     *int   `json:"autoIdle,omitempty"`
	StorageCalc                  *int   `json:"storageCalc,omitempty"`
	OpenshiftProjectPattern      string `json:"openshiftProjectPattern,omitempty"`
	DevelopmentEnvironmentsLimit *int   `json:"developmentEnvironmentsLimit,omitempty"`
	Openshift                    *int   `json:"openshift,omitempty"`
	FactsUI                      *int   `json:"factsUi,omitempty"`
	ProblemsUI                   *int   `json:"problemsUi,omitempty"`
	DeploymentsDisabled          *int   `json:"deploymentsDisabled,omitempty"`
}

ProjectPatch struct.

type ProjectToGroup

type ProjectToGroup struct {
	Project string `json:"project"`
	Group   string `json:"group"`
}

ProjectToGroup struct.

type Projects

type Projects struct {
	Projects []Project //`json:"allProjects"`
}

Projects struct.

type RemoveNotificationFromProject

type RemoveNotificationFromProject struct {
	Project          string           `json:"project"`
	NotificationType NotificationType `json:"notificationType"`
	NotificationName string           `json:"notificationName"`
}

RemoveNotificationFromProject struct.

type Restore

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

Restore struct.

type RestoreStatusType

type RestoreStatusType string

RestoreStatusType .

const (
	PendingRestore    RestoreStatusType = "PENDING"
	SuccessfulRestore RestoreStatusType = "SUCCESSFUL"
	FailedRestore     RestoreStatusType = "FAILED"
)

Pending .

type RocketChats

type RocketChats struct {
	RocketChats []NotificationRocketChat `json:"rocketchats"`
}

RocketChats struct.

type SSHKey

type SSHKey struct {
	ID             int        `json:"id,omitempty"`
	Name           string     `json:"name,omitempty"`
	KeyValue       string     `json:"keyValue,omitempty"`
	KeyType        SSHKeyType `json:"keyType,omitempty"`
	KeyFingerprint string     `json:"keyFingerprint,omitempty"`
}

SSHKey .

type SSHKeyType

type SSHKeyType string

SSHKeyType .

const (
	SSHRsa      SSHKeyType = "SSH_RSA"
	SSHEd25519  SSHKeyType = "SSH_ED25519"
	SSHECDSA256 SSHKeyType = "ECDSA_SHA2_NISTP256"
	SSHECDSA384 SSHKeyType = "ECDSA_SHA2_NISTP384"
	SSHECDSA521 SSHKeyType = "ECDSA_SHA2_NISTP521"
)

. .

type SSHKeyValue

type SSHKeyValue string

SSHKeyValue .

type SetEnvironmentServices

type SetEnvironmentServices struct {
	Environment int      `json:"environment"`
	Services    []string `json:"services"`
}

SetEnvironmentServices struct.

type Slacks

type Slacks struct {
	Slacks []NotificationSlack `json:"slacks"`
}

Slacks struct.

type Task

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

Task struct.

type TaskStatusType

type TaskStatusType string

TaskStatusType .

const (
	ActiveTask    TaskStatusType = "ACTIVE"
	SucceededTask TaskStatusType = "SUCCEEDED"
	FailedTask    TaskStatusType = "FAILED"
)

. .

type UnassignedNotification

type UnassignedNotification struct {
	ID   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
	Type string `json:"type,omitempty"`
}

UnassignedNotification struct.

type UpdateDeployment

type UpdateDeployment struct {
	ID    int        `json:"id"`
	Patch Deployment `json:"patch"`
}

UpdateDeployment struct.

type UpdateEnvironment

type UpdateEnvironment struct {
	ID    int         `json:"id"`
	Patch Environment `json:"patch"`
}

UpdateEnvironment struct.

type UpdateGroup

type UpdateGroup struct {
	Group Group `json:"group"`
	Patch Group `json:"patch"`
}

UpdateGroup struct.

type UpdateNotificationRocketChatInput

type UpdateNotificationRocketChatInput struct {
	ID    int                               `json:"id"`
	Patch UpdateNotificationRocketChatPatch `json:"patch"`
}

UpdateNotificationRocketChatInput struct.

type UpdateNotificationRocketChatPatch

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

UpdateNotificationRocketChatPatch struct.

type UpdateNotificationSlack

type UpdateNotificationSlack struct {
	ID    int                          `json:"id"`
	Patch UpdateNotificationSlackPatch `json:"patch"`
}

UpdateNotificationSlack struct.

type UpdateNotificationSlackPatch

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

UpdateNotificationSlackPatch struct.

type UpdateOpenshift

type UpdateOpenshift struct {
	ID    int       `json:"id"`
	Patch Openshift `json:"patch"`
}

UpdateOpenshift struct.

type UpdateProject

type UpdateProject struct {
	ID    int          `json:"id"`
	Patch ProjectPatch `json:"patch"`
}

UpdateProject struct.

type UpdateRestore

type UpdateRestore struct {
	BackupID string             `json:"backupId"`
	Patch    UpdateRestorePatch `json:"patch"`
}

UpdateRestore struct.

type UpdateRestorePatch

type UpdateRestorePatch struct {
	Status          string `json:"status,omitempty"`
	Created         string `json:"created,omitempty"`
	RestoreLocation string `json:"restoreLocation,omitempty"`
}

UpdateRestorePatch struct.

type UpdateSSHKey

type UpdateSSHKey struct {
	ID    int               `json:"id"`
	Patch UpdateSSHKeyPatch `json:"patch"`
}

UpdateSSHKey struct.

type UpdateSSHKeyPatch

type UpdateSSHKeyPatch struct {
	Name     string     `json:"name,omitempty"`
	KeyValue string     `json:"keyValue,omitempty"`
	KeyType  SSHKeyType `json:"keyType,omitempty"`
}

UpdateSSHKeyPatch struct.

type UpdateTask

type UpdateTask struct {
	ID    int  `json:"id"`
	Patch Task `json:"patch"`
}

UpdateTask struct.

type UpdateUser

type UpdateUser struct {
	User  User `json:"user"`
	Patch User `json:"patch"`
}

UpdateUser struct.

type UploadFilesForTask

type UploadFilesForTask struct {
	Task int `json:"task"`
}

UploadFilesForTask struct.

type User

type User struct {
	ID        string   `json:"id,omitempty"`
	Email     string   `json:"email,omitempty"`
	FirstName string   `json:"firstName,omitempty"`
	LastName  string   `json:"lastName,omitempty"`
	Comment   string   `json:"comment,omitempty"`
	GitlabID  int      `json:"gitlabId,omitempty"`
	SSHKeys   []SSHKey `json:"sshKeys,omitempty"`
	Groups    []Group  `json:"groups,omitempty"`
}

User struct.

type UserGroup

type UserGroup struct {
	User  User  `json:"user"`
	Group Group `json:"group"`
}

UserGroup struct.

type UserGroupRole

type UserGroupRole struct {
	User  User      `json:"user"`
	Group Group     `json:"group"`
	Role  GroupRole `json:"role"`
}

UserGroupRole struct.

Jump to

Keyboard shortcuts

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