models

package
v1.9.0-rc1 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package models contains the types (mostly structures) encapsulating the API requests and reponses used by the communication between epinio client and APIserver. Not all of them unfortunately, the simpler ones are coded directly. TODO: Give even the most simple requests and responses properly named types.

Index

Constants

View Source
const (
	EpinioStageIDPrevious   = "epinio.io/previous-stage-id"
	EpinioStageIDLabel      = "epinio.io/stage-id"
	EpinioStageBlobUIDLabel = "epinio.io/blob-uid"

	EpinioCreatedByAnnotation = "epinio.io/created-by"

	ApplicationCreated = "created"
	ApplicationStaging = "staging"
	ApplicationRunning = "running"
	ApplicationError   = "error"

	ApplicationStagingActive = "active"
	ApplicationStagingDone   = "done"
	ApplicationStagingFailed = "failed"
)
View Source
const (
	ProviderGit              = GitProvider("git")
	ProviderGithub           = GitProvider("github")
	ProviderGithubEnterprise = GitProvider("github_enterprise")
	ProviderGitlab           = GitProvider("gitlab")
	ProviderGitlabEnterprise = GitProvider("gitlab_enterprise")
	ProviderUnknown          = GitProvider("unknown")
)
View Source
const (
	OriginNone = iota
	OriginPath
	OriginGit
	OriginContainer
)

manifest origin codes for `Kind`.

Variables

View Source
var ResponseOK = Response{"ok"}

Functions

This section is empty.

Types

type App

type App struct {
	Meta          AppRef                   `json:"meta"`
	Configuration ApplicationUpdateRequest `json:"configuration"`
	Origin        ApplicationOrigin        `json:"origin"`
	Workload      *AppDeployment           `json:"deployment,omitempty"`
	Staging       ApplicationStage         `json:"staging,omitempty"`
	StagingStatus ApplicationStagingStatus `json:"stagingstatus"`
	Status        ApplicationStatus        `json:"status"`
	StatusMessage string                   `json:"statusmessage"`
	StageID       string                   `json:"stage_id,omitempty"` // staging id, last run
	ImageURL      string                   `json:"image_url"`
}

App has all the application's properties, for at rest (Configuration), and active (Workload). The main structure has identifying information. It is used in the CLI and API responses. If an error is hit while constructing the app object, the Error attribute will be set to that.

func NewApp

func NewApp(name string, namespace string) *App

NewApp returns a new app for name and namespace

func (*App) AppRef

func (a *App) AppRef() AppRef

AppRef returns a reference to the app (name, namespace)

func (App) Namespace added in v0.9.0

func (a App) Namespace() string

AppRef returns a reference to the app (name, namespace)

type AppChart added in v0.8.0

type AppChart struct {
	Meta             MetaLite                   `json:"meta,omitempty"`
	Description      string                     `json:"description,omitempty"`
	ShortDescription string                     `json:"short_description,omitempty"`
	HelmChart        string                     `json:"helm_chart,omitempty"`
	HelmRepo         string                     `json:"helm_repo,omitempty"`
	Settings         map[string]AppChartSetting `json:"settings,omitempty"`
}

AppChart nearly matches github.com/epinio/application/api/v1 AppChartSpec Reason for existence: Do not expose the internal CRD struct in the API.

Differences:

  • Field `Values` is not made public here. It contains server-internal information the user has no need for.

type AppChartFull added in v1.2.0

type AppChartFull struct {
	AppChart
	Values map[string]string
}

type AppChartList added in v0.8.0

type AppChartList []AppChart

AppChartList is a collection of app charts

type AppChartSetting added in v1.2.0

type AppChartSetting struct {
	// Type of the setting (string, bool, number, or integer)
	Type string `json:"type"`

	// Minimal allowed value, for number, integer
	Minimum string `json:"minimum,omitempty"`

	// Maximal allowed value, for number, integer
	Maximum string `json:"maximum,omitempty"`

	// Enumeration of allowed values, for types string, number, integer
	Enum []string `json:"enum,omitempty"`
}

