service

package
v1.9.9 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VerbosityBrief    string = "brief"    // brief delivery data
	VerbosityDetailed string = "detailed" // detailed delivery version with total data
)

Variables

This section is empty.

Functions

func ApplyDeliveryGlobalVariables added in v1.8.0

func ApplyDeliveryGlobalVariables(args *DeliveryVariablesApplyArgs, logger *zap.SugaredLogger) (interface{}, error)

func CreateHelmDeliveryVersion added in v1.8.0

func CreateHelmDeliveryVersion(args *CreateHelmDeliveryVersionArgs, logger *zap.SugaredLogger) error

func CreateNewHelmDeliveryVersion added in v1.8.0

func CreateNewHelmDeliveryVersion(args *CreateHelmDeliveryVersionArgs, logger *zap.SugaredLogger) error

func DeleteDeliveryBuild added in v1.2.0

func DeleteDeliveryBuild(args *commonrepo.DeliveryBuildArgs, log *zap.SugaredLogger) error

func DeleteDeliveryDeploy added in v1.2.0

func DeleteDeliveryDeploy(args *commonrepo.DeliveryDeployArgs, log *zap.SugaredLogger) error

func DeleteDeliveryDistribute added in v1.2.0

func DeleteDeliveryDistribute(args *commonrepo.DeliveryDistributeArgs, log *zap.SugaredLogger) error

func DeleteDeliveryTest added in v1.2.0

func DeleteDeliveryTest(args *commonrepo.DeliveryTestArgs, log *zap.SugaredLogger) error

func DeleteDeliveryVersion added in v1.2.0

func DeleteDeliveryVersion(args *commonrepo.DeliveryVersionArgs, log *zap.SugaredLogger) error

func DownloadDeliveryChart added in v1.8.0

func DownloadDeliveryChart(projectName, version string, chartName string, log *zap.SugaredLogger) ([]byte, string, error)

func FindDeliveryBuild added in v1.2.0

func FindDeliveryBuild(args *commonrepo.DeliveryBuildArgs, log *zap.SugaredLogger) ([]*commonmodels.DeliveryBuild, error)

func FindDeliveryDeploy added in v1.2.0

func FindDeliveryDeploy(args *commonrepo.DeliveryDeployArgs, log *zap.SugaredLogger) ([]*commonmodels.DeliveryDeploy, error)

func FindDeliveryDistribute added in v1.2.0

func FindDeliverySecurity added in v1.2.0

func FindDeliverySecurity(args *commonrepo.DeliverySecurityArgs, log *zap.SugaredLogger) ([]*commonmodels.DeliverySecurity, error)

func FindDeliverySecurityStatistics added in v1.2.0

func FindDeliverySecurityStatistics(imageID string, log *zap.SugaredLogger) (map[string]int, error)

func FindDeliveryTest added in v1.2.0

func FindDeliveryTest(args *commonrepo.DeliveryTestArgs, log *zap.SugaredLogger) ([]*commonmodels.DeliveryTest, error)

func FindDeliveryVersion added in v1.2.0

func FindDeliveryVersion(args *commonrepo.DeliveryVersionArgs, log *zap.SugaredLogger) ([]*commonmodels.DeliveryVersion, error)

func GetDeliveryArtifactIDByImage added in v1.8.0

func GetDeliveryArtifactIDByImage(deliveryArtifactArgs *commonrepo.DeliveryArtifactArgs, log *zap.SugaredLogger) (string, error)

func GetDeliveryChartFileContent added in v1.8.0

func GetDeliveryChartFileContent(args *DeliveryChartFileContentArgs, log *zap.SugaredLogger) (string, error)

func GetDeliveryChartFilePath added in v1.8.0

func GetDeliveryChartFilePath(args *DeliveryChartFilePathArgs, log *zap.SugaredLogger) ([]*types.FileInfo, error)

func GetDeliveryVersion added in v1.2.0

func GetProductByDeliveryInfo added in v1.2.0

func GetProductByDeliveryInfo(username, releaseID string, log *zap.SugaredLogger) (*commonmodels.Product, error)

func InsertDeliveryActivities

func InsertDeliveryActivities(args *commonmodels.DeliveryActivity, deliveryArtifactID string, log *zap.SugaredLogger) error

func InsertDeliveryArtifact

func InsertDeliveryArtifact(args *DeliveryArtifactInfo, log *zap.SugaredLogger) (string, error)

