model

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: GPL-3.0 Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionInputArg

type ActionInputArg struct {
	Description string `yaml:"description"`
	Default     string `yaml:"default"`
	Required    bool   `yaml:"required"`
}

type ActionResult

type ActionResult struct {
	CodeInfo     string
	Artifactorys []Artifactory `json:"artifactorys"`
	Reports      []Report      `json:"reports"`
}

type ActionRun

type ActionRun struct {
	Using string       `yaml:"using"`
	Steps []ActionStep `yaml:"steps"`
}

type ActionStep

type ActionStep struct {
	Run   string `yaml:"run"`
	Shell string `yaml:"shell"`
}

type Artifactory

type Artifactory struct {
	Name string `json:"name"`
	Url  string `json:"url"`
}

Artifactory 构建物

type Command

type Command int
const (
	Command_Start Command = iota
	Command_Stop
)

type ContractCheckResult

type ContractCheckResult[T ResultDetailType] struct {
	Name    string                          `json:"name"`
	Result  string                          `json:"result"`
	Tool    string                          `json:"tool"`
	Context []ContractCheckResultDetails[T] `json:"context"`
}

func NewContractCheckResult

func NewContractCheckResult[T ResultDetailType](name string, result string, tool string, context []ContractCheckResultDetails[T]) ContractCheckResult[T]

type ContractCheckResultDetails

type ContractCheckResultDetails[T ResultDetailType] struct {
	Name    string `json:"name"`
	Issue   int    `json:"issue"`
	Message T      `json:"message"`
}

func NewContractCheckResultDetails

func NewContractCheckResultDetails[T ResultDetailType](name string, issue int, message T) ContractCheckResultDetails[T]

type ContractMethodsPropertiesReportDetails

type ContractMethodsPropertiesReportDetails struct {
	Contract   string `json:"contract"`
	Category   string `json:"category"`
	Function   string `json:"function"`
	Visibility string `json:"visibility"`
	ViewPure   string `json:"view_pure"`
	Returns    string `json:"returns"`
	Modifiers  string `json:"modifiers"`
}

func NewContractMethodsPropertiesReportDetails

func NewContractMethodsPropertiesReportDetails(contract, category, function, visibility, viewPure, returns, modifiers string) ContractMethodsPropertiesReportDetails

type ContractStyleGuideValidationsReportDetails

type ContractStyleGuideValidationsReportDetails struct {
	Line         string `json:"line"`
	Column       string `json:"column"`
	Level        string `json:"level"`
	OriginalText string `json:"originalText"`
	Note         string `json:"note"`
	Tool         string `json:"tool"`
}

func NewContractStyleGuideValidationsReportDetails

func NewContractStyleGuideValidationsReportDetails(line, column, level, originalText, note, tool string) ContractStyleGuideValidationsReportDetails

type EslintCheckReportDetails added in v1.0.2

type EslintCheckReportDetails struct {
	Line         string `json:"line"`
	Column       string `json:"column"`
	Level        string `json:"level"`
	OriginalText string `json:"originalText"`
	Note         string `json:"note"`
	Tool         string `json:"tool"`
}

type Job

type Job struct {
	Version   string            `yaml:"version,omitempty" json:"version"`
	Name      string            `yaml:"name,omitempty" json:"name"`
	Stages    map[string]Stage  `yaml:"stages,omitempty" json:"stages"`
	Parameter map[string]string `yaml:"parameter" json:"parameter"`
}

func (*Job) StageSort

func (job *Job) StageSort() ([]StageDetail, error)

StageSort job 排序

type JobDetail

type JobDetail struct {
	Id int `json:"id"`
	Job
	Status       Status        `json:"status"`
	TriggerMode  string        `yaml:"triggerMode" json:"triggerMode"`
	Stages       []StageDetail `json:"stages"`
	StartTime    time.Time     `yaml:"startTime" json:"startTime"`
	Duration     int64         `json:"duration"`
	ActionResult `yaml:"actionResult" json:"actionResult"`
	Output       *output.Output `json:"output"`
	Error        string         `yaml:"error,omitempty"json:"error"`
}

func (*JobDetail) AddArtifactory

func (jd *JobDetail) AddArtifactory(file *os.File) error

func (*JobDetail) ToString

func (jd *JobDetail) ToString() string

type JobDetailDecrement

type JobDetailDecrement []JobDetail

func (JobDetailDecrement) Len

func (s JobDetailDecrement) Len() int

func (JobDetailDecrement) Less

func (s JobDetailDecrement) Less(i, j int) bool

func (JobDetailDecrement) Swap

func (s JobDetailDecrement) Swap(i, j int)

type JobDetailPage

type JobDetailPage struct {
	Data     []JobDetail `json:"data"`
	Total    int         `json:"total"`
	Page     int         `json:"page"`
	PageSize int         `json:"pageSize"`
}

type JobLog

type JobLog struct {
	// 开始时间
	StartTime time.Time `json:"startTime"`
	// 持续时间
	Duration time.Duration `json:"duration"`

	//日志内容
	Content string `json:"content"`

	//最后一行 行号
	LastLine int `json:"lastLine"`
}

type JobPage

type JobPage struct {
	Data     []JobVo `json:"data"`
	Total    int     `json:"total"`
	Page     int     `json:"page"`
	PageSize int     `json:"pageSize"`
}

type JobStageLog

type JobStageLog struct {
	// 开始时间
	StartTime time.Time `json:"startTime"`
	// 持续时间
	Duration time.Duration `json:"duration"`

	//日志内容
	Content string `json:"content"`

	//最后一行 行号
	LastLine int `json:"lastLine"`

	//是否结束
	End bool `yaml:"end" json:"end"`
}