AppChartSetting matches github.com/epinio/application/api/v1 AppChartSettings Reason for existence: Do not expose the internal CRD struct in the API.

type AppDeployment added in v0.1.2

type AppDeployment struct {
	// TODO: Readiness and Liveness fields?
	Name            string              `json:"name,omitempty"`
	Active          bool                `json:"active,omitempty"` // app is > 0 replicas
	CreatedAt       string              `json:"createdAt,omitempty"`
	DesiredReplicas int32               `json:"desiredreplicas"`
	ReadyReplicas   int32               `json:"readyreplicas"`
	Replicas        map[string]*PodInfo `json:"replicas"`
	Username        string              `json:"username,omitempty"` // app creator
	StageID         string              `json:"stage_id,omitempty"` // staging id, running app
	Status          string              `json:"status,omitempty"`   // app replica status
	Routes          []string            `json:"routes,omitempty"`   // app routes
}

AppDeployment contains all the information specific to an active application, i.e. one with a deployment in the cluster.

type AppList

type AppList []App

AppList is a collection of app references

func (AppList) Len

func (al AppList) Len() int

Len (Sort interface) returns the length of the AppList

func (AppList) Less

func (al AppList) Less(i, j int) bool

Less (Sort interface) compares the contents of the specified indices in the AppList and returns true if the condition holds, and else false.

func (AppList) Swap

func (al AppList) Swap(i, j int)

Swap (Sort interface) exchanges the contents of specified indices in the AppList

type AppMatchResponse added in v0.9.0

type AppMatchResponse struct {
	Names []string `json:"names,omitempty"`
}

AppMatchResponse contains the list of names for matching apps

type AppRef

type AppRef struct {
	Meta
}

AppRef references an App by name and namespace

func NewAppRef

func NewAppRef(name string, namespace string) AppRef

NewAppRef returns a new reference to an app

func (*AppRef) App

func (ar *AppRef) App() *App

App returns a fresh app model for the reference

func (*AppRef) MakeConfigurationSecretName added in v0.6.0

func (ar *AppRef) MakeConfigurationSecretName() string

MakeConfigurationSecretName returns the name of the kube secret holding the bound configurations of the referenced application

func (*AppRef) MakeEnvSecretName added in v0.1.2

func (ar *AppRef) MakeEnvSecretName() string

MakeEnvSecretName returns the name of the kube secret holding the environment variables of the referenced application

func (*AppRef) MakePVCName added in v0.1.2

func (ar *AppRef) MakePVCName() string

MakePVCName returns the name of the kube pvc to use with/for the referenced application.

func (*AppRef) MakeScaleSecretName added in v0.1.2

func (ar *AppRef) MakeScaleSecretName() string

MakeScaleSecretName returns the name of the kube secret holding the number of desired instances for referenced application

func (*AppRef) MakeServiceSecretName added in v0.1.2

func (ar *AppRef) MakeServiceSecretName() string

MakeServiceSecretName returns the name of the kube secret holding the bound services of the referenced application

type AppSetting added in v1.2.0

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

AppSetting represents the Show Response for a chart value variable

type AppSettingList added in v1.2.0

type AppSettingList []AppSetting

AppSettingList is a collection of chart value assignments

func (AppSettingList) Assignments added in v1.2.0

func (cvl AppSettingList) Assignments() []string

func (AppSettingList) Len added in v1.2.0

func (cvl AppSettingList) Len() int

Len (Sort interface) returns the length of the AppSettingList

func (AppSettingList) Less added in v1.2.0

func (cvl AppSettingList) Less(i, j int) bool

Less (Sort interface) compares the contents of the specified indices in the AppSettingList and returns true if the condition holds, and else false.

func (AppSettingList) Swap added in v1.2.0

