Documentation ¶
Index ¶
Constants ¶
View Source
const ( ServerError = iota + 1 ClientError ValidationError )
Variables ¶
This section is empty.
Functions ¶
func NewAppError ¶
Types ¶
type APIViolationsRequest ¶
type APIViolationsRequest struct {
APIDefinitionString string `json:"api_definition_string"`
}
APIViolationsRequest is a wrapper around API definition
type Rule ¶
type Rule struct { Title string `json:"title"` Code string `json:"code"` Type string `json:"type"` URL string `json:"url"` IsActive bool `json:"is_active"` }
Rule keeps information about API rules
type Violation ¶
type Violation struct { Title string `json:"title"` Description string `json:"description"` ViolationType string `json:"violation_type"` RuleLink string `json:"rule_link"` Pointer string `json:"pointer"` StartLine int `json:"start_line"` EndLine int `json:"end_line"` Paths []string `json:"paths"` }
Violation keeps information about Zally violations
func (*Violation) ToPointerDisplayString ¶
ToPointerDisplayString returns the pointer of the violation in user friendly display format
type Violations ¶
type Violations struct { Violations []Violation `json:"violations"` ViolationsCount ViolationsCount `json:"violations_count"` Message string `json:"message"` }
Violations stores api_violations response
func (*Violations) Should ¶
func (v *Violations) Should() []Violation
Should returns should violations
Click to show internal directories.
Click to hide internal directories.