style

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Guideline_State_name = map[int32]string{
		0: "STATE_UNSPECIFIED",
		1: "PROPOSED",
		2: "ACTIVE",
		3: "DEPRECATED",
		4: "DISABLED",
	}
	Guideline_State_value = map[string]int32{
		"STATE_UNSPECIFIED": 0,
		"PROPOSED":          1,
		"ACTIVE":            2,
		"DEPRECATED":        3,
		"DISABLED":          4,
	}
)

Enum value maps for Guideline_State.

View Source
var (
	Rule_Severity_name = map[int32]string{
		0: "SEVERITY_UNSPECIFIED",
		1: "ERROR",
		2: "WARNING",
		3: "INFO",
		4: "HINT",
	}
	Rule_Severity_value = map[string]int32{
		"SEVERITY_UNSPECIFIED": 0,
		"ERROR":                1,
		"WARNING":              2,
		"INFO":                 3,
		"HINT":                 4,
	}
)

Enum value maps for Rule_Severity.

View Source
var File_google_cloud_apigeeregistry_v1_style_conformance_report_proto protoreflect.FileDescriptor
View Source
var File_google_cloud_apigeeregistry_v1_style_lint_proto protoreflect.FileDescriptor
View Source
var File_google_cloud_apigeeregistry_v1_style_style_guide_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ConformanceReport

type ConformanceReport struct {

	// Artifact identifier. This will be auto-generated based on the id of the
	// StyleGuide used to calculate this.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Artifact kind. May be used in YAML representations to identify the type of
	// this artifact.
	Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"`
	// Full resource name of the StyleGuide artifact which was used
	// to generate this report.
	Styleguide string `protobuf:"bytes,3,opt,name=styleguide,proto3" json:"styleguide,omitempty"`
	// A list of guideline report groups.
	GuidelineReportGroups []*GuidelineReportGroup `` /* 126-byte string literal not displayed */
	// contains filtered or unexported fields
}

ConformanceReport describes how well an API Spec or a series of API Specs conform to a specific API Style guide.

func (*ConformanceReport) Descriptor deprecated

func (*ConformanceReport) Descriptor() ([]byte, []int)

Deprecated: Use ConformanceReport.ProtoReflect.Descriptor instead.

func (*ConformanceReport) GetGuidelineReportGroups

func (x *ConformanceReport) GetGuidelineReportGroups() []*GuidelineReportGroup

func (*ConformanceReport) GetId

func (x *ConformanceReport) GetId() string

func (*ConformanceReport) GetKind

func (x *ConformanceReport) GetKind() string

func (*ConformanceReport) GetStyleguide

func (x *ConformanceReport) GetStyleguide() string

func (*ConformanceReport) ProtoMessage

func (*ConformanceReport) ProtoMessage()

func (*ConformanceReport) ProtoReflect

func (x *ConformanceReport) ProtoReflect() protoreflect.Message

func (*ConformanceReport) Reset

func (x *ConformanceReport) Reset()

func (*ConformanceReport) String

func (x *ConformanceReport) String() string

type Guideline

type Guideline struct {

	// Identifier of the guideline.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Human-meaningful name of the guideline.
	DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	// A detailed description of the guideline.
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// A list of rules that this guideline specifies.
	Rules []*Rule `protobuf:"bytes,4,rep,name=rules,proto3" json:"rules,omitempty"`
	// Indicates the state of the guideline.
	State Guideline_State `protobuf:"varint,5,opt,name=state,proto3,enum=google.cloud.apigeeregistry.v1.style.Guideline_State" json:"state,omitempty"`
	// contains filtered or unexported fields
}

Guideline defines a set of rules that achieve a common design goal for API specs.

func (*Guideline) Descriptor deprecated

func (*Guideline) Descriptor() ([]byte, []int)

Deprecated: Use Guideline.ProtoReflect.Descriptor instead.

func (*Guideline) GetDescription

func (x *Guideline) GetDescription() string

func (*Guideline) GetDisplayName

func (x *Guideline) GetDisplayName() string

func (*Guideline) GetId