func InsertDeliverySecurity added in v1.2.0

func InsertDeliverySecurity(args *commonmodels.DeliverySecurity, log *zap.SugaredLogger) error

func ListDeliveryServiceNames added in v1.2.0

func ListDeliveryServiceNames(productName string, log *zap.SugaredLogger) ([]string, error)

func RetryCreateHelmDeliveryVersion added in v1.8.0

func RetryCreateHelmDeliveryVersion(projectName, versionName string, logger *zap.SugaredLogger) error

func UpdateDeliveryArtifact

func UpdateDeliveryArtifact(args *commonrepo.DeliveryArtifactArgs, log *zap.SugaredLogger) error

Types

type ChartVersionResp added in v1.8.0

type ChartVersionResp struct {
	ChartName        string `json:"chartName"`
	ChartVersion     string `json:"chartVersion"`
	NextChartVersion string `json:"nextChartVersion"`
	Url              string `json:"url"`
}

func GetChartVersion added in v1.8.0

func GetChartVersion(chartName, chartRepoName string) ([]*ChartVersionResp, error)

type CreateHelmDeliveryVersionArgs added in v1.8.0

type CreateHelmDeliveryVersionArgs struct {
	CreateBy      string   `json:"-"`
	ProductName   string   `json:"productName"`
	Retry         bool     `json:"retry"`
	Version       string   `json:"version"`
	Desc          string   `json:"desc"`
	EnvName       string   `json:"envName"`
	Labels        []string `json:"labels"`
	ImageRepoName string   `json:"imageRepoName"`
	*DeliveryVersionChartData
}

type CreateHelmDeliveryVersionChartData added in v1.8.0

type CreateHelmDeliveryVersionChartData struct {
	ServiceName       string       `json:"serviceName"`
	Version           string       `json:"version,omitempty"`
	ValuesYamlContent string       `json:"valuesYamlContent"`
	ImageData         []*ImageData `json:"imageData"`
}

type CreateHelmDeliveryVersionOption added in v1.8.0

type CreateHelmDeliveryVersionOption struct {
	EnableOfflineDist bool   `json:"enableOfflineDist"`
	S3StorageID       string `json:"s3StorageID"`
}

type DeliveryArtifactInfo

type DeliveryArtifactInfo struct {
	*commonmodels.DeliveryArtifact
	DeliveryActivities    []*commonmodels.DeliveryActivity            `json:"activities"`
	DeliveryActivitiesMap map[string][]*commonmodels.DeliveryActivity `json:"sortedActivities,omitempty"`
}

func GetDeliveryArtifact

func GetDeliveryArtifact(deliveryArtifactArgs *commonrepo.DeliveryArtifactArgs, log *zap.SugaredLogger) (*DeliveryArtifactInfo, error)

func ListDeliveryArtifacts

func ListDeliveryArtifacts(deliveryArtifactArgs *commonrepo.DeliveryArtifactArgs, log *zap.SugaredLogger) ([]*DeliveryArtifactInfo, int, error)

type DeliveryChartData added in v1.8.0

type DeliveryChartData struct {
	ChartData      *CreateHelmDeliveryVersionChartData
	ServiceObj     *commonmodels.Service
	ProductService *commonmodels.ProductService
	RenderChart    *template.ServiceRender
	ValuesInEnv    map[string]interface{}
}

type DeliveryChartFileContentArgs added in v1.8.0

type DeliveryChartFileContentArgs struct {
	FilePath    string `json:"filePath"`
	FileName    string `json:"fileName"`
	ProjectName string `json:"projectName"`
	ChartName   string `json:"chartName"`
	Version     string `json:"version"`
}

type DeliveryChartFilePathArgs added in v1.8.0

type DeliveryChartFilePathArgs struct {
	Dir         string `json:"dir"`
	ProjectName string `json:"projectName"`
	ChartName   string `json:"chartName"`
	Version     string `json:"version"`
}

type DeliveryChartResp added in v1.8.0

type DeliveryChartResp struct {
	FileInfos []*types.FileInfo `json:"fileInfos"`
}

func PreviewDeliveryChart added in v1.8.0

func PreviewDeliveryChart(projectName, version, chartName string, log *zap.SugaredLogger) (*DeliveryChartResp, error)

type DeliverySecurityStats added in v1.8.0

type DeliverySecurityStats struct {
	ImageName                 string                    `json:"imageName"`
	ImageID                   string                    `json:"imageId"`
	DeliverySecurityStatsInfo DeliverySecurityStatsInfo `json:"deliverySecurityStatsInfo"`
}