type JobVo

type JobVo struct {
	Version          string           `yaml:"version" json:"version"`
	Name             string           `yaml:"name" json:"name"`
	Stages           map[string]Stage `yaml:"stages" json:"stages"`
	Status           Status           `json:"status"`
	StartTime        time.Time        `yaml:"startTime" json:"startTime"`
	Duration         int64            `json:"duration"`
	TriggerMode      string           `yaml:"triggerMode" json:"triggerMode"`
	PipelineDetailId int              `json:"pipelineDetailId"`
	Error            string           `json:"error"`
	CreateTime       time.Time        `json:"createTime"`
}

type JobVoTimeDecrement

type JobVoTimeDecrement []JobVo

func (JobVoTimeDecrement) Len

func (s JobVoTimeDecrement) Len() int

func (JobVoTimeDecrement) Less

func (s JobVoTimeDecrement) Less(i, j int) bool

func (JobVoTimeDecrement) Swap

func (s JobVoTimeDecrement) Swap(i, j int)

type Node

type Node struct {
	// ip 地址
	Name    string
	Address string
}

type QueueMessage

type QueueMessage struct {
	JobName string
	JobId   int
	Command Command
}

func NewStartQueueMsg

func NewStartQueueMsg(name string, id int) QueueMessage

func NewStopQueueMsg

func NewStopQueueMsg(name string, id int) QueueMessage

type RemoteAction

type RemoteAction struct {
	Name        string                    `yaml:"name"`
	Description string                    `yaml:"description"`
	Author      string                    `yaml:"author"`
	Inputs      map[string]ActionInputArg `yaml:"inputs"`
	Runs        ActionRun                 `yaml:"runs"`
}

type Report

type Report struct {
	Id   int    `json:"id"`
	Url  string `json:"url"`
	Type int    `json:"type"`
}

Report 构建物报告

type Stage

type Stage struct {
	Steps []Step   `yaml:"steps,omitempty" json:"steps"`
	Needs []string `yaml:"needs,omitempty" json:"needs"`
}

type StageDetail

type StageDetail struct {
	Name      string    `json:"name"`
	Stage     Stage     `json:"stage"`
	Status    Status    `json:"status"`
	StartTime time.Time `json:"startTime"`
	Duration  int64     `json:"duration"`
}

func NewStageDetail

func NewStageDetail(name string, stage Stage) StageDetail

func (*StageDetail) ToString

func (s *StageDetail) ToString() string

type Status

type Status int
const (
	STATUS_NOTRUN  Status = 0
	STATUS_RUNNING Status = 1
	STATUS_FAIL    Status = 2
	STATUS_SUCCESS Status = 3
	STATUS_STOP    Status = 4
)

type StatusChangeMessage

type StatusChangeMessage struct {
	JobName string
	JobId   int
	Status  Status
}

func NewStatusChangeMsg

func NewStatusChangeMsg(name string, id int, status Status) StatusChangeMessage

type Step

type Step struct {
	Name      string            `yaml:"name,omitempty" json:"name"`
	Id        string            `yaml:"id,omitempty" json:"id"`
	Uses      string            `yaml:"uses,omitempty" json:"uses"`
	With      map[string]string `yaml:"with,omitempty" json:"with"`
	RunsOn    string            `yaml:"runs-on,omitempty" json:"runsOn"`
	Run       string            `yaml:"run,omitempty" json:"run"`
	Status    Status            `yaml:"status,omitempty" json:"status"`
	StartTime time.Time         `yaml:"startTime,omitempty" json:"startTime"`
	Duration  int64             `yaml:"duration,omitempty" json:"duration"`
}

type Template

type Template struct {
	Id          int    `yaml:"id,omitempty" json:"id"`
	Name        string `yaml:"name,omitempty" json:"name"`
	Description string `yaml:"description,omitempty" json:"description"`
	Tag         string `yaml:"tag,omitempty" json:"tag"`
	ImageName   string `yaml:"imageName,omitempty" json:"imageName"`
}

type TemplateChinese

type TemplateChinese struct {
	Id                 int    `yaml:"id,omitempty" json:"id"`
	Name               string `yaml:"name,omitempty" json:"name"`
	DescriptionChinese string `yaml:"descriptionChinese,omitempty" json:"description"`
	Tag                string `yaml:"tag,omitempty" json:"tag"`
	ImageName          string `yaml:"imageName,omitempty" json:"imageName"`
}

type TemplateDetail

type TemplateDetail struct {
	Id          int    `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	Yaml        string `json:"yaml"`
}

type TemplateEnglish

type TemplateEnglish struct {
	Id                 int    `yaml:"id,omitempty" json:"id"`
	Name               string `yaml:"name,omitempty" json:"name"`
	DescriptionEnglish string `yaml:"descriptionEnglish,omitempty" json:"description"`
	Tag                string `yaml:"tag,omitempty" json:"tag"`
	ImageName          string `yaml:"imageName,omitempty" json:"imageName"`
}

type TemplateVo

type TemplateVo struct {
	Id          int    `yaml:"id" json:"id"`
	Name        string `yaml:"name" json:"name"`
	Description string `yaml:"description" json:"description"`
	Tag         string `yaml:"tag" json:"tag"`
	ImageName   string `yaml:"imageName" json:"imageName"`
	Template    string `yaml:"template" json:"template"`
}

Jump to

Keyboard shortcuts

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