| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- package types
- import (
- "helm.sh/helm/v3/pkg/release"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- )
- // Release is a helm release with a form attached
- type Release struct {
- *release.Release
- *PorterRelease
- Form *FormYAML `json:"form,omitempty"`
- }
- type PorterRelease struct {
- ID uint `json:"id"`
- WebhookToken string `json:"webhook_token"`
- GitActionConfig *GitActionConfig `json:"git_action_config,omitempty"`
- }
- type GetReleaseResponse Release
- type UpdateNotificationConfigRequest struct {
- Payload struct {
- Enabled bool `json:"enabled"`
- Success bool `json:"success"`
- Failure bool `json:"failure"`
- } `json:"payload"`
- }
- type CreateReleaseBaseRequest struct {
- RepoURL string `schema:"repo_url"`
- TemplateName string `json:"template_name" form:"required"`
- TemplateVersion string `json:"template_version" form:"required"`
- Values map[string]interface{} `json:"values"`
- Name string `json:"name" form:"required"`
- }
- type CreateReleaseRequest struct {
- *CreateReleaseBaseRequest
- ImageURL string `json:"image_url" form:"required"`
- GithubActionConfig *CreateGitActionConfigRequest `json:"github_action_config,omitempty"`
- }
- type CreateAddonRequest struct {
- *CreateReleaseBaseRequest
- }
- type RollbackReleaseRequest struct {
- Revision int `json:"revision" form:"required"`
- }
- type UpgradeReleaseRequest struct {
- Values string `json:"values" form:"required"`
- ChartVersion string `json:"version"`
- }
- type UpdateImageBatchRequest struct {
- ImageRepoURI string `json:"image_repo_uri" form:"required"`
- Tag string `json:"tag" form:"required"`
- }
- type GetJobsStatusResponse struct {
- Status string `json:"status,omitempty"`
- StartTime *metav1.Time `json:"start_time,omitempty"`
- }
- const URLParamToken URLParam = "token"
- type WebhookRequest struct {
- Commit string `schema:"commit"`
- }
- type GetGHATemplateRequest struct {
- ReleaseName string `json:"release_name"`
- GithubActionConfig *CreateGitActionConfigRequest `json:"github_action_config" form:"required"`
- }
- type GetGHATemplateResponse string
- type GetReleaseStepsResponse []SubEvent
- type SubEvent struct {
- EventID string `json:"event_id"`
- Name string `json:"name"`
- Index int64 `json:"index"`
- Status EventStatus `json:"status"`
- Info string `json:"info"`
- Time int64 `json:"time"`
- }
- type EventStatus int64
- const (
- EventStatusSuccess EventStatus = 1
- EventStatusInProgress = 2
- EventStatusFailed = 3
- )
- type UpdateReleaseStepsRequest struct {
- Event struct {
- ID string `json:"event_id" form:"required"`
- Name string `json:"name" form:"required"`
- Index int64 `json:"index" form:"required"`
- Status EventStatus `json:"status" form:"required"`
- Info string `json:"info" form:"required"`
- } `json:"event" form:"required"`
- }
- type NotificationConfig struct {
- Enabled bool `json:"enabled"`
- Success bool `json:"success"`
- Failure bool `json:"failure"`
- }
- type GetNotificationConfigResponse struct {
- *NotificationConfig
- }
- type DNSRecord struct {
- ExternalURL string `json:"external_url"`
- Endpoint string `json:"endpoint"`
- Hostname string `json:"hostname"`
- ClusterID uint `json:"cluster_id"`
- }
|