func (x *Guideline) GetId() string

func (*Guideline) GetRules

func (x *Guideline) GetRules() []*Rule

func (*Guideline) GetState

func (x *Guideline) GetState() Guideline_State

func (*Guideline) ProtoMessage

func (*Guideline) ProtoMessage()

func (*Guideline) ProtoReflect

func (x *Guideline) ProtoReflect() protoreflect.Message

func (*Guideline) Reset

func (x *Guideline) Reset()

func (*Guideline) String

func (x *Guideline) String() string

type GuidelineReport

type GuidelineReport struct {

	// ID of the guideline that this report pertains to.
	GuidelineId string `protobuf:"bytes,1,opt,name=guideline_id,json=guidelineId,proto3" json:"guideline_id,omitempty"`
	// A list of rule report groups.
	RuleReportGroups []*RuleReportGroup `protobuf:"bytes,2,rep,name=rule_report_groups,json=ruleReportGroups,proto3" json:"rule_report_groups,omitempty"`
	// contains filtered or unexported fields
}

GuidelineReport describes how well an API Spec or a series of API Specs conform to a guideline within an API Style Guide.

func (*GuidelineReport) Descriptor deprecated

func (*GuidelineReport) Descriptor() ([]byte, []int)

Deprecated: Use GuidelineReport.ProtoReflect.Descriptor instead.

func (*GuidelineReport) GetGuidelineId

func (x *GuidelineReport) GetGuidelineId() string

func (*GuidelineReport) GetRuleReportGroups

func (x *GuidelineReport) GetRuleReportGroups() []*RuleReportGroup

func (*GuidelineReport) ProtoMessage

func (*GuidelineReport) ProtoMessage()

func (*GuidelineReport) ProtoReflect

func (x *GuidelineReport) ProtoReflect() protoreflect.Message

func (*GuidelineReport) Reset

func (x *GuidelineReport) Reset()

func (*GuidelineReport) String

func (x *GuidelineReport) String() string

type GuidelineReportGroup

type GuidelineReportGroup struct {

	// State of the guidelines in this report group.
	State Guideline_State `protobuf:"varint,1,opt,name=state,proto3,enum=google.cloud.apigeeregistry.v1.style.Guideline_State" json:"state,omitempty"`
	// A list of guideline reports.
	GuidelineReports []*GuidelineReport `protobuf:"bytes,2,rep,name=guideline_reports,json=guidelineReports,proto3" json:"guideline_reports,omitempty"`
	// contains filtered or unexported fields
}

GuidelineReportGroup is an abstraction that maps state (PROPOSED, ACTIVE, DEPRECATED, DISABLED) to a list of guideline reports for guidelines of that state.

func (*GuidelineReportGroup) Descriptor deprecated

func (*GuidelineReportGroup) Descriptor() ([]byte, []int)

Deprecated: Use GuidelineReportGroup.ProtoReflect.Descriptor instead.

func (*GuidelineReportGroup) GetGuidelineReports

func (x *GuidelineReportGroup) GetGuidelineReports() []*GuidelineReport

func (*GuidelineReportGroup) GetState

func (x *GuidelineReportGroup) GetState() Guideline_State

func (*GuidelineReportGroup) ProtoMessage

func (*GuidelineReportGroup) ProtoMessage()

func (*GuidelineReportGroup) ProtoReflect

func (x *GuidelineReportGroup) ProtoReflect() protoreflect.Message

func (*GuidelineReportGroup) Reset

func (x *GuidelineReportGroup) Reset()

func (*GuidelineReportGroup) String

func (x *GuidelineReportGroup) String() string

type Guideline_State

type Guideline_State int32

Possible states for this guideline.

const (
	// The default value, unused.
	Guideline_STATE_UNSPECIFIED Guideline_State = 0
	// The guideline is being proposed, and shouldn't yet
	// be enforced.
	Guideline_PROPOSED Guideline_State = 1
	// The guideline is active and should be enforced.
	Guideline_ACTIVE Guideline_State = 2
	// The guideline is deprecated as of the recent version,
	// and shouldn't be enforced.
	Guideline_DEPRECATED Guideline_State = 3
	// The guideline has been disabled and shouldn't be enforced.
	Guideline_DISABLED Guideline_State = 4
)

