service

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PERPAGE = 100
	PAGE    = 1
)

Variables

This section is empty.

Functions

func CreateTesting added in v1.2.0

func CreateTesting(username string, testing *commonmodels.Testing, log *zap.SugaredLogger) error

func DeleteTestModule

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

func DeleteTestingModule

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

func GetHTMLTestReport added in v1.2.0

func GetHTMLTestReport(pipelineName, pipelineType, taskIDStr, testName string, log *zap.SugaredLogger) (string, error)

func GetRaw

func GetRaw(name, productName string, log *zap.SugaredLogger) (*commonmodels.Testing, error)

GetRaw find the testing module with secret env not masked

func GetTestArtifactInfo

func GetTestArtifactInfo(pipelineName, dir string, taskID int64, log *zap.SugaredLogger) ([]string, error)

func GetTestLocalTestSuite

func GetTestLocalTestSuite(serviceName string, log *zap.SugaredLogger) (*commonmodels.TestSuite, error)

func GetTestTask

func GetTestTask(testName string) (*commonmodels.TestTaskStat, error)

func GetTesting added in v1.2.0

func GetTesting(name, productName string, log *zap.SugaredLogger) (*commonmodels.Testing, error)

func HandleCronjob

func HandleCronjob(testing *commonmodels.Testing, log *zap.SugaredLogger) error

func ListAllWorkflows

func ListAllWorkflows(testName string, log *zap.SugaredLogger) ([]*commonmodels.Workflow, error)

func ListCronjob

func ListCronjob(name, jobType string) ([]*commonmodels.Cronjob, error)

func ListTestStat added in v1.2.0

func ListTestStat(log *zap.SugaredLogger) ([]*commonmodels.TestTaskStat, error)

func UpdateTesting added in v1.2.0

func UpdateTesting(username string, testing *commonmodels.Testing, log *zap.SugaredLogger) error

Types

type CreateTaskResp

type CreateTaskResp struct {
	PipelineName string `json:"pipeline_name"`
	TaskID       int64  `json:"task_id"`
}

func CreateTestTask

func CreateTestTask(args *commonmodels.TestTaskArgs, log *zap.SugaredLogger) (*CreateTaskResp, error)

type TestingDetail

type TestingDetail struct {
	Name        string                 `json:"name"`
	Envs        []*commonmodels.KeyVal `json:"envs"`
	Repos       []*types.Repository    `json:"repos"`
	Desc        string                 `json:"desc"`
	ProductName string                 `json:"product_name"`
}

func ListTestingDetails

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

type TestingOpt

type TestingOpt struct {
	Name        string                     `bson:"name"                   json:"name"`
	ProductName string                     `bson:"product_name"           json:"product_name"`
	Desc        string                     `bson:"desc"                   json:"desc"`
	UpdateTime  int64                      `bson:"update_time"            json:"update_time"`
	UpdateBy    string                     `bson:"update_by"              json:"update_by"`
	TestCaseNum int                        `bson:"-"                      json:"test_case_num,omitempty"`
	ExecuteNum  int                        `bson:"-"                      json:"execute_num,omitempty"`
	PassRate    float64                    `bson:"-"                      json:"pass_rate,omitempty"`
	AvgDuration float64                    `bson:"-"                      json:"avg_duration,omitempty"`
	Workflows   []*commonmodels.Workflow   `bson:"-"                      json:"workflows,omitempty"`
	Schedules   *commonmodels.ScheduleCtrl `bson:"-"                      json:"schedules,omitempty"`
}

func ListTestingOpt

func ListTestingOpt(productName, testType string, log *zap.SugaredLogger) ([]*TestingOpt, error)

Jump to

Keyboard shortcuts

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