-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathdeployment_target.go
More file actions
44 lines (38 loc) · 1.66 KB
/
Copy pathdeployment_target.go
File metadata and controls
44 lines (38 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package api
import (
"github.com/distr-sh/distr/internal/types"
"github.com/google/uuid"
)
type DeploymentTargetAccessTokenResponse struct {
ConnectURL string `json:"connectUrl"`
TargetID uuid.UUID `json:"targetId"`
TargetSecret string `json:"targetSecret"`
ConnectCommand string `json:"connectCommand"`
}
type DeploymentRequest struct {
DeploymentID *uuid.UUID `json:"deploymentId"`
DeploymentTargetID uuid.UUID `json:"deploymentTargetId"`
ApplicationVersionID uuid.UUID `json:"applicationVersionId"`
ApplicationEntitlementID *uuid.UUID `json:"applicationEntitlementId"`
ReleaseName *string `json:"releaseName"`
ValuesYaml []byte `json:"valuesYaml"`
DockerType *types.DockerType `json:"dockerType"`
EnvFileData []byte `json:"envFileData"`
ForceRestart bool `json:"forceRestart"`
IgnoreRevisionSkew bool `json:"ignoreRevisionSkew"`
HelmOptions *HelmOptions `json:"helmOptions,omitempty"`
TofuVars map[string]any `json:"tofuVars,omitempty"`
TofuBackendConfig map[string]string `json:"tofuBackendConfig,omitempty"`
}
func (d *DeploymentRequest) GetValuesYAML() []byte {
return d.ValuesYaml
}
func (d *DeploymentRequest) GetEnvFileData() []byte {
return d.EnvFileData
}
type HelmOptions struct {
Timeout types.Duration `json:"timeout"`
WaitStrategy string `json:"waitStrategy"`
RollbackOnFailure bool `json:"rollbackOnFailure"`
CleanupOnFailure bool `json:"cleanupOnFailure"`
}