service

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanCIResources

func CleanCIResources(userName, requestID string, logger *zap.SugaredLogger) error

func CreateCollaborationMode

func CreateCollaborationMode(userName string, collaborationMode *models.CollaborationMode, logger *zap.SugaredLogger) error

func DeleteCIResources

func DeleteCIResources(userName, requestID string, cis []*models.CollaborationInstance, logger *zap.SugaredLogger) error

func DeleteCollaborationMode

func DeleteCollaborationMode(username, projectName, name string, logger *zap.SugaredLogger) error

func SyncCollaborationInstance

func SyncCollaborationInstance(products *SyncCollaborationInstanceArgs, projectName, uid, identityType, userName, requestID string, logger *zap.SugaredLogger) error

func UpdateCollaborationMode

func UpdateCollaborationMode(userName string, collaborationMode *models.CollaborationMode, logger *zap.SugaredLogger) error

Types

type DeleteCIResourcesRequest

type DeleteCIResourcesRequest struct {
	CollaborationInstances []models.CollaborationInstance `json:"collaboration_instances"`
}

type DeleteSpec

type DeleteSpec struct {
	Workflows []models.WorkflowCIItem `json:"workflows"`
	Products  []models.ProductCIItem  `json:"products"`
}

type GetCollaborationDeleteResp

type GetCollaborationDeleteResp struct {
	CommonWorkflows []string
	Workflows       []string
	Products        []string
}

type GetCollaborationNewResp

type GetCollaborationNewResp struct {
	Code     int64       `json:"code"`
	Workflow []*Workflow `json:"workflow"`
	Product  []*Product  `json:"product"`
	IfSync   bool        `json:"ifSync"`
}

func GetCollaborationNew

func GetCollaborationNew(projectName, uid, identityType, userName string, logger *zap.SugaredLogger) (*GetCollaborationNewResp, error)

type GetCollaborationUpdateResp

type GetCollaborationUpdateResp struct {
	UpdateInstance []models.CollaborationInstance `json:"update_instance"`
	Update         []UpdateItem                   `json:"update"`
	New            []models.CollaborationMode     `json:"new"`
	Delete         []models.CollaborationInstance `json:"delete"`
}

func GetCollaborationUpdate

func GetCollaborationUpdate(projectName, uid, identityType, userName string, logger *zap.SugaredLogger) (*GetCollaborationUpdateResp, error)

type NewSpec

type NewSpec struct {
	Workflows []models.WorkflowCMItem `json:"workflows"`
	Products  []models.ProductCMItem  `json:"products"`
}

type Product

type Product struct {
	CollaborationType config.CollaborationType `json:"collaboration_type"`
	BaseName          string                   `json:"base_name"`
	CollaborationMode string                   `json:"collaboration_mode"`
	Name              string                   `json:"name"`
	DeployType        string                   `json:"deploy_type"`
	//Vars              []*templatemodels.RenderKV        `json:"vars"`
	DefaultValues string                            `json:"default_values,omitempty"`
	ValuesData    *commonservice.ValuesDataArgs     `json:"valuesData,omitempty"`
	YamlData      *templatemodels.CustomYaml        `json:"yaml_data,omitempty"`
	ChartValues   []*commonservice.HelmSvcRenderArg `json:"chartValues,omitempty"`
	Services      []*commonservice.K8sSvcRenderArg  `json:"services"`
}

type SyncCollaborationInstanceArgs

type SyncCollaborationInstanceArgs struct {
	Products []Product `json:"products"`
}

type UpdateItem

type UpdateItem struct {
	CollaborationMode string     `json:"collaboration_mode"`
	PolicyName        string     `json:"policy_name"`
	DeployType        string     `json:"deploy_type"`
	DeleteSpec        DeleteSpec `json:"delete_spec"`
	UpdateSpec        UpdateSpec `json:"update_spec"`
	NewSpec           NewSpec    `json:"new_spec"`
}

type UpdateProductItem

type UpdateProductItem struct {
	Old models.ProductCIItem `json:"old"`
	New models.ProductCMItem `json:"new"`
}

type UpdateSpec

type UpdateSpec struct {
	Workflows []UpdateWorkflowItem `json:"workflows"`
	Products  []UpdateProductItem  `json:"products"`
}

type UpdateWorkflowItem

type UpdateWorkflowItem struct {
	Old models.WorkflowCIItem `json:"old"`
	New models.WorkflowCMItem `json:"new"`
}

type Workflow

type Workflow struct {
	CollaborationType config.CollaborationType `json:"collaboration_type"`
	BaseName          string                   `json:"base_name"`
	CollaborationMode string                   `json:"collaboration_mode"`
	Name              string                   `json:"name"`
	DisplayName       string                   `json:"display_name"`
	Description       string                   `json:"description"`
	WorkflowType      string                   `json:"workflow_type"`
}

Jump to

Keyboard shortcuts

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