service

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateBuild

func CreateBuild(username string, build *commonmodels.Build, log *zap.SugaredLogger) error

func DeleteBuild

func DeleteBuild(name, productName string, log *zap.SugaredLogger) error

func FindBuild

func FindBuild(name, productName string, log *zap.SugaredLogger) (*commonmodels.Build, error)

func ListBuildForProduct

func ListBuildForProduct(productName string, containerList []*commonmodels.ServiceModuleTarget, log *zap.SugaredLogger) ([]*buildPreviewResp, error)

func ListContainers

func ListContainers(productName string, log *zap.SugaredLogger) ([]*commonmodels.ServiceModuleTarget, error)

func ListDeployTarget

func ListDeployTarget(productName string, log *zap.SugaredLogger) ([]*commonmodels.ServiceModuleTarget, error)

func OpenAPICreateBuildModule added in v1.9.9

func OpenAPICreateBuildModule(username string, req *OpenAPIBuildCreationReq, log *zap.SugaredLogger) error

func OpenAPICreateBuildModuleFromTemplate added in v1.9.9

func OpenAPICreateBuildModuleFromTemplate(username string, req *OpenAPIBuildCreationFromTemplateReq, log *zap.SugaredLogger) error

func UpdateBuild

func UpdateBuild(username string, build *commonmodels.Build, log *zap.SugaredLogger) error

func UpdateBuildTargets

func UpdateBuildTargets(name, productName string, targets []*commonmodels.ServiceModuleTarget, log *zap.SugaredLogger) error

Types

type BuildResp

type BuildResp struct {
	ID          string                              `json:"id"`
	Name        string                              `json:"name"`
	Targets     []*commonmodels.ServiceModuleTarget `json:"targets"`
	KeyVals     []*commonmodels.KeyVal              `json:"key_vals"`
	Repos       []*types.Repository                 `json:"repos"`
	UpdateTime  int64                               `json:"update_time"`
	UpdateBy    string                              `json:"update_by"`
	Pipelines   []string                            `json:"pipelines"`
	ProductName string                              `json:"productName"`
	ClusterID   string                              `json:"cluster_id"`
}

func ListBuild

func ListBuild(name, targets, productName string, log *zap.SugaredLogger) ([]*BuildResp, error)

type OpenAPIBuildBrief added in v1.9.9

type OpenAPIBuildBrief struct {
	Name           string           `json:"name"`
	ProjectName    string           `json:"project_key"`
	Source         string           `json:"source"`
	UpdateBy       string           `json:"update_by"`
	UpdateTime     int64            `json:"update_time"`
	TargetServices []*ServiceModule `json:"target_services"`
}

type OpenAPIBuildCreationFromTemplateReq added in v1.9.9

type OpenAPIBuildCreationFromTemplateReq struct {
	Name           string                           `json:"name"`
	ProjectName    string                           `json:"project_key"`
	TemplateName   string                           `json:"template_name"`
	TargetServices []*types.OpenAPIServiceBuildArgs `json:"target_services"`
}

func (*OpenAPIBuildCreationFromTemplateReq) Validate added in v1.9.9

func (req *OpenAPIBuildCreationFromTemplateReq) Validate() (bool, error)

type OpenAPIBuildCreationReq added in v1.9.9

type OpenAPIBuildCreationReq struct {
	Name            string                           `json:"name"`
	Description     string                           `json:"description"`
	ProjectName     string                           `json:"project_key"`
	ImageName       string                           `json:"image_name"`
	RepoInfo        []*types.OpenAPIRepoInput        `json:"repo_info"`
	AdvancedSetting *types.OpenAPIAdvancedSetting    `json:"advanced_settings"`
	Addons          []*commonmodels.Item             `json:"addons"`
	TargetServices  []*types.OpenAPIServiceBuildArgs `json:"target_services"`
	Parameters      []*types.ParameterSetting        `json:"parameters"`
	DockerBuildInfo *types.DockerBuildInfo           `json:"docker_build_info"`
	BuildScript     string                           `json:"build_script"`
	PostBuildScript string                           `json:"post_build_script"`
	FileArchivePath string                           `json:"file_archive_path"`
}

