Documentation ¶
Index ¶
- func CreateK8sWorkLoads(ctx context.Context, requestID, userName string, args *K8sWorkloadsArgs, ...) error
- func CreatePMService(username string, args *ServiceTmplBuildObject, log *zap.SugaredLogger) error
- func CreateRawYamlServicesOpenAPI(userName, projectKey string, req *OpenAPICreateYamlServiceReq, ...) error
- func CreateWorkloadTemplate(args *commonmodels.Service, production bool, session mongo.Session, ...) (*commonmodels.Service, error)
- func DeleteServiceTemplate(serviceName, serviceType, productName string, production bool, ...) error
- func EditFileContent(serviceName, productName, createdBy, requestID string, ...) error
- func GetFileContent(serviceName, productName string, param *GetFileContentParam, production bool, ...) (string, error)
- func GetFilePath(serviceName, productName string, revision int64, dir string, production bool, ...) ([]*types.FileInfo, error)
- func GetHarborURL(path string) (string, error)
- func ListServicePort(serviceName, serviceType, productName, excludeStatus string, revision int64, ...) ([]int, error)
- func LoadKubeWorkloadsYaml(username string, params *LoadKubeWorkloadsYamlReq, force, proudction bool, ...) error
- func LoadServiceFromCodeHost(username string, codehostID int, ...) error
- func LoadServiceFromYamlTemplate(username string, req *LoadServiceFromYamlTemplateReq, force bool, ...) error
- func OpenAPILoadServiceFromYamlTemplate(username string, req *OpenAPILoadServiceFromYamlTemplateReq, force bool, ...) error
- func OpenAPIProductionUpdateServiceConfig(userName string, args *OpenAPIUpdateServiceConfigArgs, log *zap.SugaredLogger) error
- func OpenAPIUpdateProductionServiceVariable(userName, projectName, serviceName string, ...) error
- func OpenAPIUpdateServiceConfig(userName string, args *OpenAPIUpdateServiceConfigArgs, log *zap.SugaredLogger) error
- func OpenAPIUpdateServiceVariable(userName, projectName, serviceName string, ...) error
- func PreloadServiceFromCodeHost(codehostID int, ...) ([]string, error)
- func PreviewServiceFromYamlTemplate(req *LoadServiceFromYamlTemplateReq, logger *zap.SugaredLogger) (string, error)
- func ReloadServiceFromYamlTemplate(username string, req *LoadServiceFromYamlTemplateReq, production bool, ...) error
- func RollbackServiceVersion(ctx *internalhandler.Context, projectName, serviceName string, revision int64, ...) error
- func SyncServiceFromTemplate(userName, source, templateId, templateName string, logger *zap.SugaredLogger) error
- func UpdateReleaseNamingRule(userName, requestID, projectName string, args *ReleaseNamingRule, ...) error
- func UpdateServiceEnvStatus(args *commonservice.ServiceTmplObject) error
- func UpdateServiceHealthCheckStatus(args *commonservice.ServiceTmplObject) error
- func UpdateServiceVariables(args *commonservice.ServiceTmplObject, production bool) error
- func UpdateWorkloads(ctx context.Context, requestID, username, productName, envName string, ...) error
- func ValidateServiceUpdate(codehostID int, ...) error
- func YamlValidator(args *YamlValidatorReq) []string
- type BulkHelmServiceCreationArgs
- type BulkHelmServiceCreationResponse
- func CreateOrUpdateBulkHelmService(projectName string, args *BulkHelmServiceCreationArgs, force bool, ...) (*BulkHelmServiceCreationResponse, error)
- func CreateOrUpdateBulkHelmServiceFromTemplate(projectName string, args *BulkHelmServiceCreationArgs, force bool, ...) (*BulkHelmServiceCreationResponse, error)
- func CreateOrUpdateHelmService(projectName string, args *HelmServiceCreationArgs, force bool, ...) (*BulkHelmServiceCreationResponse, error)
- func CreateOrUpdateHelmServiceFromChartRepo(projectName string, args *HelmServiceCreationArgs, force bool, ...) (*BulkHelmServiceCreationResponse, error)
- func CreateOrUpdateHelmServiceFromChartTemplate(projectName string, args *HelmServiceCreationArgs, force bool, ...) (*BulkHelmServiceCreationResponse, error)
- func CreateOrUpdateHelmServiceFromGitRepo(projectName string, args *HelmServiceCreationArgs, force bool, ...) (*BulkHelmServiceCreationResponse, error)
- func CreateOrUpdateHelmServiceFromRepo(projectName string, args *HelmServiceCreationArgs, force bool, ...) (*BulkHelmServiceCreationResponse, error)
- type Chart
- type ChartTemplateData
- type ContainerBrief
- type CreateFromChartRepo
- type CreateFromChartTemplate
- type CreateFromPublicRepo
- type CreateFromRepo
- type DeployableEnv
- type DeployableEnvResp
- type DiffServiceVersionsResponse
- type FailedService
- type GetFileContentParam
- type GetKubeWorkloadsResp
- type GetKubeWorkloadsYamlResp
- type GetServiceVersionYamlResponse
- type HarborChartDetail
- type HarborChartRepo
- type HarborChartVersion
- type HarborProject
- type HelmChartEditInfo
- type HelmLoadSource
- type HelmService
- type HelmServiceCreationArgs
- type HelmServiceModule
- type K8sWorkloadsArgs
- type ListServiceVersionsResponse
- type LoadKubeWorkloadsYamlReq
- type LoadServiceFromYamlTemplateReq
- type LoadServiceReq
- type LoadSource
- type OpenAPICreateYamlServiceReq
- type OpenAPIGetYamlServiceResp
- type OpenAPILoadServiceFromYamlTemplateReq
- type OpenAPIServiceBrief
- type OpenAPIUpdateServiceConfigArgs
- type OpenAPIUpdateServiceVariableRequest
- type ReleaseNamingRule
- type ServiceModule
- type ServiceOption
- func CreateServiceTemplate(userName string, args *commonmodels.Service, force bool, production bool, ...) (*ServiceOption, error)
- func GetServiceOption(args *commonmodels.Service, log *zap.SugaredLogger) (*ServiceOption, error)
- func GetServiceTemplateOption(serviceName, productName string, revision int64, production bool, ...) (*ServiceOption, error)
- type ServiceTmplBuildObject
- type ServiceWorkloads
- type ServiceWorkloadsUpdateAction
- type ServiceYaml
- type UpdateWorkloadsArgs
- type Variable
- type YamlPreview
- type YamlPreviewForPorts
- type YamlValidatorReq
- type YamlViewServiceTemplateReq
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 GetHarborURL ¶
func ListServicePort ¶
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 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 ChartTemplateData ¶
type ContainerBrief ¶
type CreateFromChartRepo ¶
type CreateFromChartTemplate ¶
type CreateFromPublicRepo ¶
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:
- All general environments are deployable.
- All base environments are deployable.
- 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 GetFileContentParam ¶
type GetKubeWorkloadsResp ¶
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 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 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 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 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 ¶
func (req *OpenAPILoadServiceFromYamlTemplateReq) Validate() error
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 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 ServiceYaml ¶
type UpdateWorkloadsArgs ¶
type UpdateWorkloadsArgs struct { WorkLoads []commonmodels.Workload `json:"workLoads"` ClusterID string `json:"cluster_id"` Namespace string `json:"namespace"` }
type YamlPreview ¶
type YamlPreview struct {
Kind string `bson:"-" json:"kind"`
}
type YamlPreviewForPorts ¶
type YamlValidatorReq ¶
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"` }
Click to show internal directories.
Click to hide internal directories.