spaces

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationUpdate added in v1.2.0

type ApplicationUpdate struct {
	ID                string                        `json:"id"`
	StartedAt         time.Time                     `json:"startedAt"`
	CompletedAt       time.Time                     `json:"completedAt"`
	Status            string                        `json:"status"`
	VersionConstraint string                        `json:"versionConstraint"`
	ExactVersion      ApplicationUpdateExactVersion `json:"exactVersion"`
	Progress          ApplicationUpdateProgress     `json:"progress"`
	SourceStage       StageRef                      `json:"sourceStage"`
	TargetStage       StageRef                      `json:"targetStage"`
}

type ApplicationUpdateExactVersion added in v1.2.0

type ApplicationUpdateExactVersion struct {
	Number string `json:"number"`
}

type ApplicationUpdateInput added in v1.2.0

type ApplicationUpdateInput struct {
	VersionConstraint string    `json:"versionConstraint"`
	TargetStage       *StageRef `json:"targetStage,omitempty"`
}

type ApplicationUpdateProgress added in v1.2.0

type ApplicationUpdateProgress struct {
	CurrentStep int    `json:"currentStep"`
	TotalSteps  int    `json:"totalSteps"`
	Status      string `json:"status"`
}

type CommandCronjobExecution added in v1.1.0

type CommandCronjobExecution struct {
	Date     time.Time `json:"date"`
	ExitCode int       `json:"exitCode,omitempty"`
}

type Cronjob added in v1.1.0

type Cronjob struct {
	ID            string     `json:"id,omitempty"`
	Schedule      string     `json:"schedule"`
	AllowParallel bool       `json:"allowParallel"`
	Job           CronjobJob `json:"job"`
	Timezone      string     `json:"timezone"`
}

type CronjobJob added in v1.1.0

type CronjobJob struct {
	Type             string                   `json:"type"`
	Command          string                   `json:"command,omitempty"`
	Arguments        []string                 `json:"arguments,omitempty"`
	WorkingDirectory string                   `json:"workingDirectory,omitempty"`
	NextExecution    *CommandCronjobExecution `json:"nextExecution,omitempty"`
	LastExecution    *CommandCronjobExecution `json:"lastExecution,omitempty"`
}

type Empty

type Empty struct{}

type SoftwareRef

type SoftwareRef struct {
	ID   string `json:"id"`
	HREF string `json:"href,omitempty"`
}

type SoftwareVersionRef added in v1.3.0

type SoftwareVersionRef struct {
	Software          SoftwareRef `json:"software"`
	VersionConstraint string      `json:"versionConstraint"`
	UserData          interface{} `json:"userData,omitempty"`
}

type Space

type Space struct {
	ID        string            `json:"id"`
	Links     lowlevel.LinkList `json:"_links"`
	Name      SpaceName         `json:"name"`
	CreatedAt time.Time         `json:"createdAt"`
	Status    string            `json:"status"`
	DNSNames  []string          `json:"dnsNames"`
	Stages    []Stage           `json:"stages"`
	Team      TeamRef           `json:"team"`
	Running   bool              `json:"running"`
}

func (Space) StagesCount

func (s Space) StagesCount() int

func (Space) StagesNames

func (s Space) StagesNames() []string

type SpaceDeclaration

type SpaceDeclaration struct {
	Name   SpaceName          `json:"name"`
	Stages []StageDeclaration `json:"stages"`
}

type SpaceName

type SpaceName struct {
	DNSName           string `json:"dnsName"`
	HumanReadableName string `json:"humanReadableName"`
}

type SpacesClient

type SpacesClient interface {
	List() ([]Space, error)
	ListByTeam(teamID string) ([]Space, error)
	Declare(teamID string, declaration *SpaceDeclaration) (*Space, error)
	GetByID(spaceID string) (*Space, error)
	GetByTeamAndName(teamIDOrName string, spaceIDOrName string) (*Space, error)
	Delete(spaceID string) error
	UpdateApplication(spaceID, stage, targetStage, version string) (*ApplicationUpdate, error)
	ListApplicationUpdatesByStage(spaceID, stage string) ([]ApplicationUpdate, error)
	ListApplicationUpdatesBySpace(spaceID string) ([]ApplicationUpdate, error)
}

func NewSpacesClient

func NewSpacesClient(client *lowlevel.SpacesLowlevelClient, logger *log.Logger) SpacesClient

type Stage

type Stage struct {
	Links   lowlevel.LinkList `json:"_links"`
	Actions lowlevel.LinkList `json:"_actions"`

	Name              string      `json:"name"`
	Application       SoftwareRef `json:"application"`
	Cronjobs          []Cronjob   `json:"cronjobs"`
	Version           VersionRef  `json:"version"`
	VersionConstraint string      `json:"versionConstraint"`
	UserData          interface{} `json:"userData"`
	DNSNames          []string    `json:"dnsNames"`
	Running           bool        `json:"running"`
}

type StageDeclaration

type StageDeclaration struct {
	Name              string               `json:"name"`
	Application       SoftwareRef          `json:"application"`
	Databases         []SoftwareVersionRef `json:"databases"`
	Cronjobs          []Cronjob            `json:"cronjobs"`
	VersionConstraint string               `json:"versionConstraint"`
	UserData          interface{}          `json:"userData"`
}

type StageRef added in v1.2.0

type StageRef struct {
	Name string `json:"name"`
	HREF string `json:"href,omitempty"`
}

type TeamRef

type TeamRef struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	DNSLabel string `json:"dnsLabel"`
}

type VersionRef

type VersionRef struct {
	Number string `json:"number"`
}

Jump to

Keyboard shortcuts

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