func (Guideline_State) Descriptor

func (Guideline_State) Enum

func (x Guideline_State) Enum() *Guideline_State

func (Guideline_State) EnumDescriptor deprecated

func (Guideline_State) EnumDescriptor() ([]byte, []int)

Deprecated: Use Guideline_State.Descriptor instead.

func (Guideline_State) Number

func (Guideline_State) String

func (x Guideline_State) String() string

func (Guideline_State) Type

type Lint

type Lint struct {

	// The name of the result.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The lint results for each file examined.
	Files []*LintFile `protobuf:"bytes,2,rep,name=files,proto3" json:"files,omitempty"`
	// contains filtered or unexported fields
}

Lint wraps the result of a linter run for an API. (-- api-linter: core::0123::resource-annotation=disabled

aip.dev/not-precedent: This message is not currently used in an API. --)

func (*Lint) Descriptor deprecated

func (*Lint) Descriptor() ([]byte, []int)

Deprecated: Use Lint.ProtoReflect.Descriptor instead.

func (*Lint) GetFiles

func (x *Lint) GetFiles() []*LintFile

func (*Lint) GetName

func (x *Lint) GetName() string

func (*Lint) ProtoMessage

func (*Lint) ProtoMessage()

func (*Lint) ProtoReflect

func (x *Lint) ProtoReflect() protoreflect.Message

func (*Lint) Reset

func (x *Lint) Reset()

func (*Lint) String

func (x *Lint) String() string

type LintFile

type LintFile struct {

	// The path of the file linted.
	FilePath string `protobuf:"bytes,1,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"`
	// The problems found when the file was linted.
	Problems []*LintProblem `protobuf:"bytes,2,rep,name=problems,proto3" json:"problems,omitempty"`
	// contains filtered or unexported fields
}

LintFile wraps the result of a linter run for a file. (-- api-linter: core::0123::resource-annotation=disabled

aip.dev/not-precedent: This message is not currently used in an API. --)

func (*LintFile) Descriptor deprecated

func (*LintFile) Descriptor() ([]byte, []int)

Deprecated: Use LintFile.ProtoReflect.Descriptor instead.

func (*LintFile) GetFilePath

func (x *LintFile) GetFilePath() string

func (*LintFile) GetProblems

func (x *LintFile) GetProblems() []*LintProblem

func (*LintFile) ProtoMessage

func (*LintFile) ProtoMessage()

func (*LintFile) ProtoReflect

func (x *LintFile) ProtoReflect() protoreflect.Message

func (*LintFile) Reset

func (x *LintFile) Reset()

func (*LintFile) String

func (x *LintFile) String() string

type LintLocation

type LintLocation struct {

	// The initial position of a problem.
	StartPosition *LintPosition `protobuf:"bytes,1,opt,name=start_position,json=startPosition,proto3" json:"start_position,omitempty"`
	// The end position of a problem.
	EndPosition *LintPosition `protobuf:"bytes,2,opt,name=end_position,json=endPosition,proto3" json:"end_position,omitempty"`
	// contains filtered or unexported fields
}

LintLocation represents a range of text in a file. (-- api-linter: core::0123::resource-annotation=disabled

aip.dev/not-precedent: This message is not currently used in an API. --)

func (*LintLocation) Descriptor deprecated

func (*LintLocation) Descriptor() ([]byte, []int)

Deprecated: Use LintLocation.ProtoReflect.Descriptor instead.

func (*LintLocation) GetEndPosition

func (x *LintLocation) GetEndPosition() *LintPosition

func (*LintLocation) GetStartPosition

func (x *LintLocation) GetStartPosition() *LintPosition

func (*LintLocation) ProtoMessage

func (*LintLocation) ProtoMessage()

func (*LintLocation) ProtoReflect

func (x *LintLocation) ProtoReflect() protoreflect.Message

func (*LintLocation) Reset

func (x *LintLocation) Reset()

