service

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 63 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateK8sWorkLoads

func CreateK8sWorkLoads(ctx context.Context, requestID, userName string, args *K8sWorkloadsArgs, production bool, log *zap.SugaredLogger) error

func CreatePMService

func CreatePMService(username string, args *ServiceTmplBuildObject, log *zap.SugaredLogger) error

func CreateRawYamlServicesOpenAPI

func CreateRawYamlServicesOpenAPI(userName, projectKey string, req *OpenAPICreateYamlServiceReq, logger *zap.SugaredLogger) error

func CreateWorkloadTemplate

func CreateWorkloadTemplate(args *commonmodels.Service, production bool, session mongo.Session, log *zap.SugaredLogger) (*commonmodels.Service, error)

CreateWorkloadTemplate only use for host projects

func DeleteServiceTemplate

func DeleteServiceTemplate(serviceName, serviceType, productName string, production bool, log *zap.SugaredLogger) error

func EditFileContent

func EditFileContent(serviceName, productName, createdBy, requestID string, param *HelmChartEditInfo, logger *zap.SugaredLogger) error

func GetFileContent

func GetFileContent(serviceName, productName string, param *GetFileContentParam, production bool, log *zap.SugaredLogger) (string, error)

func GetFilePath

func GetFilePath(serviceName, productName string, revision int64, dir string, production bool, _ *zap.SugaredLogger) ([]*types.FileInfo, error)

func GetHarborURL

func GetHarborURL(path string) (string, error)

func ListServicePort

func ListServicePort(serviceName, serviceType, productName, excludeStatus string, revision int64, log *zap.SugaredLogger) ([]int, error)

func LoadKubeWorkloadsYaml

func LoadKubeWorkloadsYaml(username string, params *LoadKubeWorkloadsYamlReq, force, proudction bool, log *zap.SugaredLogger) error

LoadKubeWorkloadsYaml creates service from existing workloads in k8s namespace

func LoadServiceFromCodeHost

func LoadServiceFromCodeHost(username string, codehostID int, repoOwner, namespace, repoName, repoUUID, branchName, remoteName string, args *LoadServiceReq, force, production bool, log *zap.SugaredLogger) error

LoadServiceFromCodeHost 根据提供的codehost信息加载服务

func LoadServiceFromYamlTemplate

func LoadServiceFromYamlTemplate(username string, req *LoadServiceFromYamlTemplateReq, force bool, production bool, logger *zap.SugaredLogger) error

func OpenAPILoadServiceFromYamlTemplate

func OpenAPILoadServiceFromYamlTemplate(username string, req *OpenAPILoadServiceFromYamlTemplateReq, force bool, logger *zap.SugaredLogger) error

func OpenAPIProductionUpdateServiceConfig

func OpenAPIProductionUpdateServiceConfig(userName string, args *OpenAPIUpdateServiceConfigArgs, log *zap.SugaredLogger) error

func OpenAPIUpdateProductionServiceVariable

func OpenAPIUpdateProductionServiceVariable(userName, projectName, serviceName string, args *OpenAPIUpdateServiceVariableRequest, logger *zap.SugaredLogger) error

func OpenAPIUpdateServiceConfig

func OpenAPIUpdateServiceConfig(userName string, args *OpenAPIUpdateServiceConfigArgs, log *zap.SugaredLogger) error

func OpenAPIUpdateServiceVariable

func OpenAPIUpdateServiceVariable(userName, projectName, serviceName string, args *OpenAPIUpdateServiceVariableRequest, logger *zap.SugaredLogger) error

func PreloadServiceFromCodeHost

func PreloadServiceFromCodeHost(codehostID int, repoOwner, repoName, repoUUID, branchName, remoteName, path string, isDir bool, log *zap.SugaredLogger) ([]string, error)

func PreviewServiceFromYamlTemplate

func PreviewServiceFromYamlTemplate(req *LoadServiceFromYamlTemplateReq, logger *zap.SugaredLogger) (string, error)

