appv2

package
v0.2.129 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action string

An Action is a string that describes a runtime concerning action which can be executed on an AppInstallation or an App can be capable of.

const ActionRestart Action = "restart"
const ActionStart Action = "start"
const ActionStop Action = "stop"

func (Action) Validate

func (e Action) Validate() error

type ActionCapabilities

type ActionCapabilities []Action

type AdditionalValidationSchema added in v0.2.85

type AdditionalValidationSchema struct {
	Kind   *AdditionalValidationSchemaKind `json:"kind,omitempty"`
	Schema *string                         `json:"schema,omitempty"`
}

AdditionalValidationSchema is a stringified custom validation schema, e.g password rules.

func (*AdditionalValidationSchema) Validate added in v0.2.85

func (o *AdditionalValidationSchema) Validate() error

type AdditionalValidationSchemaKind added in v0.2.85

type AdditionalValidationSchemaKind string

AdditionalValidationSchemaKind is an enum, describing the possible types of an additional validation schema.

const AdditionalValidationSchemaKindPasswordRule AdditionalValidationSchemaKind = "password-rule"

func (AdditionalValidationSchemaKind) Validate added in v0.2.85

type App

type App struct {
	ActionCapabilities ActionCapabilities `json:"actionCapabilities,omitempty"`
	Id                 string             `json:"id"`
	Name               string             `json:"name"`
	Tags               []string           `json:"tags"`
}

An App is to be understood as a manifest for AppInstallations. E.g. 'WordPress' only exists inside our ecosystem, because there is an App -Manifest for it.

func (*App) Validate

func (o *App) Validate() error

type AppInstallation

type AppInstallation struct {
	AppId              string                    `json:"appId"`
	AppVersion         VersionStatus             `json:"appVersion"`
	CreatedAt          time.Time                 `json:"createdAt"`
	CustomDocumentRoot *string                   `json:"customDocumentRoot,omitempty"`
	DeletionRequested  *bool                     `json:"deletionRequested,omitempty"`
	Description        string                    `json:"description"`
	Disabled           bool                      `json:"disabled"`
	Id                 string                    `json:"id"`
	InstallationPath   string                    `json:"installationPath"`
	LinkedDatabases    []LinkedDatabase          `json:"linkedDatabases"`
	LockedBy           map[string]LockPurpose    `json:"lockedBy,omitempty"`
	Phase              Phase                     `json:"phase"`
	ProjectId          string                    `json:"projectId"`
	ScreenshotId       *string                   `json:"screenshotId,omitempty"`
	ScreenshotRef      *string                   `json:"screenshotRef,omitempty"`
	ShortId            string                    `json:"shortId"`
	SystemSoftware     []InstalledSystemSoftware `json:"systemSoftware"`
	UpdatePolicy       AppUpdatePolicy           `json:"updatePolicy"`
	UserInputs         []SavedUserInput          `json:"userInputs"`
}

An AppInstallation is a concrete manifestation of an App in a specific AppVersion.

func (*AppInstallation) Validate

func (o *AppInstallation) Validate() error

type AppInstallationLifecycle

type AppInstallationLifecycle string

The AppInstallationLifecycle can be used to express a specific point in the AppInstallation Lifecycle, e.g. while installing a new AppInstallation.

const AppInstallationLifecycleInstallation AppInstallationLifecycle = "installation"
const AppInstallationLifecycleReconfigure AppInstallationLifecycle = "reconfigure"
const AppInstallationLifecycleUpdate AppInstallationLifecycle = "update"

func (AppInstallationLifecycle) Validate

func (e AppInstallationLifecycle) Validate() error

type AppInstallationStatus

type AppInstallationStatus struct {
	LastExitCode    *int64                     `json:"lastExitCode,omitempty"`
	LogFileLocation string                     `json:"logFileLocation"`
	State           AppInstallationStatusState `json:"state"`
	UptimeSeconds   *float64                   `json:"uptimeSeconds,omitempty"`
}

AppInstallationStatus describes the overall runtime status of an AppInstallation.

func (*AppInstallationStatus) Validate

func (o *AppInstallationStatus) Validate() error

type AppInstallationStatusState

type AppInstallationStatusState string
const AppInstallationStatusStateExited AppInstallationStatusState = "exited"
const AppInstallationStatusStateRunning AppInstallationStatusState = "running"
const AppInstallationStatusStateStopped AppInstallationStatusState = "stopped"

