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: 48 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

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

func CreateHelmDeliveryVersion

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

func CreateK8SDeliveryVersion

func CreateK8SDeliveryVersion(args *CreateK8SDeliveryVersionArgs, logger *zap.SugaredLogger) error

func CreateNewHelmDeliveryVersion

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

func CreateNewK8SDeliveryVersion

func CreateNewK8SDeliveryVersion(args *CreateK8SDeliveryVersionArgs, logger *zap.SugaredLogger) error

func DeleteDeliveryBuild

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

func DeleteDeliveryDeploy

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

func DeleteDeliveryDistribute

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

func DeleteDeliveryTest

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

func DeleteDeliveryVersion

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

func DownloadDeliveryChart

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

func FindDeliverySecurityStatistics

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

func GetDeliveryArtifactIDByImage

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

func GetDeliveryChartFileContent

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

func GetDeliveryChartFilePath

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

func InsertDeliveryActivities

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

func ListDeliveryServiceNames

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

func RetryCreateHelmDeliveryVersion

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

func RetryCreateK8SDeliveryVersion

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

Types

type ChartVersionResp

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

func GetChartVersion

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

type CreateHelmDeliveryVersionArgs

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"`
	Production    bool     `json:"production"`
	Labels        []string `json:"labels"`
	ImageRepoName string   `json:"imageRepoName"`
	*DeliveryVersionChartData
}

type CreateHelmDeliveryVersionChartData

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

type CreateHelmDeliveryVersionOption

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

type CreateK8SDeliveryVersionArgs

type CreateK8SDeliveryVersionArgs struct {
	CreateBy    string   `json:"-"`
	ProductName string   `json:"productName"`
	Retry       bool     `json:"retry"`
	Version     string   `json:"version"`
	Desc        string   `json:"desc"`
	EnvName     string   `json:"envName"`
	Production  bool     `json:"production"`
	Labels      []string `json:"labels"`
	*DeliveryVersionYamlData
}

type CreateK8SDeliveryVersionYamlData

type CreateK8SDeliveryVersionYamlData struct {
	ServiceName string       `json:"serviceName"`
	YamlContent string       `json:"yamlContent"`
	ImageDatas  []*ImageData `json:"imageDatas"`
}

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

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

type DeliveryChartFileContentArgs

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

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

type DeliveryChartResp

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

func PreviewDeliveryChart

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

type DeliverySecurityStats

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

type DeliverySecurityStatsInfo

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

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

type DeliveryVersionChartData

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

type DeliveryVersionFilter struct {
	ServiceName string
}

type DeliveryVersionHookPayload

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

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

type DeliveryVersionPayloadImage

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

type DeliveryVersionYamlData

type DeliveryVersionYamlData struct {
	ImageRegistryID string                              `json:"imageRegistryID"`
	YamlDatas       []*CreateK8SDeliveryVersionYamlData `json:"yamlDatas"`
}

type ImageData

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

type ImageUrlDetail

type ImageUrlDetail struct {
	ImageUrl         string
	Name             string
	SourceRegistryID string
	TargetRegistryID string
	Tag              string
	CustomTag        string
}

type ListDeliveryVersionArgs

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

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

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

func ListDeliveryVersion

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

type ServiceImageDetails

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