func (*LintLocation) String

func (x *LintLocation) String() string

type LintPosition

type LintPosition struct {

	// A line number in a file.
	LineNumber int32 `protobuf:"varint,1,opt,name=line_number,json=lineNumber,proto3" json:"line_number,omitempty"`
	// A column number in a file.
	ColumnNumber int32 `protobuf:"varint,2,opt,name=column_number,json=columnNumber,proto3" json:"column_number,omitempty"`
	// contains filtered or unexported fields
}

LintPosition represents a point in a file. (-- api-linter: core::0123::resource-annotation=disabled

aip.dev/not-precedent: This message is not currently used in an API. --)

func (*LintPosition) Descriptor deprecated

func (*LintPosition) Descriptor() ([]byte, []int)

Deprecated: Use LintPosition.ProtoReflect.Descriptor instead.

func (*LintPosition) GetColumnNumber

func (x *LintPosition) GetColumnNumber() int32

func (*LintPosition) GetLineNumber

func (x *LintPosition) GetLineNumber() int32

func (*LintPosition) ProtoMessage

func (*LintPosition) ProtoMessage()

func (*LintPosition) ProtoReflect

func (x *LintPosition) ProtoReflect() protoreflect.Message

func (*LintPosition) Reset

func (x *LintPosition) Reset()

func (*LintPosition) String

func (x *LintPosition) String() string

type LintProblem

type LintProblem struct {

	// A message describing the problem.
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// An identifier for a related design rule.
	RuleId string `protobuf:"bytes,2,opt,name=rule_id,json=ruleId,proto3" json:"rule_id,omitempty"`
	// A link for a related design rule.
	RuleDocUri string `protobuf:"bytes,3,opt,name=rule_doc_uri,json=ruleDocUri,proto3" json:"rule_doc_uri,omitempty"`
	// A suggestion for resolving the problem.
	Suggestion string `protobuf:"bytes,4,opt,name=suggestion,proto3" json:"suggestion,omitempty"`
	// The location in the file of the problem.
	Location *LintLocation `protobuf:"bytes,5,opt,name=location,proto3" json:"location,omitempty"`
	// contains filtered or unexported fields
}

LintProblem represents a problem found by a linter. (-- api-linter: core::0123::resource-annotation=disabled

aip.dev/not-precedent: This message is not currently used in an API. --)

func (*LintProblem) Descriptor deprecated

func (*LintProblem) Descriptor() ([]byte, []int)

Deprecated: Use LintProblem.ProtoReflect.Descriptor instead.

func (*LintProblem) GetLocation

func (x *LintProblem) GetLocation() *LintLocation

func (*LintProblem) GetMessage

func (x *LintProblem) GetMessage() string

func (*LintProblem) GetRuleDocUri

func (x *LintProblem) GetRuleDocUri() string

func (*LintProblem) GetRuleId

func (x *LintProblem) GetRuleId() string

func (*LintProblem) GetSuggestion

func (x *LintProblem) GetSuggestion() string

func (*LintProblem) ProtoMessage

func (*LintProblem) ProtoMessage()

func (*LintProblem) ProtoReflect

func (x *LintProblem) ProtoReflect() protoreflect.Message

func (*LintProblem) Reset

func (x *LintProblem) Reset()

func (*LintProblem) String

func (x *LintProblem) String() string

type LintProblemCount

type LintProblemCount struct {

	// The number of occurrences of the problem.
	Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
	// An identifier for the related design rule.
	RuleId string `protobuf:"bytes,2,opt,name=rule_id,json=ruleId,proto3" json:"rule_id,omitempty"`
	// A link for the related design rule.
	RuleDocUri string `protobuf:"bytes,3,opt,name=rule_doc_uri,json=ruleDocUri,proto3" json:"rule_doc_uri,omitempty"`
	// contains filtered or unexported fields
}

LintProblemCount represents the number of times a problem was found in linting. (-- api-linter: core::0123::resource-annotation=disabled

aip.dev/not-precedent: This message is not currently used in an API. --)

func (*LintProblemCount) Descriptor deprecated

