Documentation ¶
Index ¶
- Constants
- func ParseScope(s string) (string, error)
- func ScopeMatch(wantScope, tryScope string) bool
- type PolicyRule
- type PolicyViolation
- type PolicyViolationLocations
- type PolicyViolationsSet
- type PolicyViolationsSets
- func (sets *PolicyViolationsSets) AddSimple(ruleName, location, value string)
- func (sets *PolicyViolationsSets) AddViolation(violation PolicyViolation)
- func (sets *PolicyViolationsSets) AddViolations(violations []PolicyViolation)
- func (sets *PolicyViolationsSets) Count() uint
- func (sets *PolicyViolationsSets) CountsByRule() map[string]uint
- func (sets *PolicyViolationsSets) LocationsByRule() ViolationLocationsByRuleSet
- func (sets *PolicyViolationsSets) UpsertSet(upsertSet PolicyViolationsSet) error
- func (sets *PolicyViolationsSets) UpsertSets(upsertSets *PolicyViolationsSets) error
- type ViolationLocationsByRuleSet
Constants ¶
View Source
const ( RulenameDatatypeIntFormatStandardExist = "datatype-int-format-standard-exist" RuleOpDescExist = "operation-description-exist" RuleOpIdExist = "operation-operationid-exist" RulenameOpIdStyleCamelCase = "operation-operationid-style-camelcase" RulenameOpIdStyleKebabCase = "operation-operationid-style-kebabcase" RulenameOpIdStylePascalCase = "operation-operationid-style-pascalcase" RulenameOpIdStyleSnakeCase = "operation-operationid-style-snakecase" RulenameSchemaNameStylePascalCase = "schema-name-style-pascalcase" RulenameSchemaHasReference = "schema-has-reference" RulenameSchemaReferenceHasSchema = "schema-reference-has-schema" RulenameOpSummaryExist = "operation-summary-exist" RulenameOpSummaryStyleFirstUpperCase = "operation-summary-style-first-uppercase" RuleOpTagsCountOneOnly = "operation-tags-count-one" RulePathParamNameExist = "path-param-name-exist" RulenamePathParamStyleCamelCase = "path-param-style-camelcase" RulenamePathParamStyleKebabCase = "path-param-style-kebabcase" RulenamePathParamStylePascalCase = "path-param-style-pascalcase" RulenamePathParamStyleSnakeCase = "path-param-style-snakecase" RulenameSchemaPropEnumStyleCamelCase = "schema-property-enum-style-camelcase" RulenameSchemaPropEnumStyleKebabCase = "schema-property-enum-style-kebabcase" RulenameSchemaPropEnumStylePascalCase = "schema-property-enum-style-pascalcase" RulenameSchemaPropEnumStyleSnakeCase = "schema-property-enum-style-snakecase" RuleSchemaPropDescExist = "property-description-exist" RulenameSchemaObjectPropsExist = "schema-object-properties-exist" RulenameTagStyleFirstUpperCase = "tag-style-first-uppercase" )
View Source
const ( ScopeOperation = "operation" ScopeSpecification = "specification" )
Variables ¶
This section is empty.
Functions ¶
func ParseScope ¶
func ScopeMatch ¶
Types ¶
type PolicyRule ¶
type PolicyViolation ¶
type PolicyViolationLocations ¶
func (*PolicyViolationLocations) Finalize ¶
func (vl *PolicyViolationLocations) Finalize()
type PolicyViolationsSet ¶
type PolicyViolationsSet struct { RuleName string Violations []PolicyViolation }
func NewPolicyViolationsSet ¶
func NewPolicyViolationsSet(ruleName string) PolicyViolationsSet
func (*PolicyViolationsSet) Count ¶
func (set *PolicyViolationsSet) Count() uint
func (*PolicyViolationsSet) Locations ¶
func (set *PolicyViolationsSet) Locations() PolicyViolationLocations
type PolicyViolationsSets ¶
type PolicyViolationsSets struct {
ByRule map[string]PolicyViolationsSet
}
func NewPolicyViolationsSets ¶
func NewPolicyViolationsSets() *PolicyViolationsSets
func (*PolicyViolationsSets) AddSimple ¶
func (sets *PolicyViolationsSets) AddSimple(ruleName, location, value string)
func (*PolicyViolationsSets) AddViolation ¶
func (sets *PolicyViolationsSets) AddViolation(violation PolicyViolation)
func (*PolicyViolationsSets) AddViolations ¶
func (sets *PolicyViolationsSets) AddViolations(violations []PolicyViolation)
func (*PolicyViolationsSets) Count ¶
func (sets *PolicyViolationsSets) Count() uint
func (*PolicyViolationsSets) CountsByRule ¶ added in v1.8.0
func (sets *PolicyViolationsSets) CountsByRule() map[string]uint
func (*PolicyViolationsSets) LocationsByRule ¶
func (sets *PolicyViolationsSets) LocationsByRule() ViolationLocationsByRuleSet
func (*PolicyViolationsSets) UpsertSet ¶
func (sets *PolicyViolationsSets) UpsertSet(upsertSet PolicyViolationsSet) error
func (*PolicyViolationsSets) UpsertSets ¶
func (sets *PolicyViolationsSets) UpsertSets(upsertSets *PolicyViolationsSets) error
type ViolationLocationsByRuleSet ¶
func (*ViolationLocationsByRuleSet) Condense ¶
func (vlrs *ViolationLocationsByRuleSet) Condense()
func (*ViolationLocationsByRuleSet) Count ¶
func (vlrs *ViolationLocationsByRuleSet) Count() uint
Click to show internal directories.
Click to hide internal directories.