func (AppInstallationStatusState) Validate

func (e AppInstallationStatusState) Validate() error

type AppJobImage

type AppJobImage struct {
	ImageTemplate string `json:"imageTemplate"`
}

func (*AppJobImage) Validate

func (o *AppJobImage) Validate() error

type AppJobImages

type AppJobImages struct {
	ReconfigureImage AppJobImage `json:"reconfigureImage"`
	SetupImage       AppJobImage `json:"setupImage"`
	UninstallImage   AppJobImage `json:"uninstallImage"`
	UpgradeImage     AppJobImage `json:"upgradeImage"`
}

func (*AppJobImages) Validate

func (o *AppJobImages) Validate() error

type AppUpdatePolicy

type AppUpdatePolicy string

AppUpdatePolicy describes which updates should be applied automatically by our systems.

const AppUpdatePolicyAll AppUpdatePolicy = "all"
const AppUpdatePolicyNone AppUpdatePolicy = "none"
const AppUpdatePolicyPatchLevel AppUpdatePolicy = "patchLevel"

func (AppUpdatePolicy) Validate

func (e AppUpdatePolicy) Validate() error

type AppVersion

type AppVersion struct {
	AppId                      string                     `json:"appId"`
	BackendPathTemplate        *string                    `json:"backendPathTemplate,omitempty"`
	BreakingNote               *BreakingNote              `json:"breakingNote,omitempty"`
	Databases                  []DatabaseDependency       `json:"databases,omitempty"`
	DefaultCronjobs            []DefaultCronjob           `json:"defaultCronjobs,omitempty"`
	DocRoot                    string                     `json:"docRoot"`
	DocRootUserEditable        bool                       `json:"docRootUserEditable"`
	ExternalVersion            string                     `json:"externalVersion"`
	Id                         string                     `json:"id"`
	InternalVersion            string                     `json:"internalVersion"`
	Recommended                *bool                      `json:"recommended,omitempty"`
	RequestHandler             *RequestHandlerRequirement `json:"requestHandler,omitempty"`
	SystemSoftwareDependencies []SystemSoftwareDependency `json:"systemSoftwareDependencies,omitempty"`
	UserInputs                 []UserInput                `json:"userInputs,omitempty"`
}

An AppVersion is an officially supported version of an App, containing the necessary and recommended configuration und dependencies.

func (*AppVersion) Validate

func (o *AppVersion) Validate() error

type BreakingNote

type BreakingNote struct {
	FaqLink string `json:"faqLink"`
}

A BreakingNote is a hint that something serious has changed in the AppVersion containing it, so an automatic update is not possible.

func (*BreakingNote) Validate

func (o *BreakingNote) Validate() error

type CronjobCommand added in v0.2.99

type CronjobCommand struct {
	InterpreterTemplate string  `json:"interpreterTemplate"`
	ParametersTemplate  *string `json:"parametersTemplate,omitempty"`
	PathTemplate        string  `json:"pathTemplate"`
}

func (*CronjobCommand) Validate added in v0.2.99

func (o *CronjobCommand) Validate() error

type DatabaseDependency

type DatabaseDependency struct {
	Description string                 `json:"description"`
	Kind        DatabaseDependencyKind `json:"kind"`
	Parameters  map[string]string      `json:"parameters,omitempty"`
	Version     string                 `json:"version"`
}

A DatabaseDependency is a generic description of need for a database, used by AppVersions.

func (*DatabaseDependency) Validate

func (o *DatabaseDependency) Validate() error

type DatabaseDependencyKind

type DatabaseDependencyKind string
const DatabaseDependencyKindMysql DatabaseDependencyKind = "mysql"

func (DatabaseDependencyKind) Validate

func (e DatabaseDependencyKind) Validate() error

type DefaultCronjob added in v0.2.99

type DefaultCronjob struct {
	Active      bool            `json:"active"`
	Command     *CronjobCommand `json:"command,omitempty"`
	Description string          `json:"description"`
	Interval    string          `json:"interval"`
	Timeout     int64           `json:"timeout"`
	UrlTemplate *string         `json:"urlTemplate,omitempty"`
}

func (*DefaultCronjob) Validate added in v0.2.99

func (o *DefaultCronjob) Validate() error

type Error

