reports

package
v0.3.13 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: MIT Imports: 1 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CategoryStatistic

type CategoryStatistic struct {
	ID           uint      `gorm:"primaryKey" json:"-" yaml:"-"`
	CreatedAt    time.Time `json:"-" yaml:"-"`
	UpdatedAt    time.Time `json:"-" yaml:"-"`
	CategoryName string    `json:"categoryName" yaml:"categoryName"`
	CategoryId   string    `json:"categoryId" yaml:"categoryId"`
	NumIssues    int       `json:"numIssues" yaml:"numIssues"`
	Score        int       `json:"score" yaml:"score"`
	Warnings     int       `json:"warnings" yaml:"warnings"`
	Errors       int       `json:"errors" yaml:"errors"`
	Info         int       `json:"info" yaml:"info"`
	Hints        int       `json:"hints" yaml:"hints"`
}

CategoryStatistic represents the number of issues for a particular category

type Range added in v0.0.4

type Range struct {
	Start RangeItem `json:"start,omitempty" yaml:"start,omitempty"`
	End   RangeItem `json:"end,omitempty" yaml:"end,omitempty"`
}

Range indicates the start and end of a report item

type RangeItem added in v0.0.4

type RangeItem struct {
	Line int `json:"line" yaml:"line"`
	Char int `json:"character" yaml:"character"`
}

RangeItem indicates the line and character of a range.

type ReportStatistics

type ReportStatistics struct {
	ID                 uint                 `gorm:"primaryKey" json:"-" yaml:"-"`
	CreatedAt          time.Time            `json:"-" yaml:"-"`
	UpdatedAt          time.Time            `json:"-" yaml:"-"`
	FilesizeKB         int                  `json:"filesizeKb,omitempty" yaml:"filesizeKb,omitempty"`
	FilesizeBytes      int                  `json:"filesizeBytes,omitempty" yaml:"filesizeBytes,omitempty"`
	SpecType           string               `json:"specType,omitempty" yaml:"specType,omitempty"`
	SpecFormat         string               `json:"specFormat,omitempty" yaml:"specFormat,omitempty"`
	Version            string               `json:"version,omitempty" yaml:"version,omitempty"`
	References         int                  `json:"references,omitempty" yaml:"references,omitempty"`
	ExternalDocs       int                  `json:"externalDocs,omitempty" yaml:"externalDocs,omitempty"`
	Schemas            int                  `json:"schemas,omitempty" yaml:"schemas,omitempty"`
	Parameters         int                  `json:"parameters,omitempty" yaml:"parameters,omitempty"`
	Links              int                  `json:"links,omitempty" yaml:"links,omitempty"`
	Paths              int                  `json:"paths,omitempty" yaml:"paths,omitempty"`
	Operations         int                  `json:"operations,omitempty" yaml:"operations,omitempty"`
	Tags               int                  `json:"tags,omitempty" yaml:"tags,omitempty"`
	Examples           int                  `json:"examples,omitempty" yaml:"examples,omitempty"`
	Enums              int                  `json:"enums,omitempty" yaml:"enums,omitempty"`
	Security           int                  `json:"security,omitempty" yaml:"security,omitempty"`
	OverallScore       int                  `json:"overallScore,omitempty" yaml:"overallScore,omitempty"`
	TotalErrors        int                  `json:"totalErrors,omitempty" yaml:"totalErrors,omitempty"`
	TotalWarnings      int                  `json:"totalWarnings,omitempty" yaml:"totalWarnings,omitempty"`
	TotalInfo          int                  `json:"totalInfo,omitempty" yaml:"totalInfo,omitempty"`
	TotalHints         int                  `json:"totalHints,omitempty" yaml:"totalHints,omitempty"`
	CategoryStatistics []*CategoryStatistic `gorm:"foreignKey:ID" json:"categoryStatistics,omitempty" yaml:"categoryStatistics,omitempty"`
}

ReportStatistics represents statistics for an individual specification report.

type SpectralReport added in v0.0.4

type SpectralReport struct {
	Code     string   `json:"code" yaml:"code"`         // the rule that was run
	Path     []string `json:"path" yaml:"path"`         // the path to the item, broken down into a slice
	Message  string   `json:"message" yaml:"message"`   // the result message
	Severity int      `json:"severity" yaml:"severity"` // the severity reported
	Range    Range    `json:"range" yaml:"range"`       // the location of the issue in the spec.
	Source   string   `json:"source" yaml:"source"`     // the source of the report.
}

SpectralReport represents a model that can be deserialized into a spectral compatible output.

Jump to

Keyboard shortcuts

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