func ReloadServiceFromYamlTemplate

func ReloadServiceFromYamlTemplate(username string, req *LoadServiceFromYamlTemplateReq, production bool, logger *zap.SugaredLogger) error

func RollbackServiceVersion

func RollbackServiceVersion(ctx *internalhandler.Context, projectName, serviceName string, revision int64, isProduction bool, log *zap.SugaredLogger) error

func SyncServiceFromTemplate

func SyncServiceFromTemplate(userName, source, templateId, templateName string, logger *zap.SugaredLogger) error

SyncServiceFromTemplate syncs services from (yaml|chart)template

func UpdateReleaseNamingRule

func UpdateReleaseNamingRule(userName, requestID, projectName string, args *ReleaseNamingRule, production bool, log *zap.SugaredLogger) error

func UpdateServiceEnvStatus

func UpdateServiceEnvStatus(args *commonservice.ServiceTmplObject) error

func UpdateServiceHealthCheckStatus

func UpdateServiceHealthCheckStatus(args *commonservice.ServiceTmplObject) error

func UpdateServiceVariables

func UpdateServiceVariables(args *commonservice.ServiceTmplObject, production bool) error

func UpdateWorkloads

func UpdateWorkloads(ctx context.Context, requestID, username, productName, envName string, args UpdateWorkloadsArgs, production bool, log *zap.SugaredLogger) error

func ValidateServiceUpdate

func ValidateServiceUpdate(codehostID int, serviceName, repoOwner, repoName, repoUUID, branchName, remoteName, path string, isDir bool, log *zap.SugaredLogger) error

ValidateServiceUpdate 根据服务名和提供的加载信息确认是否可以更新服务加载地址

func YamlValidator

func YamlValidator(args *YamlValidatorReq) []string

Types

type BulkHelmServiceCreationArgs

type BulkHelmServiceCreationArgs struct {
	HelmLoadSource
	CreateFrom interface{}             `json:"createFrom"`
	CreatedBy  string                  `json:"createdBy"`
	RequestID  string                  `json:"-"`
	ValuesData *service.ValuesDataArgs `json:"valuesData"`
	AutoSync   bool                    `json:"auto_sync"`
	Production bool                    `json:"production"`
}

func (*BulkHelmServiceCreationArgs) UnmarshalJSON

func (a *BulkHelmServiceCreationArgs) UnmarshalJSON(data []byte) error

type BulkHelmServiceCreationResponse

type BulkHelmServiceCreationResponse struct {
	SuccessServices []string         `json:"successServices"`
	FailedServices  []*FailedService `json:"failedServices"`
}

func CreateOrUpdateBulkHelmService

func CreateOrUpdateBulkHelmService(projectName string, args *BulkHelmServiceCreationArgs, force bool, logger *zap.SugaredLogger) (*BulkHelmServiceCreationResponse, error)

func CreateOrUpdateBulkHelmServiceFromTemplate

func CreateOrUpdateBulkHelmServiceFromTemplate(projectName string, args *BulkHelmServiceCreationArgs, force bool, logger *zap.SugaredLogger) (*BulkHelmServiceCreationResponse, error)

func CreateOrUpdateHelmService

func CreateOrUpdateHelmService(projectName string, args *HelmServiceCreationArgs, force bool, logger *zap.SugaredLogger) (*BulkHelmServiceCreationResponse, error)

func CreateOrUpdateHelmServiceFromChartRepo

func CreateOrUpdateHelmServiceFromChartRepo(projectName string, args *HelmServiceCreationArgs, force bool, log *zap.SugaredLogger) (*BulkHelmServiceCreationResponse, error)

func CreateOrUpdateHelmServiceFromChartTemplate

func CreateOrUpdateHelmServiceFromChartTemplate(projectName string, args *HelmServiceCreationArgs, force bool, logger *zap.SugaredLogger) (*BulkHelmServiceCreationResponse, error)