type Error struct {
	Message string `json:"message"`
	Type    string `json:"type"`
}

func (*Error) Validate

func (o *Error) Validate() error

type InstalledSystemSoftware

type InstalledSystemSoftware struct {
	SystemSoftwareId      string                     `json:"systemSoftwareId"`
	SystemSoftwareVersion VersionStatus              `json:"systemSoftwareVersion"`
	UpdatePolicy          SystemSoftwareUpdatePolicy `json:"updatePolicy"`
}

InstalledSystemSoftware describes the currently configured and installed SystemSoftwareVersion of a SystemSoftware besides the desired SystemSoftwareUpdatePolicy inside an AppInstallation.

func (*InstalledSystemSoftware) Validate

func (o *InstalledSystemSoftware) Validate() error

type LinkedDatabase

type LinkedDatabase struct {
	DatabaseId      string                `json:"databaseId"`
	DatabaseUserIds map[string]string     `json:"databaseUserIds,omitempty"`
	Kind            LinkedDatabaseKind    `json:"kind"`
	Purpose         LinkedDatabasePurpose `json:"purpose"`
}

LinkedDatabase is a reference to a concrete Database and DatabaseUsers.

func (*LinkedDatabase) Validate

func (o *LinkedDatabase) Validate() error

type LinkedDatabaseKind

type LinkedDatabaseKind string
const LinkedDatabaseKindMysql LinkedDatabaseKind = "mysql"
const LinkedDatabaseKindRedis LinkedDatabaseKind = "redis"

func (LinkedDatabaseKind) Validate

func (e LinkedDatabaseKind) Validate() error

type LinkedDatabasePurpose

type LinkedDatabasePurpose string
const LinkedDatabasePurposeCache LinkedDatabasePurpose = "cache"
const LinkedDatabasePurposeCustom LinkedDatabasePurpose = "custom"
const LinkedDatabasePurposePrimary LinkedDatabasePurpose = "primary"

func (LinkedDatabasePurpose) Validate

func (e LinkedDatabasePurpose) Validate() error

type LockPurpose added in v0.2.63

type LockPurpose string

LockPurpose describes why a given AppInstallation is locked from deletion.

const LockPurposeCopy LockPurpose = "copy"
const LockPurposeUnspecified LockPurpose = "unspecified"

func (LockPurpose) Validate added in v0.2.63

func (e LockPurpose) Validate() error

type Phase added in v0.2.89

type Phase string

Phase describes the current phase/state of an AppInstallation in its lifecycle.

const PhaseDisabled Phase = "disabled"
const PhaseInstalling Phase = "installing"
const PhasePending Phase = "pending"
const PhaseReady Phase = "ready"
const PhaseReconfiguring Phase = "reconfiguring"
const PhaseUpgrading Phase = "upgrading"

func (Phase) Validate added in v0.2.89

func (e Phase) Validate() error

type RequestHandlerRequirement

type RequestHandlerRequirement struct {
	ExampleValues      []SavedUserInput `json:"exampleValues,omitempty"`
	Name               string           `json:"name"`
	Namespace          string           `json:"namespace"`
	ParametersTemplate string           `json:"parametersTemplate"`
}

RequestHandlerRequirement describes the necessary properties to internally resolve the request handler or process to start.

func (*RequestHandlerRequirement) Validate

func (o *RequestHandlerRequirement) Validate() error

type SavedUserInput

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

A SavedUserInput is an entered value for a desired UserInput of an AppVersion or SystemSoftwareVersion.

func (*SavedUserInput) Validate

func (o *SavedUserInput) Validate() error

type SystemSoftware

type SystemSoftware struct {
	Id   string            `json:"id"`
	Meta map[string]string `json:"meta,omitempty"`
	Name string            `json:"name"`
	Tags []string          `json:"tags"`
}

A SystemSoftware is a software that can be installed for an AppInstallation but mostly is not itself externally reachable and/or deliverable.

func (*SystemSoftware) Validate

func (o *SystemSoftware) Validate() error

type SystemSoftwareDependency

type SystemSoftwareDependency struct {
	SystemSoftwareId string `json:"systemSoftwareId"`
	VersionRange     string `json:"versionRange"`
}

A SystemSoftwareDependency is a description of a need for a specific SystemSoftware in a semver versionRange.

func (*SystemSoftwareDependency) Validate

func (o *SystemSoftwareDependency) Validate() error