func (cvl AppSettingList) Swap(i, j int)

Swap (Sort interface) exchanges the contents of specified indices in the AppSettingList

type AppSettings added in v1.2.0

type AppSettings map[string]string

AppSettings is a collection of key/value pairs describing the user's chosen settings with which to configure the helm chart referenced by the application's appchart.

func (AppSettings) List added in v1.2.0

func (cvm AppSettings) List() AppSettingList

type ApplicationCreateRequest

type ApplicationCreateRequest struct {
	Name          string                   `json:"name"          yaml:"name"`
	Configuration ApplicationUpdateRequest `json:"configuration" yaml:"configuration,omitempty"`
}

ApplicationCreateRequest represents and contains the data needed to create an application (at rest), possibly with presets (configurations)

type ApplicationDeleteResponse

type ApplicationDeleteResponse struct {
	UnboundConfigurations []string `json:"unboundconfigurations"`
}

ApplicationDeleteResponse represents the server's response to a successful app deletion

type ApplicationManifest added in v0.1.2

type ApplicationManifest struct {
	ApplicationCreateRequest `yaml:",inline"`
	Self                     string            `yaml:"-"` // Hidden from yaml. The file's location.
	Origin                   ApplicationOrigin `yaml:"origin,omitempty"`
	Staging                  ApplicationStage  `yaml:"staging,omitempty"`
	Namespace                string            `yaml:"namespace,omitempty"`
}

ApplicationManifest represents and contains the data of an application's manifest file, plus some auxiliary data never (un)marshalled. Namely, the file's location, and origin type tag.

type ApplicationOrigin added in v0.1.3

type ApplicationOrigin struct {
	// Hidden from yaml. Type tag to simplify struct usage.
	// Note: we cannot hide this property from the JSON since it's used to unmarshal correctly the result of the Apps endpoint
	// @see failling test here: https://github.com/epinio/epinio/runs/4935898437?check_suite_focus=true
	// We should probably expose a more meaningful value instead of this "Kind" int
	Kind      int     `yaml:"-"`
	Container string  `yaml:"container,omitempty" json:"container,omitempty"`
	Git       *GitRef `yaml:"git,omitempty"       json:"git,omitempty"`
	Path      string  `yaml:"path,omitempty"      json:"path,omitempty"`
	Archive   bool    `yaml:"archive,omitempty"   json:"archive,omitempty"`
}

ApplicationOrigin is the part of the manifest describing the origin of the application (sources). At most one of the fields may be specified / not empty.

func (*ApplicationOrigin) String added in v0.1.3

func (o *ApplicationOrigin) String() string

type ApplicationStage added in v0.1.3

type ApplicationStage struct {
	Builder string `yaml:"builder,omitempty" json:"builder,omitempty"`
}

ApplicationStage is the part of the manifest holding information relevant to staging the application's sources. This is, currently, only the reference to the Paketo builder image to use.

type ApplicationStagingStatus added in v1.8.0

type ApplicationStagingStatus string

type ApplicationStatus added in v0.1.2

type ApplicationStatus string

type ApplicationUpdateRequest added in v0.1.2

type ApplicationUpdateRequest struct {
	Instances      *int32         `json:"instances"          yaml:"instances,omitempty"`
	Configurations []string       `json:"configurations"     yaml:"configurations,omitempty"`
	Environment    EnvVariableMap `json:"environment"        yaml:"environment,omitempty"`
	Routes         []string       `json:"routes"             yaml:"routes,omitempty"`
	AppChart       string         `json:"appchart,omitempty" yaml:"appchart,omitempty"`
	Settings       AppSettings    `json:"settings,omitempty" yaml:"settings,omitempty"`
}

ApplicationUpdateRequest represents and contains the data needed to update an application. Specifically to modify the number of replicas to run, and the configurations bound to it. Note: Instances is a pointer to give us a nil value separate from actual integers, as means of communicating `default`/`no change`.