func CreateOrUpdateHelmServiceFromGitRepo

func CreateOrUpdateHelmServiceFromGitRepo(projectName string, args *HelmServiceCreationArgs, force bool, log *zap.SugaredLogger) (*BulkHelmServiceCreationResponse, error)

func CreateOrUpdateHelmServiceFromRepo

func CreateOrUpdateHelmServiceFromRepo(projectName string, args *HelmServiceCreationArgs, force bool, log *zap.SugaredLogger) (*BulkHelmServiceCreationResponse, error)

type Chart

type Chart struct {
	APIVersion string `json:"apiVersion"`
	Name       string `json:"name"`
	Version    string `json:"version"`
	AppVersion string `json:"appVersion"`
}

type ChartTemplateData

type ChartTemplateData struct {
	TemplateName      string
	TemplateData      *commonmodels.Chart
	ChartName         string
	ChartVersion      string
	DefaultValuesYAML []byte // content of values.yaml in template
}

type ContainerBrief

type ContainerBrief struct {
	Name      string `json:"name"`
	Image     string `json:"image"`
	ImageName string `json:"image_name"`
}

type CreateFromChartRepo

type CreateFromChartRepo struct {
	ChartRepoName string `json:"chartRepoName"`
	ChartName     string `json:"chartName"`
	ChartVersion  string `json:"chartVersion"`
}

type CreateFromChartTemplate

type CreateFromChartTemplate struct {
	TemplateName string      `json:"templateName"`
	ValuesYAML   string      `json:"valuesYAML"`
	Variables    []*Variable `json:"variables"`
}

type CreateFromPublicRepo

type CreateFromPublicRepo struct {
	RepoLink string   `json:"repoLink"`
	Paths    []string `json:"paths"`
}

type CreateFromRepo

type CreateFromRepo struct {
	CodehostID int      `json:"codehostID"`
	Owner      string   `json:"owner"`
	Namespace  string   `json:"namespace"`
	Repo       string   `json:"repo"`
	Branch     string   `json:"branch"`
	Paths      []string `json:"paths"`
}

func PublicRepoToPrivateRepoArgs

func PublicRepoToPrivateRepoArgs(args *CreateFromPublicRepo) (*CreateFromRepo, error)

type DeployableEnv

type DeployableEnv struct {
	EnvName           string                          `json:"env_name"`
	Namespace         string                          `json:"namespace"`
	ClusterID         string                          `json:"cluster_id"`
	Services          []*types.ServiceWithVariable    `json:"services"`
	GlobalVariableKVs []*commontypes.GlobalVariableKV `json:"global_variable_kvs"`
}

type DeployableEnvResp

type DeployableEnvResp struct {
	Envs []*DeployableEnv `json:"envs"`
}

func GetDeployableEnvs

func GetDeployableEnvs(svcName, projectName string, production bool) (*DeployableEnvResp, error)

GetDeployableEnvs The service can be deployed only in the following situations:

  1. All general environments are deployable.
  2. All base environments are deployable.
  3. If the service has been deployed in the baseline environment, all sub-environments of the baseline environment can deploy the service. Otherwise, all sub-environments of the baseline environment cannot deploy the service.

type DiffServiceVersionsResponse

type DiffServiceVersionsResponse struct {
	Type          string `json:"type"`
	YamlA         string `json:"yaml_a"`
	YamlB         string `json:"yaml_b"`
	VariableYamlA string `json:"variable_yaml_a"`
	VariableYamlB string `json:"variable_yaml_b"`
}

func DiffServiceVersions

func DiffServiceVersions(ctx *internalhandler.Context, projectName, serviceName string, revisionA, revisionB int64, isProduction bool, log *zap.SugaredLogger) (DiffServiceVersionsResponse, error)

type FailedService

type FailedService struct {
	Path  string `json:"path"`
	Error string `json:"error"`
}

type GetFileContentParam