type SystemSoftwareUpdatePolicy

type SystemSoftwareUpdatePolicy string

SystemSoftwareUpdatePolicy describes which updates should be applied automatically by our systems.

const SystemSoftwareUpdatePolicyAll SystemSoftwareUpdatePolicy = "all"
const SystemSoftwareUpdatePolicyInheritedFromApp SystemSoftwareUpdatePolicy = "inheritedFromApp"
const SystemSoftwareUpdatePolicyNone SystemSoftwareUpdatePolicy = "none"
const SystemSoftwareUpdatePolicyPatchLevel SystemSoftwareUpdatePolicy = "patchLevel"

func (SystemSoftwareUpdatePolicy) Validate

func (e SystemSoftwareUpdatePolicy) Validate() error

type SystemSoftwareVersion

type SystemSoftwareVersion struct {
	ExpiryDate                 *time.Time                 `json:"expiryDate,omitempty"`
	ExternalVersion            string                     `json:"externalVersion"`
	Fee                        *feev2.FeeStrategy         `json:"fee,omitempty"`
	Id                         string                     `json:"id"`
	InternalVersion            string                     `json:"internalVersion"`
	Recommended                *bool                      `json:"recommended,omitempty"`
	SystemSoftwareDependencies []SystemSoftwareDependency `json:"systemSoftwareDependencies,omitempty"`
	UserInputs                 []UserInput                `json:"userInputs,omitempty"`
}

A SystemSoftwareVersion is an officially supported version of a SystemSoftware, containing the necessary and recommended configuration und dependencies.

func (*SystemSoftwareVersion) Validate

func (o *SystemSoftwareVersion) Validate() error

type UserInput

type UserInput struct {
	AdditionalValidationSchema *AdditionalValidationSchema `json:"additionalValidationSchema,omitempty"`
	DataSource                 *string                     `json:"dataSource,omitempty"`
	DataType                   UserInputDataType           `json:"dataType"`
	DefaultValue               *string                     `json:"defaultValue,omitempty"`
	Format                     *UserInputFormat            `json:"format,omitempty"`
	LifecycleConstraint        AppInstallationLifecycle    `json:"lifecycleConstraint"`
	Name                       string                      `json:"name"`
	PositionMeta               *UserInputPositionMeta      `json:"positionMeta,omitempty"`
	Required                   bool                        `json:"required"`
	ValidationSchema           string                      `json:"validationSchema"`
}

A UserInput is a description of an information which cannot be determined or estimated by mittwald, but has to be given by the person who is requesting an AppInstallation or SystemSoftware.

func (*UserInput) Validate

func (o *UserInput) Validate() error

type UserInputDataType

type UserInputDataType string

UserInputDataType is an enum, describing the possible data types of a UserInput.

const UserInputDataTypeBoolean UserInputDataType = "boolean"
const UserInputDataTypeNumber UserInputDataType = "number"
const UserInputDataTypeSelect UserInputDataType = "select"
const UserInputDataTypeText UserInputDataType = "text"

func (UserInputDataType) Validate

func (e UserInputDataType) Validate() error

type UserInputFormat

type UserInputFormat string

UserInputFormat is an enum, describing the possible data formats of a UserInput, the given values can be validated against.

const UserInputFormatEmail UserInputFormat = "email"
const UserInputFormatPassword UserInputFormat = "password"
const UserInputFormatURL UserInputFormat = "url"
const UserInputFormatUri UserInputFormat = "uri"

func (UserInputFormat) Validate

func (e UserInputFormat) Validate() error

type UserInputPositionMeta

type UserInputPositionMeta struct {
	Index   *int64  `json:"index,omitempty"`
	Section *string `json:"section,omitempty"`
	Step    *string `json:"step,omitempty"`
}

UserInputPositionMeta is a utility information, helping to position the UserInput properly on the frontend.

func (*UserInputPositionMeta) Validate

func (o *UserInputPositionMeta) Validate() error

type VersionStatus

type VersionStatus struct {
	Current *string `json:"current,omitempty"`
	Desired string  `json:"desired"`
}

VersionStatus describes the current and desired version of something like the AppVersion of an AppInstallation. If diverging, an internal process is going to assert, the current value will be aligned.

func (*VersionStatus) Validate

func (o *VersionStatus) Validate() error

Jump to

Keyboard shortcuts

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