-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompliance_gen.go
70 lines (58 loc) · 2.04 KB
/
compliance_gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// Code generated by github.com/atombender/go-jsonschema, DO NOT EDIT.
package k6lint
// The result of a particular inspection.
type Check struct {
// Textual explanation of the check result.
//
Details string `json:"details,omitempty" yaml:"details,omitempty" mapstructure:"details,omitempty"`
// The ID of the checker.
//
// It identifies the method of check, not the execution of the check.
//
ID Checker `json:"id" yaml:"id" mapstructure:"id"`
// The result of the check.
//
// A true value of the passed property indicates a successful check, while a false
// value indicates a failure.
//
Passed bool `json:"passed" yaml:"passed" mapstructure:"passed"`
}
type Checker string
const CheckerBuild Checker = "build"
const CheckerCodeowners Checker = "codeowners"
const CheckerExamples Checker = "examples"
const CheckerGit Checker = "git"
const CheckerLicense Checker = "license"
const CheckerModule Checker = "module"
const CheckerReadme Checker = "readme"
const CheckerReplace Checker = "replace"
const CheckerSmoke Checker = "smoke"
const CheckerTypes Checker = "types"
const CheckerVersions Checker = "versions"
// The result of the extension's k6 compliance checks.
type Compliance struct {
// Results of individual checks.
//
Checks []Check `json:"checks,omitempty" yaml:"checks,omitempty" mapstructure:"checks,omitempty"`
// The results of the checks are in the form of a grade.
//
Grade Grade `json:"grade" yaml:"grade" mapstructure:"grade"`
// Compliance expressed as a percentage.
//
Level int `json:"level" yaml:"level" mapstructure:"level"`
// Compliance check timestamp.
//
// The timestamp property contains the start timestamp of the check in Unix time
// format (the number of non-leap seconds that have elapsed since 00:00:00 UTC on
// 1st January 1970).
//
Timestamp float64 `json:"timestamp" yaml:"timestamp" mapstructure:"timestamp"`
}
type Grade string
const GradeA Grade = "A"
const GradeB Grade = "B"
const GradeC Grade = "C"
const GradeD Grade = "D"
const GradeE Grade = "E"
const GradeF Grade = "F"
const GradeG Grade = "G"