note_proto_go_src

package
v0.0.0-...-2435b8f Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package note_proto_go_src is a generated protocol buffer package.

It is generated from these files:

shipshape/proto/note.proto

It has these top-level messages:

Note
Location
Fix
Replacement
FixRange
AdditionalData

Index

Constants

This section is empty.

Variables

View Source
var Note_Severity_name = map[int32]string{
	1: "BUILD_ERROR",
	2: "WARNING",
	3: "OTHER",
}
View Source
var Note_Severity_value = map[string]int32{
	"BUILD_ERROR": 1,
	"WARNING":     2,
	"OTHER":       3,
}

Functions

This section is empty.

Types

type AdditionalData

type AdditionalData struct {
	// The time this note was generated. Used to disambiguate when analysis tools
	// produce notes nondeterministically.
	GenerationTimestampMillis *uint64 `protobuf:"varint,1,opt,name=generation_timestamp_millis" json:"generation_timestamp_millis,omitempty"`
	XXX_unrecognized          []byte  `json:"-"`
}

A collection of fields containing additional category or environment-specific data.

func (*AdditionalData) GetGenerationTimestampMillis

func (m *AdditionalData) GetGenerationTimestampMillis() uint64

func (*AdditionalData) ProtoMessage

func (*AdditionalData) ProtoMessage()

func (*AdditionalData) Reset

func (m *AdditionalData) Reset()

func (*AdditionalData) String

func (m *AdditionalData) String() string

type Fix

type Fix struct {
	// An optional short human readable description that may be shown in a UI.
	Description *string `protobuf:"bytes,1,opt,name=description" json:"description,omitempty"`
	// The context in which to interpret the path and the range inside the
	// replacement, e.g. the location of a specific revision in a repo.
	// Must match the source_context in the enclosing note.
	SourceContext *source_v1.SourceContext `protobuf:"bytes,2,opt,name=source_context" json:"source_context,omitempty"`
	// A delta to be applied to a specific file(s).
	// Replacements must be grouped by file and within the file ordered by
	// the range. Replacements for a given fix must not overlap.
	Replacement      []*Replacement `protobuf:"bytes,3,rep,name=replacement" json:"replacement,omitempty"`
	XXX_unrecognized []byte         `json:"-"`
}

A suggested fix for a note.

func (*Fix) GetDescription

func (m *Fix) GetDescription() string

func (*Fix) GetReplacement

func (m *Fix) GetReplacement() []*Replacement

func (*Fix) GetSourceContext

func (m *Fix) GetSourceContext() *source_v1.SourceContext

func (*Fix) ProtoMessage

func (*Fix) ProtoMessage()

func (*Fix) Reset

func (m *Fix) Reset()

func (*Fix) String

func (m *Fix) String() string

type FixRange

type FixRange struct {
	// If the start position specifies the byte field, then the end position
	// also should.
	// Similarly, if the start position specifies the line field, then the end
	// position also should.
	// The start position (in either specification) must be less than or equal
	// to the end position.
	// Indexing starts at position 0, the start position is inclusive and the
	// end position is exclusive.
	Start            *FixRange_Position `protobuf:"bytes,1,opt,name=start" json:"start,omitempty"`
	End              *FixRange_Position `protobuf:"bytes,2,opt,name=end" json:"end,omitempty"`
	XXX_unrecognized []byte             `json:"-"`
}

Defines a range of lines or bytes in a text. Indexing starts at position 0, the start position is inclusive and the end position is exclusive.

func (*FixRange) GetEnd

func (m *FixRange) GetEnd() *FixRange_Position

func (*FixRange) GetStart

func (m *FixRange) GetStart() *FixRange_Position

func (*FixRange) ProtoMessage

func (*FixRange) ProtoMessage()

func (*FixRange) Reset

func (m *FixRange) Reset()

func (*FixRange) String

func (m *FixRange) String() string

type FixRange_Position