func (*LintProblemCount) Descriptor() ([]byte, []int)

Deprecated: Use LintProblemCount.ProtoReflect.Descriptor instead.

func (*LintProblemCount) GetCount

func (x *LintProblemCount) GetCount() int32

func (*LintProblemCount) GetRuleDocUri

func (x *LintProblemCount) GetRuleDocUri() string

func (*LintProblemCount) GetRuleId

func (x *LintProblemCount) GetRuleId() string

func (*LintProblemCount) ProtoMessage

func (*LintProblemCount) ProtoMessage()

func (*LintProblemCount) ProtoReflect

func (x *LintProblemCount) ProtoReflect() protoreflect.Message

func (*LintProblemCount) Reset

func (x *LintProblemCount) Reset()

func (*LintProblemCount) String

func (x *LintProblemCount) String() string

type LintStats

type LintStats struct {

	// A sum of the total operations (GET, POST, PUT, DELETE).
	OperationCount int32 `protobuf:"varint,1,opt,name=operation_count,json=operationCount,proto3" json:"operation_count,omitempty"`
	// The number of schemas contained under this resource.
	SchemaCount int32 `protobuf:"varint,2,opt,name=schema_count,json=schemaCount,proto3" json:"schema_count,omitempty"`
	// Problems found in linting.
	ProblemCounts []*LintProblemCount `protobuf:"bytes,3,rep,name=problem_counts,json=problemCounts,proto3" json:"problem_counts,omitempty"`
	// contains filtered or unexported fields
}

LintStats summarizes linter results. (-- api-linter: core::0123::resource-annotation=disabled

aip.dev/not-precedent: This message is not currently used in an API. --)

func (*LintStats) Descriptor deprecated

func (*LintStats) Descriptor() ([]byte, []int)

Deprecated: Use LintStats.ProtoReflect.Descriptor instead.

func (*LintStats) GetOperationCount

func (x *LintStats) GetOperationCount() int32

func (*LintStats) GetProblemCounts

func (x *LintStats) GetProblemCounts() []*LintProblemCount

func (*LintStats) GetSchemaCount

func (x *LintStats) GetSchemaCount() int32

func (*LintStats) ProtoMessage

func (*LintStats) ProtoMessage()

func (*LintStats) ProtoReflect

func (x *LintStats) ProtoReflect() protoreflect.Message

func (*LintStats) Reset

func (x *LintStats) Reset()

func (*LintStats) String

func (x *LintStats) String() string

type Linter

type Linter struct {

	// Name of the linter.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// A uri to the linter source code or documentation.
	Uri string `protobuf:"bytes,2,opt,name=uri,proto3" json:"uri,omitempty"`
	// contains filtered or unexported fields
}

Linter contains the name and source code / documentation of specific linter. (-- api-linter: core::0123::resource-annotation=disabled

aip.dev/not-precedent: This message is not currently used in an API. --)

func (*Linter) Descriptor deprecated

func (*Linter) Descriptor() ([]byte, []int)

Deprecated: Use Linter.ProtoReflect.Descriptor instead.

func (*Linter) GetName

func (x *Linter) GetName() string

func (*Linter) GetUri

func (x *Linter) GetUri() string

func (*Linter) ProtoMessage

func (*Linter) ProtoMessage()

func (*Linter) ProtoReflect

func (x *Linter) ProtoReflect() protoreflect.Message

func (*Linter) Reset

func (x *Linter) Reset()

func (*Linter) String

func (x *Linter) String() string

type LinterRequest

type LinterRequest struct {

	// This specifies a directory containing the files of the spec that need to
	// be linted. This path is relative to the directory where the plugin is run.
	SpecDirectory string `protobuf:"bytes,1,opt,name=spec_directory,json=specDirectory,proto3" json:"spec_directory,omitempty"`
	// A list of rules that need to be enabled when linting this spec.
	// If no rules are specified, all of the linter's rules should be enabled.
	RuleIds []string `protobuf:"bytes,2,rep,name=rule_ids,json=ruleIds,proto3" json:"rule_ids,omitempty"`
	// contains filtered or unexported fields
}

