Documentation
¶
Index ¶
- Constants
- Variables
- func GetJacocoAddr(projectID uint64) string
- type Class
- type CodeCoverage
- func (svc *CodeCoverage) Cancel(req apistructs.CodeCoverageCancelRequest) error
- func (svc *CodeCoverage) End(req apistructs.CodeCoverageUpdateRequest) error
- func (svc *CodeCoverage) EndCallBack(req apistructs.CodeCoverageUpdateRequest) error
- func (svc *CodeCoverage) GetCodeCoverageRecord(id uint64) (*apistructs.CodeCoverageExecRecordDto, error)
- func (svc *CodeCoverage) JudgeApplication(projectID uint64, orgID uint64, userID string) (bool, error, string)
- func (svc *CodeCoverage) JudgeCanEnd(projectID uint64) (bool, error)
- func (svc *CodeCoverage) JudgeRunningRecordExist(projectID uint64) error
- func (svc *CodeCoverage) ListCodeCoverageRecord(req apistructs.CodeCoverageListRequest) (data apistructs.CodeCoverageExecRecordData, err error)
- func (svc *CodeCoverage) ReadyCallBack(req apistructs.CodeCoverageUpdateRequest) error
- func (svc *CodeCoverage) ReportCallBack(req apistructs.CodeCoverageUpdateRequest) error
- func (svc *CodeCoverage) Start(req apistructs.CodeCoverageStartRequest) error
- type Counter
- type CounterType
- type Method
- type Option
- type Package
- type Report
Constants ¶
View Source
const ( LineIdx = iota InstructionIdx ComplexityIdx ClassIdx MethodIdx BranchIdx LinePercentIdx InstructionPercentIdx ClassCoveredPercentIdx LineCoveredIdx )
Variables ¶
View Source
var ( ProjectFormatter = "总行数: %.0f <br/>覆盖行数: %0.f<br/>行覆盖率: %.2f%%" PackageFormatter = "%s <br/>总行数: %.0f <br/>覆盖行数: %.0f<br/>行覆盖率: %.2f%%<br/>class覆盖率: %.2f%%" )
Functions ¶
func GetJacocoAddr ¶
Types ¶
type CodeCoverage ¶
type CodeCoverage struct {
// contains filtered or unexported fields
}
func New ¶
func New(options ...Option) *CodeCoverage
func (*CodeCoverage) Cancel ¶
func (svc *CodeCoverage) Cancel(req apistructs.CodeCoverageCancelRequest) error
Cancel Cancel record
func (*CodeCoverage) End ¶
func (svc *CodeCoverage) End(req apistructs.CodeCoverageUpdateRequest) error
End End record
func (*CodeCoverage) EndCallBack ¶
func (svc *CodeCoverage) EndCallBack(req apistructs.CodeCoverageUpdateRequest) error
EndCallBack Record end callBack
func (*CodeCoverage) GetCodeCoverageRecord ¶
func (svc *CodeCoverage) GetCodeCoverageRecord(id uint64) (*apistructs.CodeCoverageExecRecordDto, error)
GetCodeCoverageRecord Get code coverage record
func (*CodeCoverage) JudgeApplication ¶
func (*CodeCoverage) JudgeCanEnd ¶
func (svc *CodeCoverage) JudgeCanEnd(projectID uint64) (bool, error)
func (*CodeCoverage) JudgeRunningRecordExist ¶
func (svc *CodeCoverage) JudgeRunningRecordExist(projectID uint64) error
JudgeRunningRecordExist Judge running record exist
func (*CodeCoverage) ListCodeCoverageRecord ¶
func (svc *CodeCoverage) ListCodeCoverageRecord(req apistructs.CodeCoverageListRequest) (data apistructs.CodeCoverageExecRecordData, err error)
ListCodeCoverageRecord list code coverage record
func (*CodeCoverage) ReadyCallBack ¶
func (svc *CodeCoverage) ReadyCallBack(req apistructs.CodeCoverageUpdateRequest) error
ReadyCallBack Record ready callBack
func (*CodeCoverage) ReportCallBack ¶
func (svc *CodeCoverage) ReportCallBack(req apistructs.CodeCoverageUpdateRequest) error
ReportCallBack Record report callBack
func (*CodeCoverage) Start ¶
func (svc *CodeCoverage) Start(req apistructs.CodeCoverageStartRequest) error
Start Start record
type Counter ¶
type Counter struct {
Covered int `xml:"covered,attr"`
Missed int `xml:"missed,attr"`
Type CounterType `xml:"type,attr"`
}
type CounterType ¶
type CounterType string
var ( LineCounter CounterType = "LINE" InstructionCounter CounterType = "INSTRUCTION" ComplexityCounter CounterType = "COMPLEXITY" ClassCounter CounterType = "CLASS" MethodCounter CounterType = "METHOD" BranchCounter CounterType = "BRANCH" )
func (CounterType) GetValueIdx ¶
func (c CounterType) GetValueIdx() int
func (CounterType) IsBranchType ¶
func (c CounterType) IsBranchType() bool
func (CounterType) IsClassType ¶
func (c CounterType) IsClassType() bool
func (CounterType) IsInstructionType ¶
func (c CounterType) IsInstructionType() bool
func (CounterType) IsLineType ¶
func (c CounterType) IsLineType() bool
type Option ¶
type Option func(*CodeCoverage)
func WithBundle ¶
func WithDBClient ¶
func WithEnvConfig ¶
func WithEnvConfig(envConfig *environment.EnvConfig) Option
Click to show internal directories.
Click to hide internal directories.