type DeliverySecurityStatsInfo added in v1.8.0

type DeliverySecurityStatsInfo struct {
	Total      int `json:"total"`
	Unknown    int `json:"unkown"`
	Negligible int `json:"negligible"`
	Low        int `json:"low"`
	Medium     int `json:"medium"`
	High       int `json:"high"`
	Critical   int `json:"critical"`
}

type DeliveryVariablesApplyArgs added in v1.8.0

type DeliveryVariablesApplyArgs struct {
	GlobalVariables string                                `json:"globalVariables,omitempty"`
	ChartDatas      []*CreateHelmDeliveryVersionChartData `json:"chartDatas"`
}

type DeliveryVersionChartData added in v1.8.0

type DeliveryVersionChartData struct {
	GlobalVariables string                                `json:"globalVariables"`
	ChartRepoName   string                                `json:"chartRepoName"`
	ImageRegistryID string                                `json:"imageRegistryID"`
	ChartDatas      []*CreateHelmDeliveryVersionChartData `json:"chartDatas"`
	Options         *CreateHelmDeliveryVersionOption      `json:"options"`
}

type DeliveryVersionFilter added in v1.8.0

type DeliveryVersionFilter struct {
	ServiceName string
}

type DeliveryVersionHookPayload added in v1.8.0

type DeliveryVersionHookPayload struct {
	ProjectName string                         `json:"project_name"`
	Version     string                         `json:"version"`
	Status      string                         `json:"status"`
	Error       string                         `json:"error"`
	StartTime   int64                          `json:"start_time"`
	EndTime     int64                          `json:"end_time"`
	Charts      []*DeliveryVersionPayloadChart `json:"charts"`
}

type DeliveryVersionPayloadChart added in v1.8.0

type DeliveryVersionPayloadChart struct {
	ChartName    string                         `json:"chart_name"`
	ChartVersion string                         `json:"chart_version"`
	ChartUrl     string                         `json:"chart_url"`
	Images       []*DeliveryVersionPayloadImage `json:"images"`
}

type DeliveryVersionPayloadImage added in v1.8.0

type DeliveryVersionPayloadImage struct {
	ServiceModule string `json:"service_module"`
	Image         string `json:"image"`
}

type ImageData added in v1.9.9

type ImageData struct {
	ImageName string `json:"imageName"`
	ImageTag  string `json:"imageTag"`
	Selected  bool   `json:"selected"`
}

type ImageUrlDetail added in v1.8.0

type ImageUrlDetail struct {
	ImageUrl  string
	Name      string
	Registry  string
	Tag       string
	CustomTag string
}

type ListDeliveryVersionArgs added in v1.8.0

type ListDeliveryVersionArgs struct {
	Page         int    `form:"page"`
	PerPage      int    `form:"per_page"`
	TaskId       int    `form:"taskId"`
	ServiceName  string `form:"serviceName"`
	Verbosity    string `form:"verbosity"`
	ProjectName  string `form:"projectName"`
	WorkflowName string `form:"workflowName"`
}

type ReleaseInfo added in v1.8.0

type ReleaseInfo struct {
	VersionInfo    *commonmodels.DeliveryVersion      `json:"versionInfo"`
	BuildInfo      []*commonmodels.DeliveryBuild      `json:"buildInfo,omitempty"`
	DeployInfo     []*commonmodels.DeliveryDeploy     `json:"deployInfo,omitempty"`
	TestInfo       []*commonmodels.DeliveryTest       `json:"testInfo,omitempty"`
	DistributeInfo []*commonmodels.DeliveryDistribute `json:"distributeInfo,omitempty"`
	SecurityInfo   []*DeliverySecurityStats           `json:"securityStatsInfo,omitempty"`
}

func GetDetailReleaseData added in v1.8.0

func GetDetailReleaseData(args *commonrepo.DeliveryVersionArgs, log *zap.SugaredLogger) (*ReleaseInfo, error)

func ListDeliveryVersion added in v1.8.0

func ListDeliveryVersion(args *ListDeliveryVersionArgs, logger *zap.SugaredLogger) ([]*ReleaseInfo, error)

type ServiceImageDetails added in v1.8.0

type ServiceImageDetails struct {
	ServiceName string
	Images      []*ImageUrlDetail
	Registries  []string
}

Jump to

Keyboard shortcuts

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