type AuthTokenResponse added in v0.3.6

type AuthTokenResponse struct {
	Token string `json:"token,omitempty"`
}

AuthTokenResponse contains an auth token

type BindRequest

type BindRequest struct {
	Names []string `json:"names"`
}

BindRequest represents and contains the data needed to bind configurations to an application.

type BindResponse

type BindResponse struct {
	WasBound []string `json:"wasbound"`
}

BindResponse represents the server's response to the successful binding of configurations to an application.

type CatalogMatchResponse added in v0.9.0

type CatalogMatchResponse struct {
	Names []string `json:"names,omitempty"`
}

CatalogMatchResponse contains the list of names for matching catalog entries

type CatalogService added in v0.6.3

type CatalogService struct {
	Meta             MetaLite `json:"meta,omitempty"`
	SecretTypes      []string `json:"secretTypes,omitempty"`
	Description      string   `json:"description,omitempty"`
	ShortDescription string   `json:"short_description,omitempty"`
	HelmChart        string   `json:"chart,omitempty"`
	ChartVersion     string   `json:"chartVersion,omitempty"`
	ServiceIcon      string   `json:"serviceIcon,omitempty"`
	AppVersion       string   `json:"appVersion,omitempty"`
	HelmRepo         HelmRepo `json:"helm_repo,omitempty"`
	Values           string   `json:"values,omitempty"`
}

CatalogService mostly matches github.com/epinio/application/api/v1 ServiceSpec Reason for existence: Do not expose the internal CRD struct in the API.

type CatalogServices added in v0.9.0

type CatalogServices []CatalogService

CatalogServices is a list of catalog service elements

type ChartMatchResponse added in v0.8.0

type ChartMatchResponse struct {
	Names []string `json:"names,omitempty"`
}

ChartMatchResponse contains the list of names for matching application charts

type ConfigurationAppsResponse added in v0.6.0

type ConfigurationAppsResponse struct {
	AppsOf map[string]AppList `json:"apps_of,omitempty"`
}

ConfigurationAppsResponse returns a list of apps per configuration

type ConfigurationCreateRequest added in v0.6.0

type ConfigurationCreateRequest struct {
	Name string            `json:"name"`
	Data map[string]string `json:"data"`
}

ConfigurationCreateRequest represents and contains the data needed to create a configuration instance

type ConfigurationDeleteRequest added in v0.6.0

type ConfigurationDeleteRequest struct {
	Unbind bool `json:"unbind"`
}

ConfigurationDeleteRequest represents and contains the data needed to delete a configuration

type ConfigurationDeleteResponse added in v0.6.0

type ConfigurationDeleteResponse struct {
	BoundApps []string `json:"boundapps"`
}

ConfigurationDeleteResponse represents the server's response to a successful configuration deletion

type ConfigurationMatchResponse added in v0.9.0

type ConfigurationMatchResponse struct {
	Names []string `json:"names,omitempty"`
}

ConfigurationMatchResponse contains the list of names for matching configurations

type ConfigurationRef added in v0.6.0

type ConfigurationRef struct {
	Meta
}

ConfigurationRef references a Configuration by name and namespace

type ConfigurationReplaceRequest added in v0.6.0

type ConfigurationReplaceRequest map[string]string

ConfigurationReplaceRequest represents and contains the data needed to replace a configuration instance

type ConfigurationResponse added in v0.6.0

type ConfigurationResponse struct {
	Meta          ConfigurationRef          `json:"meta"`
	Configuration ConfigurationShowResponse `json:"configuration"`
}

ConfigurationResponse represents the data of a single configuration instance

type ConfigurationResponseList added in v0.6.0

type ConfigurationResponseList []ConfigurationResponse

ConfigurationResponseList represents a collection of configuration instance

func (ConfigurationResponseList) Len added in v0.6.0