type GetFileContentParam struct {
	FilePath        string `json:"filePath"        form:"filePath"`
	FileName        string `json:"fileName"        form:"fileName"`
	Revision        int64  `json:"revision"        form:"revision"`
	DeliveryVersion bool   `json:"deliveryVersion" form:"deliveryVersion"`
}

type GetKubeWorkloadsResp

type GetKubeWorkloadsResp struct {
	WorkloadsMap map[string][]string `json:"workloads_map"`
}

func GetKubeWorkloads

func GetKubeWorkloads(namespace, clusterID string, log *zap.SugaredLogger) (*GetKubeWorkloadsResp, error)

type GetKubeWorkloadsYamlResp

type GetKubeWorkloadsYamlResp struct {
	Services []ServiceYaml `json:"services"`
}

type GetServiceVersionYamlResponse

type GetServiceVersionYamlResponse struct {
	Type         string `json:"type"`
	Yaml         string `json:"yaml"`
	VariableYaml string `json:"variable_yaml"`
}

func GetServiceVersionYaml

func GetServiceVersionYaml(ctx *internalhandler.Context, projectName, serviceName string, revision int64, isProduction bool, log *zap.SugaredLogger) (GetServiceVersionYamlResponse, error)

type HarborChartDetail

type HarborChartDetail struct {
	Metadata struct {
		Name        string    `json:"name"`
		Version     string    `json:"version"`
		Description string    `json:"description"`
		APIVersion  string    `json:"apiVersion"`
		AppVersion  string    `json:"appVersion"`
		Urls        []string  `json:"urls"`
		Created     time.Time `json:"created"`
		Digest      string    `json:"digest"`
	} `json:"metadata"`
	Dependencies []string               `json:"dependencies"`
	YamlValues   map[string]interface{} `json:"yaml_values"`
	Files        struct {
		ValuesYaml string `json:"values.yaml"`
	} `json:"files"`
	Security struct {
		Signature struct {
			Signed   bool   `json:"signed"`
			ProvFile string `json:"prov_file"`
		} `json:"signature"`
	} `json:"security"`
	Labels []string `json:"labels"`
}

func FindHarborChartDetail

func FindHarborChartDetail(project, chartName, version string, log *zap.SugaredLogger) (*HarborChartDetail, error)

type HarborChartRepo

type HarborChartRepo struct {
	Updated       string `json:"updated"`
	Name          string `json:"name"`
	Created       string `json:"created"`
	Deprecated    bool   `json:"deprecated"`
	TotalVersions int    `json:"total_versions"`
	LatestVersion string `json:"latest_version"`
	Home          string `json:"home"`
	Icon          string `json:"icon"`
}

func ListHarborChartRepos

func ListHarborChartRepos(project string, log *zap.SugaredLogger) ([]*HarborChartRepo, error)

type HarborChartVersion

type HarborChartVersion struct {
	Name        string    `json:"name"`
	Version     string    `json:"version"`
	Description string    `json:"description"`
	APIVersion  string    `json:"apiVersion"`
	AppVersion  string    `json:"appVersion"`
	Urls        []string  `json:"urls"`
	Created     time.Time `json:"created"`
	Digest      string    `json:"digest"`
	Labels      []string  `json:"labels"`
}

func ListHarborChartVersions

func ListHarborChartVersions(project, chartName string, log *zap.SugaredLogger) ([]*HarborChartVersion, error)

type HarborProject

