models

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: Apache-2.0 Imports: 8 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 ApplicationConfiguration `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.

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]ChartSetting `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 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 AppExportRequest added in v1.10.0

type AppExportRequest struct {
	Destination  string `json:"destination,omitempty"`
	ImageName    string `json:"image-name,omitempty"`
	ChartName    string `json:"chart-name,omitempty"`
	ImageTag     string `json:"image-tag,omitempty"`
	ChartVersion string `json:"chart-version,omitempty"`
}

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 AppPartResponse added in v1.9.0

type AppPartResponse struct {
	Data          io.ReadCloser
	ContentLength int64
}

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 ApplicationConfiguration added in v1.10.0

type ApplicationConfiguration 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       ChartValueSettings `json:"settings,omitempty" yaml:"settings,omitempty"`
}

ApplicationConfiguration is the part of the manifest describing the configuration of the application

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 {
	Name          string                   `yaml:"name,omitempty"`
	Configuration ApplicationConfiguration `yaml:"configuration"`
	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 {
	Restart        *bool              `json:"restart,omitempty"`
	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       ChartValueSettings `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`.

func NewApplicationUpdateRequest added in v1.10.0

func NewApplicationUpdateRequest(manifest ApplicationManifest) ApplicationUpdateRequest

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"`
	Settings         map[string]ChartSetting `json:"settings,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 ChartSetting added in v1.9.0

type ChartSetting 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"`
}

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

type ChartValueSetting added in v1.9.0

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

ChartValueSetting represents the Show Response for a chart value variable

type ChartValueSettingList added in v1.9.0

type ChartValueSettingList []ChartValueSetting

ChartValueSettingList is a collection of chart value assignments

func (ChartValueSettingList) Assignments added in v1.9.0

func (cvl ChartValueSettingList) Assignments() []string

func (ChartValueSettingList) Len added in v1.9.0

func (cvl ChartValueSettingList) Len() int

Len (Sort interface) returns the length of the ChartValueSettingList

func (ChartValueSettingList) Less added in v1.9.0

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

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

func (ChartValueSettingList) Swap added in v1.9.0

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

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

type ChartValueSettings added in v1.9.0

type ChartValueSettings map[string]string

ChartValueSettings 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 (ChartValueSettings) List added in v1.9.0

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 ExportregistriesListResponse added in v1.10.0

type ExportregistriesListResponse []ExportregistryResponse

ExportregistriesListResponse contains the list of all known export registries

type ExportregistriesMatchResponse added in v1.10.0

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

ExportregistriesMatchResponse contains the list of names for matching export registries

type ExportregistryResponse added in v1.10.0

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

ExportregistryResponse contains the information for a single known export registry

type GitProvider added in v1.8.1

type GitProvider string

func GitProviderFromString added in v1.8.1

func GitProviderFromString(provider string) (GitProvider, error)

func (GitProvider) ValidateURL added in v1.10.0

func (p GitProvider) ValidateURL(gitURL string) error

type GitProxyRequest added in v1.11.0

type GitProxyRequest struct {
	URL       string `json:"url,omitempty"`
	Gitconfig string `json:"gitconfig,omitempty"`
}

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 Gitconfig added in v1.10.0

type Gitconfig struct {
	Meta       MetaLite    `json:"meta,omitempty"`
	URL        string      `json:"url,omitempty"`
	Provider   GitProvider `json:"provider,omitempty"`
	Username   string      `json:"username,omitempty"`
	UserOrg    string      `json:"userorg,omitempty"`
	Repository string      `json:"repository,omitempty"`
	SkipSSL    bool        `json:"skipssl,omitempty"`
}

Gitconfig contains the public parts of git.Configuration Password and cert data are private and excluded. TODO : Track creating user of the config.

type GitconfigCreateRequest added in v1.10.0

type GitconfigCreateRequest struct {
	ID           string      `json:"id,omitempty"`
	URL          string      `json:"url,omitempty"`
	Provider     GitProvider `json:"provider,omitempty"`
	UserOrg      string      `json:"userorg,omitempty"`
	Repository   string      `json:"repository,omitempty"`
	SkipSSL      bool        `json:"skipssl,omitempty"`
	Username     string      `json:"username,omitempty"`
	Password     string      `json:"password,omitempty"`
	Certificates []byte      `json:"certs,omitempty"`
}

GitconfigCreateRequest contains the data for a new git configuration.

type GitconfigList added in v1.10.0

type GitconfigList []Gitconfig

func (GitconfigList) Len added in v1.10.0

func (al GitconfigList) Len() int

Len (Sort interface) returns the length of the GitconfigList

func (GitconfigList) Less added in v1.10.0

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

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

func (GitconfigList) Swap added in v1.10.0

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

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

type GitconfigsMatchResponse added in v1.10.0

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

GitconfigsMatchResponse contains the list of names for matching git configurations

type HelmAuth added in v1.10.0

type HelmAuth struct {
	Username string `json:"-"`
	Password string `json:"-"`
}

HelmAuth contains the credentials to login into an OCI registry or a private Helm repository

type HelmRepo added in v0.6.2

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

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"`
	Branch   string `json:"branch,omitempty"`
	Revision string `json:"revision,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"`
	OIDCEnabled         bool   `json:"oidc_enabled,omitempty"`
}

InfoResponse contains information about Epinio and its components

type MeResponse added in v1.11.0

type MeResponse struct {
	User       string   `json:"user,omitempty"`
	Roles      []Role   `json:"roles,omitempty"`
	Namespaces []string `json:"namespaces,omitempty"`
	Gitconfigs []string `json:"gitconfigs,omitempty"`
}

MeResponse contains information about the current authenticated user

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 Role added in v1.11.0

type Role struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
	Default   bool   `json:"default"`
}

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"`
	InternalRoutes        []string           `json:"internal_routes,omitempty"`
	Settings              ChartValueSettings `json:"settings,omitempty"`
	Details               map[string]string  `json:"details,omitempty"` // Details from associated configs
}

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"`
	Settings       ChartValueSettings `json:"settings,omitempty" yaml:"settings,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 ServiceReplaceRequest added in v0.3.2

type ServiceReplaceRequest struct {
	Settings ChartValueSettings `json:"settings,omitempty"`
	Wait     bool               `json:"wait,omitempty"`
}

ServiceReplaceRequest represents and contains the data needed to replace a service instance (i.e. the custom value keys)

type ServiceStatus added in v0.7.0

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

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 ServiceUpdateRequest added in v0.3.0

type ServiceUpdateRequest struct {
	Remove []string           `json:"remove,omitempty"`
	Set    ChartValueSettings `json:"edit,omitempty"`
	Wait   bool               `json:"wait,omitempty"`
}

ServiceUpdateRequest represents and contains the data needed to update a service instance (add/change, and remove custom value keys)

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