func (srl ConfigurationResponseList) Len() int

Len (Sort interface) returns the length of the ConfigurationResponseList

func (ConfigurationResponseList) Less added in v0.6.0

func (srl ConfigurationResponseList) Less(i, j int) bool

Less (Sort interface) compares the contents of the specified indices in the ConfigurationResponseList and returns true if the condition holds, and else false.

func (ConfigurationResponseList) Swap added in v0.6.0

func (srl ConfigurationResponseList) Swap(i, j int)

Swap (Sort interface) exchanges the contents of specified indices in the ConfigurationResponseList

type ConfigurationShowResponse added in v0.6.0

type ConfigurationShowResponse struct {
	Username  string            `json:"user"`               // Name of user creating it
	Details   map[string]string `json:"details,omitempty"`  // Main information, key/value map
	BoundApps []string          `json:"boundapps"`          // Names of the apps using it
	Type      string            `json:"type,omitempty"`     // User or service-created configuration
	Origin    string            `json:"origin,omitempty"`   // Name of service it came from, if any
	Siblings  []string          `json:"siblings,omitempty"` // Name of other configs from same service, if any
}

ConfigurationShowResponse contains details about a configuration

type ConfigurationUpdateRequest added in v0.6.0

type ConfigurationUpdateRequest struct {
	Remove []string          `json:"remove,omitempty"`
	Set    map[string]string `json:"edit,omitempty"`
}

ConfigurationUpdateRequest represents and contains the data needed to update a configuration instance (add/change, and remove keys)

type DeployRequest

type DeployRequest struct {
	App      AppRef            `json:"app,omitempty"`
	Stage    StageRef          `json:"stage,omitempty"`
	ImageURL string            `json:"image,omitempty"`
	Origin   ApplicationOrigin `json:"origin,omitempty"`
}

DeployRequest represents and contains the data needed to deploy an application Note that the overall application configuration (instances, configurations, EVs) is already known server side, through AppCreate/AppUpdate requests. This request not only comes with the image to deploy, but also the information where the sources of that image came from.

type DeployResponse

type DeployResponse struct {
	Routes []string `json:"routes,omitempty"`
}

DeployResponse represents the server's response to a successful app deployment

type EnvMatchResponse

type EnvMatchResponse struct {
	Names []string `json:"names,omitempty"`
}

EnvMatchResponse contains the list of names for matching env variables

type EnvVariable

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

EnvVariable represents the Show Response for a single environment variable

type EnvVariableList

type EnvVariableList []EnvVariable

EnvVariableList is a collection of EVs.

func (EnvVariableList) Len

func (evl EnvVariableList) Len() int

Len (Sort interface) returns the length of the EnvVariableList

func (EnvVariableList) Less

func (evl EnvVariableList) Less(i, j int) bool

Less (Sort interface) compares the contents of the specified indices in the EnvVariableList and returns true if the condition holds, and else false.

func (EnvVariableList) Swap

func (evl EnvVariableList) Swap(i, j int)

Swap (Sort interface) exchanges the contents of specified indices in the EnvVariableList

type EnvVariableMap added in v0.1.3

type EnvVariableMap map[string]string

EnvVariableMap is a collection of EVs as a map. It is used for Set Requests, and as List Responses

func (EnvVariableMap) List added in v0.1.3

func (evm EnvVariableMap) List() EnvVariableList

type EnvVarnameList

type EnvVarnameList []string

EnvVarnameList is a collection of EV names, it is used for Unset Requests, and as Match Responses

type GitProvider added in v1.8.1

type GitProvider string

func GitProviderFromString added in v1.8.1

func GitProviderFromString(provider string) (GitProvider, error)

type GitRef

type GitRef struct {
	Revision string      `json:"revision,omitempty" yaml:"revision,omitempty"`
	URL      string      `json:"repository"         yaml:"url,omitempty"`
	Provider GitProvider `json:"provider,omitempty" yaml:"provider,omitempty"`
	Branch   string      `json:"branch,omitempty"   yaml:"branch,omitempty"`
}

