domain

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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 Rules

type Rules struct {
	Rules []Rule `json:"rules"`
}

Rules stores list of rules

func (*Rules) Hint

func (r *Rules) Hint() []Rule

Hint returns hint rules

func (*Rules) May

func (r *Rules) May() []Rule

May returns may rules

func (*Rules) Must

func (r *Rules) Must() []Rule

Must returns must rules

func (*Rules) Should

func (r *Rules) Should() []Rule

Should returns should rules

type Violation

type Violation struct {
	Title         string   `json:"title"`
	Decription    string   `json:"description"`
	ViolationType string   `json:"violation_type"`
	RuleLink      string   `json:"rule_link"`
	Pointer       string   `json:"pointer"`
	Paths         []string `json:"paths"`
}

Violation keeps information about Zally violations

func (*Violation) ToPointerDisplayString added in v1.2.0

func (v *Violation) ToPointerDisplayString() string

ToPointerDisplayString returns the violation's Pointer 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) Hint

func (v *Violations) Hint() []Violation

Hint returns hint violations

func (*Violations) May

func (v *Violations) May() []Violation

May returns may violations

func (*Violations) Must

func (v *Violations) Must() []Violation

Must returns must violations

func (*Violations) Should

func (v *Violations) Should() []Violation

Should returns should violations

type ViolationsCount

type ViolationsCount struct {
	Must   int `json:"must"`
	Should int `json:"should"`
	May    int `json:"may"`
	Hint   int `json:"hint"`
}

ViolationsCount contains violation counters

Jump to

Keyboard shortcuts

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