type HarborProject struct {
	UpdateTime        string `json:"update_time"`
	OwnerName         string `json:"owner_name"`
	Name              string `json:"name"`
	Deleted           bool   `json:"deleted"`
	OwnerID           int    `json:"owner_id"`
	RepoCount         int    `json:"repo_count"`
	CreationTime      string `json:"creation_time"`
	Togglable         bool   `json:"togglable"`
	ProjectID         int    `json:"project_id"`
	CurrentUserRoleID int    `json:"current_user_role_id"`
	ChartCount        int    `json:"chart_count"`
	CveWhitelist      struct {
		Items []struct {
			CveID string `json:"cve_id"`
		} `json:"items"`
		ProjectID int `json:"project_id"`
		ID        int `json:"id"`
		ExpiresAt int `json:"expires_at"`
	} `json:"cve_whitelist"`
	Metadata struct {
		EnableContentTrust   string `json:"enable_content_trust"`
		AutoScan             string `json:"auto_scan"`
		Severity             string `json:"severity"`
		ReuseSysCveWhitelist string `json:"reuse_sys_cve_whitelist"`
		Public               string `json:"public"`
		PreventVul           string `json:"prevent_vul"`
	} `json:"metadata"`
}

func ListHarborProjects

func ListHarborProjects(page, pageSize int, log *zap.SugaredLogger) ([]*HarborProject, error)

type HelmChartEditInfo

type HelmChartEditInfo struct {
	FilePath    string `json:"file_path"`
	FileContent string `json:"file_content"`
	Production  bool
}

type HelmLoadSource

type HelmLoadSource struct {
	Source LoadSource `json:"source"`
}

type HelmService

type HelmService struct {
	ServiceInfos []*commonmodels.Service `json:"service_infos"`
	FileInfos    []*types.FileInfo       `json:"file_infos"`
	Services     [][]string              `json:"services"`
}

func ListHelmServices

func ListHelmServices(productName string, production bool, log *zap.SugaredLogger) (*HelmService, error)

type HelmServiceCreationArgs

type HelmServiceCreationArgs struct {
	HelmLoadSource
	Name           string                  `json:"name"`
	CreatedBy      string                  `json:"createdBy"`
	RequestID      string                  `json:"-"`
	AutoSync       bool                    `json:"auto_sync"`
	CreateFrom     interface{}             `json:"createFrom"`
	ValuesData     *service.ValuesDataArgs `json:"valuesData"`
	CreationDetail interface{}             `json:"-"`
	Production     bool                    `json:"production"`
}

func (*HelmServiceCreationArgs) UnmarshalJSON

func (a *HelmServiceCreationArgs) UnmarshalJSON(data []byte) error

type HelmServiceModule

type HelmServiceModule struct {
	ServiceModules []*ServiceModule      `json:"service_modules"`
	Service        *commonmodels.Service `json:"service,omitempty"`
}

func GetHelmServiceModule

func GetHelmServiceModule(serviceName, productName string, revision int64, isProduction bool, log *zap.SugaredLogger) (*HelmServiceModule, error)

type K8sWorkloadsArgs

type K8sWorkloadsArgs struct {
	WorkLoads   []commonmodels.Workload `json:"workLoads"`
	EnvName     string                  `json:"env_name"`
	ClusterID   string                  `json:"cluster_id"`
	Namespace   string                  `json:"namespace"`
	ProductName string                  `json:"product_name"`
	RegistryID  string                  `json:"registry_id"`
}

type ListServiceVersionsResponse

type ListServiceVersionsResponse struct {
	ServiceName string `json:"service_name"`
	Revision    int64  `json:"revision"`
	CreateTime  int64  `json:"create_time"`
	CreateBy    string `json:"create_by"`
}

func ListServiceVersions

func ListServiceVersions(ctx *internalhandler.Context, projectName, serviceName string, isProduction bool, log *zap.SugaredLogger) ([]ListServiceVersionsResponse, error)

type LoadKubeWorkloadsYamlReq

type LoadKubeWorkloadsYamlReq struct {
	ProductName string             `json:"product_name"`
	Visibility  string             `json:"visibility"`
	Type        string             `json:"type"`
	Namespace   string             `json:"namespace"`
	ClusterID   string             `json:"cluster_id"`
	Services    []ServiceWorkloads `json:"services"`
}

type LoadServiceFromYamlTemplateReq

