model

package
v0.15.3 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2019 License: EPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusIdle BrokerStatus = "IDLE"

	StatusStarted BrokerStatus = "STARTED"

	StatusDone BrokerStatus = "DONE"

	StatusFailed BrokerStatus = "FAILED"

	BrokerStatusEventType = "broker/statusChanged"

	BrokerResultEventType = "broker/result"

	BrokerLogEventType = "broker/log"
)

Broker statuses

Variables

This section is empty.

Functions

This section is empty.

Types

type BrokerStatus

type BrokerStatus string

type CheDependencies

type CheDependencies struct {
	Plugins []CheDependency `json:"plugins" yaml:"plugins"`
}

type CheDependency

type CheDependency struct {
	ID       string `json:"id" yaml:"id"`
	Version  string `json:"version" yaml:"version"`
	Location string `json:"location" yaml:"location"`
	URL      string `json:"url" yaml:"url"`
}

type ChePlugin added in v0.4.0

type ChePlugin struct {
	ID      string `json:"id" yaml:"id"`
	Version string `json:"version" yaml:"version"`
	//Name should not be propagated until Che Server requires it to have the following format "[a-z0-9]([-a-z0-9]*[a-z0-9])?"
	//while it is not respected by all of plugin
	//See https://github.com/eclipse/che/blob/251e5e261bac2bf4c93f113e52fd18d26b5989ab/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/wsplugins/KubernetesPluginsToolingValidator.java#L27
	//Name       string      `json:"name" yaml:"name"`
	Endpoints    []Endpoint  `json:"endpoints" yaml:"endpoints"`
	Containers   []Container `json:"containers" yaml:"containers"`
	Editors      []Editor    `json:"editors" yaml:"editors"`
	WorkspaceEnv []EnvVar    `json:"workspaceEnv" yaml:"workspaceEnv"`
}

type Container

type Container struct {
	Name           string          `json:"name" yaml:"name"`
	Image          string          `json:"image" yaml:"image"`
	Env            []EnvVar        `json:"env" yaml:"env"`
	EditorCommands []EditorCommand `json:"editorCommands" yaml:"editorCommands"`
	Volumes        []Volume        `json:"volumes" yaml:"volumes"`
	Ports          []ExposedPort   `json:"ports" yaml:"ports"`
	MemoryLimit    string          `json:"memoryLimit" yaml:"memoryLimit"`
	MountSources   bool            `json:"mountSources" yaml:"mountSources"`
}

type Editor

type Editor struct {
	ID      string   `json:"id" yaml:"id"`
	Plugins []string `json:"plugins" yaml:"plugins"`
}

type EditorCommand

type EditorCommand struct {
	Name       string   `json:"name" yaml:"name"`
	WorkingDir string   `json:"workingDir" yaml:"workingDir"`
	Command    []string `json:"command" yaml:"command"`
}

type Endpoint

type Endpoint struct {
	Name       string            `json:"name" yaml:"name"`
	Public     bool              `json:"public" yaml:"public"`
	TargetPort int               `json:"targetPort" yaml:"targetPort"`
	Attributes map[string]string `json:"attributes" yaml:"attributes"`
}

type EnvVar

type EnvVar struct {
	Name  string `json:"name" yaml:"name"`
	Value string `json:"value" yaml:"value"`
}

type ErrorEvent

type ErrorEvent struct {
	Status    BrokerStatus `json:"status" yaml:"status"`
	RuntimeID RuntimeID    `json:"runtimeId" yaml:"runtimeId"`
	Error     string       `json:"error" yaml:"error"`
}

func (*ErrorEvent) Type

func (e *ErrorEvent) Type() string

Type returns BrokerStatusEventType.

type ExposedPort

type ExposedPort struct {
	ExposedPort int `json:"exposedPort" yaml:"exposedPort"`
}

type PackageJSON added in v0.10.0

type PackageJSON struct {
	Name      string `json:"name" yaml:"name"`
	Publisher string `json:"publisher" yaml:"publisher"`
}

PackageJSON represents package.json file of JS based projects

type PluginBrokerLogEvent added in v0.2.0

type PluginBrokerLogEvent struct {
	RuntimeID RuntimeID `json:"runtimeId" yaml:"runtimeId"`

	// Time when this event occurred.
	Time time.Time `json:"time" yaml:"text"`

	// Text is written by plugin broker line of text.
	Text string `json:"text" yaml:"text"`
}

func (*PluginBrokerLogEvent) Type added in v0.2.0

func (e *PluginBrokerLogEvent) Type() string

Type returns BrokerLogEventType.

type PluginFQN added in v0.15.2

type PluginFQN struct {
	Registry string `json:"registry,omitempty" yaml:"registry,omitempty"`
	ID       string `json:"id" yaml:"id"`
	Version  string `json:"version" yaml:"version"`
}

type PluginMeta

type PluginMeta struct {
	ID string `json:"id" yaml:"id"`

	Name string `json:"name" yaml:"name"`

	Type string `json:"type" yaml:"type"`

	Description string `json:"description" yaml:"description"`

	Version string `json:"version" yaml:"version"`

	Title string `json:"title" yaml:"title"`

	Icon string `json:"icon" yaml:"icon"`

	URL string `json:"url" yaml:"url"`

	Attributes map[string]string `json:"attributes" yaml:"attributes"`

	Extensions []string `json:"extensions" yaml:"extensions"`
}

type RuntimeID added in v0.2.0

type RuntimeID struct {
	// Workspace is an identifier of the workspace e.g. "workspace123456".
	Workspace string `json:"workspaceId" yaml:"workspaceId"`

	// Environment is a name of environment e.g. "default".
	Environment string `json:"envName" yaml:"envName"`

	// OwnerId is an identifier of user who is runtime owner.
	OwnerId string `json:"ownerId" yaml:"ownerId"`
}

RuntimeID is an identifier of running workspace. Included to the plugin broker log events.

type StartedEvent

type StartedEvent struct {
	Status    BrokerStatus `json:"status" yaml:"status"`
	RuntimeID RuntimeID    `json:"runtimeId" yaml:"runtimeId"`
}

func (*StartedEvent) Type

func (e *StartedEvent) Type() string

Type returns BrokerStatusEventType.

type SuccessEvent

type SuccessEvent struct {
	Status    BrokerStatus `json:"status" yaml:"status"`
	RuntimeID RuntimeID    `json:"runtimeId" yaml:"runtimeId"`
	Tooling   string       `json:"tooling" yaml:"tooling"`
}

SuccessEvent is used to send encoded workspace tooling configuration to Che master

func (*SuccessEvent) Type

func (e *SuccessEvent) Type() string

Type returns BrokerResultEventType.

type ToolingConf

type ToolingConf struct {
	Endpoints    []Endpoint  `json:"endpoints" yaml:"endpoints"`
	Containers   []Container `json:"containers" yaml:"containers"`
	Editors      []Editor    `json:"editors" yaml:"editors"`
	WorkspaceEnv []EnvVar    `json:"workspaceEnv" yaml:"workspaceEnv"`
}

type Volume

type Volume struct {
	MountPath string `json:"mountPath" yaml:"mountPath"`
	Name      string `json:"name" yaml:"name"`
}

Jump to

Keyboard shortcuts

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