plugins

package
v0.0.0-...-0637115 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2020 License: Apache-2.0 Imports: 8 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEventName

func GetEventName(s string) transistor.EventName

GetEventName returns registered events.

func GetRegexParams

func GetRegexParams(regEx, url string) (paramsMap map[string]string)

func GetSlug

func GetSlug(name string) string

func HstoreToMapStringString

func HstoreToMapStringString(hstore map[string]*string) map[string]string

func MapStringStringToHstore

func MapStringStringToHstore(mapStringString map[string]string) map[string]*string

Types

type DeploymentStrategy

type DeploymentStrategy struct {
	Type           Type  `json:"type"`
	MaxUnavailable int32 `json:"maxUnavailable,string`
	MaxSurge       int32 `json:"MaxSurge,string`
}

type Feature

type Feature struct {
	ID         string    `json:"id"`
	Hash       string    `json:"hash"`
	ParentHash string    `json:"parentHash"`
	User       string    `json:"user"`
	Message    string    `json:"message"`
	Created    time.Time `json:"created"`
}

Feature event data struct

type Git

type Git struct {
	Url           string `json:"gitUrl"`
	Protocol      string `json:"protocol"`
	Branch        string `json:"branch"`
	Workdir       string `json:"workdir"`
	HeadHash      string `json:"headHash,omitempty"`
	RsaPrivateKey string `json:"rsaPrivateKey" role:"secret"`
	RsaPublicKey  string `json:"rsaPublicKey" role:"secret"`
}

Git event data struct

type GitCommit

type GitCommit struct {
	Repository string    `json:"repository"`
	User       string    `json:"user"`
	Message    string    `json:"message"`
	Ref        string    `json:"ref"`
	Hash       string    `json:"hash"`
	ParentHash string    `json:"parentHash"`
	Head       bool      `json:"head"`
	Created    time.Time `json:"created"`
}

GitCommit event data struct

type GitSync

type GitSync struct {
	Project Project     `json:"project"`
	Git     Git         `json:"git"`
	From    string      `json:"from"`
	Commits []GitCommit `json:"commits"`
}

GitSync event data struct

type HealthProbeHttpHeader

type HealthProbeHttpHeader struct {
	// Name
	Name string `json:"name"`
	// Value
	Value string `json:"value"`
}

type HeartBeat

type HeartBeat struct {
	Tick string `json:"tick"`
}

HeartBeat event data struct

type Listener

type Listener struct {
	Port     int32  `json:"port"`
	Protocol string `json:"protocol"`
}

Listener event data struct

type ListenerPair

type ListenerPair struct {
	Source      Listener `json:"source"`
	Destination Listener `json:"destination"`
}

ListenerPair event data struct

type NotificationExtension

type NotificationExtension struct {
	ID          string  `json:"id"`
	Project     Project `json:"project"`
	Release     Release `json:"release"`
	Environment string  `json:"environment"`
}

NotificationExtension event data struct

type Project

type Project struct {
	ID         string `json:"id"`
	Slug       string `json:"slug"`
	Repository string `json:"repository"`
}

Project event data struct

type ProjectExtension

type ProjectExtension struct {
	ID          string  `json:"id"`
	Project     Project `json:"project"`
	Environment string  `json:"environment"`
}

ProjectExtension event data struct

type Release

type Release struct {
	ID          string    `json:"id"`
	Project     Project   `json:"project"`
	Git         Git       `json:"git"`
	HeadFeature Feature   `json:"headFeature"`
	User        string    `json:"user"`
	TailFeature Feature   `json:"tailFeature"`
	Services    []Service `json:"services"`
	Secrets     []Secret  `json:"secrets" role:"secret"`
	Environment string    `json:"environment"`
	IsRollback  bool      `json:"isRollback"`
}

Release event data struct

type ReleaseExtension

type ReleaseExtension struct {
	ID          string  `json:"id"`
	Project     Project `json:"project"`
	Release     Release `json:"release"`
	Environment string  `json:"environment"`
}

ReleaseExtension event data struct

type ScheduledBranchReleaser

type ScheduledBranchReleaser struct {
	ProjectExtension  `json:"projectextension"`
	Git               `json:"git"`
	ProjectSettingsID string `json:"projectSettingsID"`
}

ScheduledBranchReleaser data struct

type Secret

type Secret struct {
	Key   string `json:"key"`
	Value string `json:"value" role:"secret"`
	Type  Type   `json:"type"`
}

Secret event data struct

type Service

type Service struct {
	ID        string      `json:"id"`
	Name      string      `json:"name"`
	Command   string      `json:"command"`
	Listeners []Listener  `json:"listeners"`
	Replicas  int64       `json:"replicas"`
	Spec      ServiceSpec `json:"spec"`
	Type      string      `json:"type"`

	State              transistor.State   `json:"state"`
	StateMessage       string             `json:"stateMessage"`
	Action             transistor.Action  `json:"action"`
	DeploymentStrategy DeploymentStrategy `json:"deploymentStrategy"`
	ReadinessProbe     ServiceHealthProbe `json:"readinessProbe"`
	LivenessProbe      ServiceHealthProbe `json:"livenessProbe"`
	PreStopHook        string             `json:"preStopHook"`
}

Service event data struct

type ServiceHealthProbe

type ServiceHealthProbe struct {
	// ServiceID
	ServiceID uuid.UUID `bson:"serviceID" json:"-" gorm:"type:uuid"`
	// Type: required; accepts `readinessProbe` and `livenessProbe`
	Type Type `json:"type"`
	// Method: required; accepts `exec`, `http`, and `tcp`
	Method string `json:"method"`
	// Command: Required with Method `exec`
	Command string `json:"command"`
	// Port: Required with Method `http` or `tcp`
	Port int32 `json:"port"`
	// Scheme: required with method `http`; accepts `http` or `https`
	Scheme string `json:"scheme"`
	// Path: required with Method `http`
	Path string `json:"path"`
	// InitialDelaySeconds is the delay before the probe begins to evaluate service health
	InitialDelaySeconds int32 `json:"initialDelaySeconds"`
	// PeriodSeconds is how frequently the probe is executed
	PeriodSeconds int32 `json:"periodSeconds"`
	// TimeoutSeconds is the number of seconds before the probe times out
	TimeoutSeconds int32 `json:"timeoutSeconds"`
	// SuccessThreshold minimum consecutive success before the probe is considered successfull
	SuccessThreshold int32 `json:"successThreshold"`
	// FailureThreshold is the number of attempts before a probe is considered failed
	FailureThreshold int32 `json:"failureThreshold"`
	// HttpHeaders
	HttpHeaders []HealthProbeHttpHeader `json:"httpHeaders"`
}

type ServiceSpec

type ServiceSpec struct {
	ID                            string `json:"id"`
	CpuRequest                    string `json:"cpuRequest"`
	CpuLimit                      string `json:"cpuLimit"`
	MemoryRequest                 string `json:"memoryRequest"`
	MemoryLimit                   string `json:"memoryLimit"`
	TerminationGracePeriodSeconds int64  `json:"terminationGracePeriodSeconds"`
}

ServiceSpec event data struct

type Type

type Type string

Type is the plugins Type data structure

func GetType

func GetType(s string) Type

GetType returns registered plugin values of type Type

type WebsocketMsg

type WebsocketMsg struct {
	Channel string      `json:"channel"`
	Event   string      `json:"event"`
	Payload interface{} `json:"data" role:"secret"`
}

WebsocketMsg event data struct

Jump to

Keyboard shortcuts

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