type HelmRepo added in v0.6.2

type HelmRepo struct {
	Name string `json:"name,omitempty"`
	URL  string `json:"url,omitempty"`
}

HelmRepo matches github.com/epinio/application/api/v1 HelmRepo Reason for existence: Do not expose the internal CRD struct in the API.

type ImageRef

type ImageRef struct {
	ID string `json:"id,omitempty"`
}

ImageRef references an upload

func NewImage

func NewImage(id string) ImageRef

NewImage returns a new image ref for the given ID

type ImportGitResponse

type ImportGitResponse struct {
	BlobUID string `json:"blobuid,omitempty"`
}

type InfoResponse

type InfoResponse struct {
	Version             string `json:"version,omitempty"`
	KubeVersion         string `json:"kube_version,omitempty"`
	Platform            string `json:"platform,omitempty"`
	DefaultBuilderImage string `json:"default_builder_image,omitempty"`
}

InfoResponse contains information about Epinio and its components

type Meta added in v0.9.0

type Meta struct {
	Name      string      `json:"name"`
	Namespace string      `json:"namespace,omitempty"`
	CreatedAt metav1.Time `json:"createdAt,omitempty"`
}

Meta holds the information needed to reference a resource (name and namespace), plus general descriptive things (creation timestamp).

type MetaLite added in v0.9.0

type MetaLite struct {
	Name      string      `json:"name"`
	CreatedAt metav1.Time `json:"createdAt,omitempty"`
}

MetaLite holds the information needed to reference a non-namespaced resource (name), plus general descriptive things (creation timestamp).

type Namespace

type Namespace struct {
	Meta           MetaLite `json:"meta,omitempty"`
	Apps           []string `json:"apps,omitempty"`
	Configurations []string `json:"configurations,omitempty"`
}

Namespace has all the namespace properties, i.e. name, app names, and configuration names It is used in the CLI and API responses.

type NamespaceCreateRequest

type NamespaceCreateRequest struct {
	Name string `json:"name,omitempty"`
}

NamespaceCreateRequest contains the name of the namespace that should be created

type NamespaceList

type NamespaceList []Namespace

NamespaceList is a collection of namespaces

func (NamespaceList) Len

func (al NamespaceList) Len() int

Len (Sort interface) returns the length of the NamespaceList

func (NamespaceList) Less

func (al NamespaceList) Less(i, j int) bool

Less (Sort interface) compares the contents of the specified indices in the NamespaceList and returns true if the condition holds, and else false.

func (NamespaceList) Swap

func (al NamespaceList) Swap(i, j int)

Swap (Sort interface) exchanges the contents of specified indices in the NamespaceList

type NamespacesMatchResponse

type NamespacesMatchResponse struct {
	Names []string `json:"names,omitempty"`
}

NamespacesMatchResponse contains the list of names for matching namespaces

type PodInfo added in v0.3.6

type PodInfo struct {
	Name        string `json:"name"`
	MetricsOk   bool   `json:"metricsOk"`
	MemoryBytes int64  `json:"memoryBytes"`
	MilliCPUs   int64  `json:"millicpus"`
	CreatedAt   string `json:"createdAt,omitempty"`
	Restarts    int32  `json:"restarts"`
	Ready       bool   `json:"ready"`
}

type Request

type Request struct {
}

type Response

type Response struct {
	Status string `json:"status"`
}

type Service added in v0.6.2

type Service struct {
	Meta                    Meta          `json:"meta,omitempty"`
	SecretTypes             []string      `json:"secretTypes,omitempty"`
	CatalogService          string        `json:"catalog_service,omitempty"`
	CatalogServiceVersion   string        `json:"catalog_service_version,omitempty"`
	Status                  ServiceStatus `json:"status,omitempty"`
	BoundApps               []string      `json:"boundapps"`
	ManagedByHelmController bool          `json:"hcmanaged"`
	InternalRoutes          []string      `json:"internal_routes,omitempty"`
}