LinterRequest represents a request to a linter plugin. The plugin will lint the provided spec based on rules that have been enabled. (-- api-linter: core::0123::resource-annotation=disabled

aip.dev/not-precedent: This message is not currently used in an API. --)

func (*LinterRequest) Descriptor deprecated

func (*LinterRequest) Descriptor() ([]byte, []int)

Deprecated: Use LinterRequest.ProtoReflect.Descriptor instead.

func (*LinterRequest) GetRuleIds

func (x *LinterRequest) GetRuleIds() []string

func (*LinterRequest) GetSpecDirectory

func (x *LinterRequest) GetSpecDirectory() string

func (*LinterRequest) ProtoMessage

func (*LinterRequest) ProtoMessage()

func (*LinterRequest) ProtoReflect

func (x *LinterRequest) ProtoReflect() protoreflect.Message

func (*LinterRequest) Reset

func (x *LinterRequest) Reset()

func (*LinterRequest) String

func (x *LinterRequest) String() string

type LinterResponse

type LinterResponse struct {

	// Error message. If non-empty, the plugin failed.
	// The plugin process should exit with status code zero even if it reports
	// an error in this way.
	//
	// This should be used to indicate errors which prevent
	// the plugin from operating as intended. Errors which indicate a problem in
	// the linter itself should be reported by writing a message to stderr and
	// exiting with a non-zero status code.
	Errors []string `protobuf:"bytes,1,rep,name=errors,proto3" json:"errors,omitempty"`
	// The problems found when the file was linted.
	Lint *Lint `protobuf:"bytes,2,opt,name=lint,proto3" json:"lint,omitempty"`
	// contains filtered or unexported fields
}

LinterResponse represents a response returned from a linter plugin. It contains a list of problems that were identified by the linter. (-- api-linter: core::0123::resource-annotation=disabled

aip.dev/not-precedent: This message is not currently used in an API. --)

func (*LinterResponse) Descriptor deprecated

func (*LinterResponse) Descriptor() ([]byte, []int)

Deprecated: Use LinterResponse.ProtoReflect.Descriptor instead.

func (*LinterResponse) GetErrors

func (x *LinterResponse) GetErrors() []string

func (*LinterResponse) GetLint

func (x *LinterResponse) GetLint() *Lint

func (*LinterResponse) ProtoMessage

func (*LinterResponse) ProtoMessage()

func (*LinterResponse) ProtoReflect

func (x *LinterResponse) ProtoReflect() protoreflect.Message

func (*LinterResponse) Reset

func (x *LinterResponse) Reset()

func (*LinterResponse) String

func (x *LinterResponse) String() string

type Rule

type Rule struct {

	// Identifier of the rule.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Human-meaningful name of the rule.
	DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	// A detailed description of the rule.
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// Name of the linter that enforces this rule.
	Linter string `protobuf:"bytes,4,opt,name=linter,proto3" json:"linter,omitempty"`
	// Name of the rule on the linter that enforces it.
	LinterRulename string `protobuf:"bytes,5,opt,name=linter_rulename,json=linterRulename,proto3" json:"linter_rulename,omitempty"`
	// Severity of violating this rule.
	Severity Rule_Severity `` /* 126-byte string literal not displayed */
	// A link to additional documentation relating to this rule.
	DocUri string `protobuf:"bytes,7,opt,name=doc_uri,json=docUri,proto3" json:"doc_uri,omitempty"`
	// contains filtered or unexported fields
}

Rule is a specific design rule that can be applied to an API spec, and is enforced by a specified linter.

func (*Rule) Descriptor deprecated

func (*Rule) Descriptor() ([]byte, []int)

Deprecated: Use Rule.ProtoReflect.Descriptor instead.

func (*Rule) GetDescription

func (x *Rule) GetDescription() string

func (*Rule) GetDisplayName

func (x *Rule) GetDisplayName() string

func (*Rule) GetDocUri

func (x *Rule) GetDocUri() string

func (*Rule) GetId

func (x *Rule) GetId() string

func (*Rule) GetLinter