type LoadServiceFromYamlTemplateReq struct {
	ServiceName        string                           `json:"service_name"`
	ProjectName        string                           `json:"project_name"`
	TemplateID         string                           `json:"template_id"`
	AutoSync           bool                             `json:"auto_sync"`
	VariableYaml       string                           `json:"variable_yaml"`
	ServiceVariableKVs []*commontypes.ServiceVariableKV `json:"service_variable_kvs"`
}

type LoadServiceReq

type LoadServiceReq struct {
	Type        string `json:"type"`
	ProductName string `json:"product_name"`
	Visibility  string `json:"visibility"`
	LoadFromDir bool   `json:"is_dir"`
	LoadPath    string `json:"path"`
}

type LoadSource

type LoadSource string
const (
	LoadFromRepo          LoadSource = "repo" //exclude gerrit
	LoadFromGerrit        LoadSource = "gerrit"
	LoadFromPublicRepo    LoadSource = "publicRepo"
	LoadFromChartTemplate LoadSource = "chartTemplate"
	LoadFromChartRepo     LoadSource = "chartRepo"
)

type OpenAPICreateYamlServiceReq

type OpenAPICreateYamlServiceReq struct {
	ServiceName  string                           `json:"service_name"`
	Production   bool                             `json:"production"`
	Yaml         string                           `json:"yaml"`
	VariableYaml []*commontypes.ServiceVariableKV `json:"variable_yaml"`
}

func (*OpenAPICreateYamlServiceReq) Validate

func (req *OpenAPICreateYamlServiceReq) Validate() error

type OpenAPIGetYamlServiceResp

type OpenAPIGetYamlServiceResp struct {
	ServiceName        string                           `json:"service_name"`
	Source             string                           `json:"source"`
	Type               string                           `json:"type"`
	TemplateName       string                           `json:"template_name"`
	CreatedBy          string                           `json:"created_by"`
	CreatedTime        int64                            `json:"created_time"`
	Yaml               string                           `json:"yaml"`
	Containers         []*commonmodels.Container        `json:"containers"`
	ServiceVariableKvs []*commontypes.ServiceVariableKV `json:"service_variable_kvs"`
}

func GetProductionYamlServiceOpenAPI

func GetProductionYamlServiceOpenAPI(projectKey, serviceName string, logger *zap.SugaredLogger) (*OpenAPIGetYamlServiceResp, error)

func OpenAPIGetYamlService

func OpenAPIGetYamlService(projectKey, serviceName string, logger *zap.SugaredLogger) (*OpenAPIGetYamlServiceResp, error)

type OpenAPILoadServiceFromYamlTemplateReq

type OpenAPILoadServiceFromYamlTemplateReq struct {
	Production   bool         `json:"production"`
	ServiceName  string       `json:"service_name"`
	ProjectKey   string       `json:"project_key"`
	TemplateName string       `json:"template_name"`
	AutoSync     bool         `json:"auto_sync"`
	VariableYaml util.KVInput `json:"variable_yaml"`
}

func (*OpenAPILoadServiceFromYamlTemplateReq) Validate

type OpenAPIServiceBrief

type OpenAPIServiceBrief struct {
	ServiceName string            `json:"service_name"`
	Source      string            `json:"source"`
	Type        string            `json:"type"`
	Containers  []*ContainerBrief `json:"containers"`
}

func ListProductionServiceTemplateOpenAPI

func ListProductionServiceTemplateOpenAPI(projectKey string, logger *zap.SugaredLogger) ([]*OpenAPIServiceBrief, error)

func ListServiceTemplateOpenAPI

func ListServiceTemplateOpenAPI(projectKey string, logger *zap.SugaredLogger) ([]*OpenAPIServiceBrief, error)

type OpenAPIUpdateServiceConfigArgs

type OpenAPIUpdateServiceConfigArgs struct {
	ProjectName string `json:"project_name" `
	ServiceName string `json:"service_name"`
	Type        string `json:"type"`
	Yaml        string `json:"yaml"`
}