func (*OpenAPIBuildCreationReq) Validate added in v1.9.9

func (req *OpenAPIBuildCreationReq) Validate() (bool, error)

type OpenAPIBuildDetailResp added in v1.9.9

type OpenAPIBuildDetailResp struct {
	ProjectName     string                        `json:"project_key"`
	Name            string                        `json:"name"`
	Source          string                        `json:"source"`
	TargetServices  []*ServiceModule              `json:"target_services"`
	TemplateName    string                        `json:"template_name"`
	UpdateBy        string                        `json:"update_by"`
	UpdateTime      int64                         `json:"update_time"`
	Repos           []*OpenAPIRepo                `json:"repos"`
	BuildEnv        *OpenAPIBuildEnv              `json:"build_env"`
	AdvancedSetting *types.OpenAPIAdvancedSetting `json:"advanced_settings"`
	BuildScript     string                        `json:"build_script"`
	Parameters      []*commonmodels.ServiceKeyVal `json:"parameters"`
	Outputs         []*commonmodels.Output        `json:"outputs"`
	PostBuild       *commonmodels.PostBuild       `json:"post_build"`
}

func OpenAPIGetBuildModule added in v1.9.9

func OpenAPIGetBuildModule(name, projectName string, logger *zap.SugaredLogger) (*OpenAPIBuildDetailResp, error)

type OpenAPIBuildEnv added in v1.9.9

type OpenAPIBuildEnv struct {
	BasicImageID    string               `json:"basic_image_id"`
	BasicImageLabel string               `json:"basic_image_label"`
	Installs        []*commonmodels.Item `json:"installs"`
}

type OpenAPIBuildListResp added in v1.9.9

type OpenAPIBuildListResp struct {
	Total  int64                `json:"total"`
	Builds []*OpenAPIBuildBrief `json:"builds"`
}

func OpenAPIListBuildModules added in v1.9.9

func OpenAPIListBuildModules(projectName string, pageNum, pageSize int64, logger *zap.SugaredLogger) (*OpenAPIBuildListResp, error)

type OpenAPIPageParamsFromReq added in v1.9.9

type OpenAPIPageParamsFromReq struct {
	PageNum  int64 `json:"page_num"  form:"pageNum,default=1"`
	PageSize int64 `json:"page_size" form:"pageSize,default=20"`
}

type OpenAPIRepo added in v1.9.9

type OpenAPIRepo struct {
	Source       string `json:"source"`
	RepoOwner    string `json:"repo_owner"`
	RepoName     string `json:"repo_name"`
	Branch       string `json:"branch"`
	RemoteName   string `json:"remote_name"`
	CheckoutPath string `json:"checkout_path"`
	Submodules   bool   `json:"submodules"`
	Hidden       bool   `json:"hidden"`
}

type ServiceModule added in v1.9.9

type ServiceModule struct {
	ServiceName   string `json:"service_name"`
	ServiceModule string `json:"service_module"`
}

type ServiceModuleAndBuildResp added in v1.9.9

type ServiceModuleAndBuildResp struct {
	ServiceName   string       `json:"service_name"`
	ServiceModule string       `json:"service_module"`
	ImageName     string       `json:"image_name"`
	ModuleBuilds  []*BuildResp `json:"module_builds"`
}

func ListBuildModulesByServiceModule added in v1.9.9

func ListBuildModulesByServiceModule(encryptedKey, productName, envName string, excludeJenkins, updateServiceRevision bool, log *zap.SugaredLogger) ([]*ServiceModuleAndBuildResp, error)

ListBuildModulesByServiceModule returns the service modules and build modules for services services maybe the services with the latest revision or non-production services currently used in particular environment

Jump to

Keyboard shortcuts

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