func (Service) Namespace added in v0.6.3

func (s Service) Namespace() string

type ServiceAppsResponse

type ServiceAppsResponse struct {
	AppsOf map[string]AppList `json:"apps_of,omitempty"`
}

ServiceAppsResponse returns a list of apps per service

type ServiceBindRequest added in v0.6.3

type ServiceBindRequest struct {
	AppName string `json:"app_name,omitempty"`
}

type ServiceCreateRequest added in v0.1.2

type ServiceCreateRequest struct {
	CatalogService string `json:"catalog_service,omitempty"`
	Name           string `json:"name,omitempty"`
	Wait           bool   `json:"wait,omitempty"`
}

type ServiceDeleteRequest added in v0.1.2

type ServiceDeleteRequest struct {
	Unbind bool `json:"unbind"`
}

ServiceDeleteRequest represents and contains the data needed to delete a service

type ServiceDeleteResponse added in v0.1.2

type ServiceDeleteResponse struct {
	BoundApps []string `json:"boundapps"`
}

ServiceDeleteResponse represents the server's response to a successful service deletion

type ServiceList added in v0.9.0

type ServiceList []Service

ServiceList represents a collection of service instances

func (ServiceList) Len added in v0.9.0

func (srl ServiceList) Len() int

Len (Sort interface) returns the length of the ServiceList

func (ServiceList) Less added in v0.9.0

func (srl ServiceList) Less(i, j int) bool

Less (Sort interface) compares the contents of the specified indices in the ServiceList and returns true if the condition holds, and else false.

func (ServiceList) Swap added in v0.9.0

func (srl ServiceList) Swap(i, j int)

Swap (Sort interface) exchanges the contents of specified indices in the ServiceList

type ServiceMatchResponse added in v0.9.0

type ServiceMatchResponse struct {
	Names []string `json:"names,omitempty"`
}

ServiceMatchResponse contains the list of names for matching services

type ServiceShowRequest added in v0.6.3

type ServiceShowRequest struct {
	Name string `json:"name,omitempty"`
}

type ServiceStatus added in v0.7.0

type ServiceStatus string
const (
	ServiceStatusDeployed ServiceStatus = "deployed"
	ServiceStatusNotReady ServiceStatus = "not-ready"
	ServiceStatusUnknown  ServiceStatus = "unknown"
)

func NewServiceStatusFromHelmRelease added in v0.7.0

func NewServiceStatusFromHelmRelease(status helmrelease.Status) ServiceStatus

func (ServiceStatus) String added in v0.7.0

func (s ServiceStatus) String() string

type ServiceUnbindRequest added in v0.8.0

type ServiceUnbindRequest struct {
	AppName string `json:"app_name,omitempty"`
}

type StageRef

type StageRef struct {
	ID string `json:"id,omitempty"`
}

StageRef references a staging run by ID, currently randomly generated for each POST to the staging endpoint

func NewStage

func NewStage(id string) StageRef

NewStage returns a new reference to a staging run

type StageRequest

type StageRequest struct {
	App          AppRef `json:"app,omitempty"`
	BlobUID      string `json:"blobuid,omitempty"`
	BuilderImage string `json:"builderimage,omitempty"`
}

StageRequest represents and contains the data needed to stage an application

type StageResponse

type StageResponse struct {
	Stage    StageRef `json:"stage,omitempty"`
	ImageURL string   `json:"image,omitempty"`
}

StageResponse represents the server's response to a successful app staging

type UploadResponse

type UploadResponse struct {
	BlobUID string `json:"blobuid,omitempty"`
}

UploadResponse represents the server's response to a successful app sources upload

Jump to

Keyboard shortcuts

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