type FixRange_Position struct {
	// Positions can either be line-based or byte-based.
	// Offset is from the start of the file.
	Line             *uint32 `protobuf:"varint,1,opt,name=line" json:"line,omitempty"`
	Byte             *uint32 `protobuf:"varint,2,opt,name=byte" json:"byte,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*FixRange_Position) GetByte

func (m *FixRange_Position) GetByte() uint32

func (*FixRange_Position) GetLine

func (m *FixRange_Position) GetLine() uint32

func (*FixRange_Position) ProtoMessage

func (*FixRange_Position) ProtoMessage()

func (*FixRange_Position) Reset

func (m *FixRange_Position) Reset()

func (*FixRange_Position) String

func (m *FixRange_Position) String() string

type Location

type Location struct {
	// The context in which to interpret the path and the range, e.g. the
	// location of a specific revision in a repo.
	// TODO(supertri): Replace with source API SourceContext proto when ready.
	SourceContext *source_v1.SourceContext `protobuf:"bytes,1,opt,name=source_context" json:"source_context,omitempty"`
	// A path of a file within the given context. If only context and path are
	// present, the location refers to an entire file or path.
	// If the path ends in "/" it indicates a directory, otherwise a file name.
	Path *string `protobuf:"bytes,2,opt,name=path" json:"path,omitempty"`
	// A range within the given file. If a range is set, a path must also be set.
	Range            *shipshape_proto.TextRange `protobuf:"bytes,3,opt,name=range" json:"range,omitempty"`
	XXX_unrecognized []byte                     `json:"-"`
}

A location within a specific file, a single file, or a snapshot.

func (*Location) GetPath

func (m *Location) GetPath() string

func (*Location) GetRange

func (m *Location) GetRange() *shipshape_proto.TextRange

func (*Location) GetSourceContext

func (m *Location) GetSourceContext() *source_v1.SourceContext

func (*Location) ProtoMessage

func (*Location) ProtoMessage()

func (*Location) Reset

func (m *Location) Reset()

func (*Location) String

func (m *Location) String() string

type Note

type Note struct {
	// An identifier for the category of this note (e.g. Lint).
	// Should be distinct and contain no spaces.
	// Pascalcase (e.g. ErrorProne) preferred.
	// TODO(supertri): How will we prevent duplicate category names?
	Category    *string `protobuf:"bytes,1,opt,name=category" json:"category,omitempty"`
	Subcategory *string `protobuf:"bytes,2,opt,name=subcategory" json:"subcategory,omitempty"`
	// The location of the Note in the code for which the notes have been
	// requested.
	Location *Location `protobuf:"bytes,3,opt,name=location" json:"location,omitempty"`
	// A short plain text human readable description of the Note.
	// For example "Line is greater than 80 characters" for a Lint warning,
	// the text of the code review comment, or "Error logged in production:
	// cannot connect to Foo" for a Note about dynamic logs data.
	Description *string `protobuf:"bytes,4,opt,name=description" json:"description,omitempty"`
	// Optional link to more detailed information about the message or analyzer.
	MoreInfo *string `protobuf:"bytes,5,opt,name=more_info" json:"more_info,omitempty"`
	// Additional category or environment specific data for the note.
	AdditionalData *AdditionalData `protobuf:"bytes,6,opt,name=additional_data" json:"additional_data,omitempty"`
	// Optional suggested fixes for the note. If multiple ones are present,
	// they should be ordered by descending preference.
	Fix []*Fix `protobuf:"bytes,7,rep,name=fix" json:"fix,omitempty"`
	// Severity of this note, e.g., a compiler diagnostic.
	// Distinguishes between Notes representing build errors or other actionable
	// problems, and informational Notes. Useful for UI because
	// different annotations may need various levels of attention from the user.
	Severity         *Note_Severity `protobuf:"varint,8,opt,name=severity,enum=shipshape_proto.Note_Severity,def=2" json:"severity,omitempty"`
	XXX_unrecognized []byte         `json:"-"`
}

A Note is an arbitrary annotation, attached to a location in a source file, an entire file, or a particular snapshot (e.g. associated with either a code review or a revision). Code Notes include (human) review comments, robot comments, and UI-visible annotations generated from dynamic information.

func (*Note) GetAdditionalData

func (m *Note) GetAdditionalData() *AdditionalData

func (*Note) GetCategory

func (m *Note) GetCategory() string

func (*Note) GetDescription

func (m *Note) GetDescription() string

func (*Note) GetFix

func (m *Note) GetFix() []*Fix

func (*Note) GetLocation

func (m *Note) GetLocation() *Location

func (*Note) GetMoreInfo

func (m *Note) GetMoreInfo() string

func (*Note) GetSeverity

func (m *Note) GetSeverity() Note_Severity

func (*Note) GetSubcategory

func (m *Note) GetSubcategory() string

func (*Note) ProtoMessage

func (*Note) ProtoMessage()

func (*Note) Reset

func (m *Note) Reset()

func (*Note) String

func (m *Note) String() string

type Note_Severity

type Note_Severity int32

Severity of the annotation, used to distinguish build/compiler errors, i.e. where a binary fails to be built (BUILD_ERROR), other actionable results (WARNING), and informational notes (OTHER). TODO(supertri): Is there any other kind of prioritization we need?

const (
	// Build did not succeed because of this issue.
	Note_BUILD_ERROR Note_Severity = 1
	// Actionable problem, e.g. that a developer needs to fix.
	Note_WARNING Note_Severity = 2
	// There are 3 possibilities in the Java library Diagnostic.Kind enum
	// in addition to WARNING and ERROR (one is called "OTHER").
	// This value gives a way to propagate these other diagnostic types with a
	// default label which avoids incorrectly marking them as one of the other
	// 2 categories.
	Note_OTHER Note_Severity = 3
)
const Default_Note_Severity Note_Severity = Note_WARNING

func (Note_Severity) Enum

func (x Note_Severity) Enum() *Note_Severity

func (Note_Severity) String

func (x Note_Severity) String() string

func (*Note_Severity) UnmarshalJSON

func (x *Note_Severity) UnmarshalJSON(data []byte) error

type Replacement

type Replacement struct {
	// A path of a file within the given context. If only path is
	// present, the location refers to an entire file or path.
	// If the path ends in "/" it indicates a directory, otherwise a file name.
	Path *string `protobuf:"bytes,1,opt,name=path" json:"path,omitempty"`
	// The range of text to replace with this fix; can be specified either with
	// bytes or lines.
	Range *FixRange `protobuf:"bytes,2,opt,name=range" json:"range,omitempty"`
	// The new content to put in the given location. The length of the
	// replacement does not need to be identical with the text to be
	// replaced. The encoding must be the same as in the original file.
	NewContent       *string `protobuf:"bytes,3,opt,name=new_content" json:"new_content,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

A replacement to be applied to a single location. The location of the Replacement may be an arbitrary file. Replacements are independent, that is if there are multiple ones touching the same file, the location always refers to the original file rather than the file with other Replacements applied.

func (*Replacement) GetNewContent

func (m *Replacement) GetNewContent() string

func (*Replacement) GetPath

func (m *Replacement) GetPath() string

func (*Replacement) GetRange

func (m *Replacement) GetRange() *FixRange

func (*Replacement) ProtoMessage

func (*Replacement) ProtoMessage()

func (*Replacement) Reset

func (m *Replacement) Reset()

func (*Replacement) String

func (m *Replacement) String() string

Jump to

Keyboard shortcuts

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