func (*OpenAPIUpdateServiceConfigArgs) Validate

func (o *OpenAPIUpdateServiceConfigArgs) Validate() error

type OpenAPIUpdateServiceVariableRequest

type OpenAPIUpdateServiceVariableRequest struct {
	ServiceVariableKVs []*commontypes.ServiceVariableKV `json:"service_variable_kvs" binding:"required"`
}

type ReleaseNamingRule

type ReleaseNamingRule struct {
	NamingRule  string `json:"naming"`
	ServiceName string `json:"service_name"`
}

type ServiceModule

type ServiceModule struct {
	*commonmodels.Container
	BuildNames []string `json:"build_names"`
}

type ServiceOption

type ServiceOption struct {
	ServiceModules     []*ServiceModule                 `json:"service_module"`
	SystemVariable     []*Variable                      `json:"system_variable"`
	VariableYaml       string                           `json:"variable_yaml"`
	ServiceVariableKVs []*commontypes.ServiceVariableKV `json:"service_variable_kvs"`
	Yaml               string                           `json:"yaml"`
	Service            *commonmodels.Service            `json:"service,omitempty"`
}

func CreateServiceTemplate

func CreateServiceTemplate(userName string, args *commonmodels.Service, force bool, production bool, log *zap.SugaredLogger) (*ServiceOption, error)

func GetServiceOption

func GetServiceOption(args *commonmodels.Service, log *zap.SugaredLogger) (*ServiceOption, error)

func GetServiceTemplateOption

func GetServiceTemplateOption(serviceName, productName string, revision int64, production bool, log *zap.SugaredLogger) (*ServiceOption, error)

type ServiceTmplBuildObject

type ServiceTmplBuildObject struct {
	ServiceTmplObject *commonservice.ServiceTmplObject `json:"pm_service_tmpl"`
	Build             *commonmodels.Build              `json:"build"`
}

type ServiceWorkloads

type ServiceWorkloads struct {
	Name         string              `json:"name"`
	WorkloadsMap map[string][]string `json:"workloads_map"`
}

type ServiceWorkloadsUpdateAction

type ServiceWorkloadsUpdateAction struct {
	EnvName     string `json:"env_name"`
	Name        string `json:"name"`
	Type        string `json:"type"`
	ProductName string `json:"product_name"`
	Operation   string `json:"operation"`
}

type ServiceYaml

type ServiceYaml struct {
	Name string `json:"name"`
	Yaml string `json:"yaml"`
}

type UpdateWorkloadsArgs

type UpdateWorkloadsArgs struct {
	WorkLoads []commonmodels.Workload `json:"workLoads"`
	ClusterID string                  `json:"cluster_id"`
	Namespace string                  `json:"namespace"`
}

type Variable

type Variable struct {
	Key         string `json:"key"`
	Value       string `json:"value"`
	Description string `json:"description,omitempty"`
}

type YamlPreview

type YamlPreview struct {
	Kind string `bson:"-"           json:"kind"`
}

type YamlPreviewForPorts

type YamlPreviewForPorts struct {
	Kind string `bson:"-"           json:"kind"`
	Spec *struct {
		Ports []struct {
			Name string `bson:"-"           json:"name"`
			Port int    `bson:"-"           json:"port"`
		} `bson:"-"           json:"ports"`
	} `bson:"-"           json:"spec"`
}

type YamlValidatorReq

type YamlValidatorReq struct {
	ServiceName  string `json:"service_name"`
	VariableYaml string `json:"variable_yaml"`
	Yaml         string `json:"yaml,omitempty"`
}

type YamlViewServiceTemplateReq

type YamlViewServiceTemplateReq struct {
	ServiceName string                     `json:"service_name"`
	ProjectName string                     `json:"project_name"`
	EnvName     string                     `json:"env_name"`
	Variables   []*templatemodels.RenderKV `json:"variables"`
}

Jump to

Keyboard shortcuts

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