func (x *Rule) GetLinter() string

func (*Rule) GetLinterRulename

func (x *Rule) GetLinterRulename() string

func (*Rule) GetSeverity

func (x *Rule) GetSeverity() Rule_Severity

func (*Rule) ProtoMessage

func (*Rule) ProtoMessage()

func (*Rule) ProtoReflect

func (x *Rule) ProtoReflect() protoreflect.Message

func (*Rule) Reset

func (x *Rule) Reset()

func (*Rule) String

func (x *Rule) String() string

type RuleReport

type RuleReport struct {

	// ID of the rule that the spec breaches.
	RuleId string `protobuf:"bytes,1,opt,name=rule_id,json=ruleId,proto3" json:"rule_id,omitempty"`
	// Resource name of the spec that the rule was breached on.
	Spec string `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"`
	// File name of the spec that the rule was breached on.
	File string `protobuf:"bytes,3,opt,name=file,proto3" json:"file,omitempty"`
	// A suggestion for resolving the problem.
	Suggestion string `protobuf:"bytes,4,opt,name=suggestion,proto3" json:"suggestion,omitempty"`
	// The location of the problem in the spec file.
	Location *LintLocation `protobuf:"bytes,5,opt,name=location,proto3" json:"location,omitempty"`
	// Human-meaningful name of the breached rule.
	DisplayName string `protobuf:"bytes,6,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	// A detailed description of the breached rule.
	Description string `protobuf:"bytes,7,opt,name=description,proto3" json:"description,omitempty"`
	// A link to additional documentation relating to the breached rule.
	DocUri string `protobuf:"bytes,8,opt,name=doc_uri,json=docUri,proto3" json:"doc_uri,omitempty"`
	// contains filtered or unexported fields
}

RuleReport provides information and feedback on a rule that a spec breaches within a guideline on an API Style Guide.

func (*RuleReport) Descriptor deprecated

func (*RuleReport) Descriptor() ([]byte, []int)

Deprecated: Use RuleReport.ProtoReflect.Descriptor instead.

func (*RuleReport) GetDescription

func (x *RuleReport) GetDescription() string

func (*RuleReport) GetDisplayName

func (x *RuleReport) GetDisplayName() string

func (*RuleReport) GetDocUri

func (x *RuleReport) GetDocUri() string

func (*RuleReport) GetFile

func (x *RuleReport) GetFile() string

func (*RuleReport) GetLocation

func (x *RuleReport) GetLocation() *LintLocation

func (*RuleReport) GetRuleId

func (x *RuleReport) GetRuleId() string

func (*RuleReport) GetSpec

func (x *RuleReport) GetSpec() string

func (*RuleReport) GetSuggestion

func (x *RuleReport) GetSuggestion() string

func (*RuleReport) ProtoMessage

func (*RuleReport) ProtoMessage()

func (*RuleReport) ProtoReflect

func (x *RuleReport) ProtoReflect() protoreflect.Message

func (*RuleReport) Reset

func (x *RuleReport) Reset()

func (*RuleReport) String

func (x *RuleReport) String() string

type RuleReportGroup

type RuleReportGroup struct {

	// Severity of the rules in this report group.
	Severity Rule_Severity `` /* 126-byte string literal not displayed */
	// A list of rule reports.
	RuleReports []*RuleReport `protobuf:"bytes,2,rep,name=rule_reports,json=ruleReports,proto3" json:"rule_reports,omitempty"`
	// contains filtered or unexported fields
}

RuleReportGroup is an abstraction that maps severity (ERROR WARNING, INFO, HINT) to a list of rule reports for rules of that severity.

func (*RuleReportGroup) Descriptor deprecated

func (*RuleReportGroup) Descriptor() ([]byte, []int)

Deprecated: Use RuleReportGroup.ProtoReflect.Descriptor instead.

func (*RuleReportGroup) GetRuleReports

func (x *RuleReportGroup) GetRuleReports() []*RuleReport

func (*RuleReportGroup) GetSeverity

func (x *RuleReportGroup) GetSeverity() Rule_Severity

func (*RuleReportGroup) ProtoMessage

func (*RuleReportGroup) ProtoMessage()

func (*RuleReportGroup) ProtoReflect

func (x *RuleReportGroup) ProtoReflect() protoreflect.Message

func (*RuleReportGroup) Reset

func (x *RuleReportGroup) Reset()

func (*RuleReportGroup) String

func (x *RuleReportGroup) String() string

type Rule_Severity

type Rule_Severity int32

Possible severities for the violation of a rule.

const (
	// The default value, unused.
	Rule_SEVERITY_UNSPECIFIED Rule_Severity = 0
	// Violation of the rule is an error that must be fixed.
	Rule_ERROR Rule_Severity = 1
	// Violation of the rule is a pattern that is wrong,
	// and should be warned about.
	Rule_WARNING Rule_Severity = 2
	// Violation of the rule is not necessarily a bad pattern
	// or error, but information the user should be aware of.
	Rule_INFO Rule_Severity = 3
	// Violation of the rule is a hint that is provided to
	// the user to fix their spec's design.
	Rule_HINT Rule_Severity = 4
)

func (Rule_Severity) Descriptor

func (Rule_Severity) Enum

func (x Rule_Severity) Enum() *Rule_Severity

func (Rule_Severity) EnumDescriptor deprecated

func (Rule_Severity) EnumDescriptor() ([]byte, []int)

Deprecated: Use Rule_Severity.Descriptor instead.

func (Rule_Severity) Number

func (Rule_Severity) String

func (x Rule_Severity) String() string

func (Rule_Severity) Type

type StyleGuide

type StyleGuide struct {

	// Identifier of the style guide.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Artifact kind. May be used in YAML representations to identify the type of
	// this artifact.
	Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"`
	// Human-meaningful name of the style guide.
	DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	// This field lists the MIME types of the specs that the style guide applies
	// to. It is a list containing style (format) descriptors that are specified
	// as a Media Type (https://en.wikipedia.org/wiki/Media_type).
	// Possible values include "application/vnd.apigee.proto",
	// "application/vnd.apigee.openapi", and "application/vnd.apigee.graphql",
	// with possible suffixes representing compression types. These hypothetical
	// names are defined in the vendor tree defined in RFC6838
	// (https://tools.ietf.org/html/rfc6838) and are not final.
	MimeTypes []string `protobuf:"bytes,4,rep,name=mime_types,json=mimeTypes,proto3" json:"mime_types,omitempty"`
	// A list of guidelines that are specified by this style guide.
	Guidelines []*Guideline `protobuf:"bytes,5,rep,name=guidelines,proto3" json:"guidelines,omitempty"`
	// A list of linters that this style guide uses.
	Linters []*Linter `protobuf:"bytes,6,rep,name=linters,proto3" json:"linters,omitempty"`
	// contains filtered or unexported fields
}

StyleGuide defines a set of guidelines and linters that govern the static analysis of API Specs with specified mime types.

func (*StyleGuide) Descriptor deprecated

func (*StyleGuide) Descriptor() ([]byte, []int)

Deprecated: Use StyleGuide.ProtoReflect.Descriptor instead.

func (*StyleGuide) GetDisplayName

func (x *StyleGuide) GetDisplayName() string

func (*StyleGuide) GetGuidelines

func (x *StyleGuide) GetGuidelines() []*Guideline

func (*StyleGuide) GetId

func (x *StyleGuide) GetId() string

func (*StyleGuide) GetKind

func (x *StyleGuide) GetKind() string

func (*StyleGuide) GetLinters

func (x *StyleGuide) GetLinters() []*Linter

func (*StyleGuide) GetMimeTypes

func (x *StyleGuide) GetMimeTypes() []string

func (*StyleGuide) ProtoMessage

func (*StyleGuide) ProtoMessage()

func (*StyleGuide) ProtoReflect

func (x *StyleGuide) ProtoReflect() protoreflect.Message

func (*StyleGuide) Reset

func (x *StyleGuide) Reset()

func (*StyleGuide) String

func (x *StyleGuide) String() string

Jump to

Keyboard shortcuts

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