Documentation ¶
Overview ¶
Package pb contrains the autogenerated gRPC API.
Package pb is a generated protocol buffer package. It is generated from these files: event.proto service_analyzer.proto service_data.proto It has these top-level messages: CommitRevision ReferencePointer PushEvent ReviewEvent EventResponse Comment File Change ChangesRequest FilesRequest
Index ¶
- Variables
- func RegisterAnalyzerServer(s *grpc.Server, srv AnalyzerServer)
- func RegisterDataServer(s *grpc.Server, srv DataServer)
- func ToStruct(v map[string]interface{}) *types.Struct
- func ToValue(v interface{}) *types.Value
- type AnalyzerClient
- type AnalyzerServer
- type Change
- func (*Change) Descriptor() ([]byte, []int)
- func (m *Change) Marshal() (dAtA []byte, err error)
- func (m *Change) MarshalTo(dAtA []byte) (int, error)
- func (*Change) ProtoMessage()
- func (m *Change) ProtoSize() (n int)
- func (m *Change) Reset()
- func (m *Change) String() string
- func (m *Change) Unmarshal(dAtA []byte) error
- type ChangesRequest
- func (*ChangesRequest) Descriptor() ([]byte, []int)
- func (m *ChangesRequest) Marshal() (dAtA []byte, err error)
- func (m *ChangesRequest) MarshalTo(dAtA []byte) (int, error)
- func (*ChangesRequest) ProtoMessage()
- func (m *ChangesRequest) Reset()
- func (m *ChangesRequest) Size() (n int)
- func (m *ChangesRequest) String() string
- func (m *ChangesRequest) Unmarshal(dAtA []byte) error
- type Comment
- func (*Comment) Descriptor() ([]byte, []int)
- func (m *Comment) Marshal() (dAtA []byte, err error)
- func (m *Comment) MarshalTo(dAtA []byte) (int, error)
- func (*Comment) ProtoMessage()
- func (m *Comment) Reset()
- func (m *Comment) Size() (n int)
- func (m *Comment) String() string
- func (m *Comment) Unmarshal(dAtA []byte) error
- type CommitRevision
- func (*CommitRevision) Descriptor() ([]byte, []int)
- func (m *CommitRevision) Marshal() (dAtA []byte, err error)
- func (m *CommitRevision) MarshalTo(dAtA []byte) (int, error)
- func (*CommitRevision) ProtoMessage()
- func (m *CommitRevision) Reset()
- func (m *CommitRevision) Size() (n int)
- func (m *CommitRevision) String() string
- func (m *CommitRevision) Unmarshal(dAtA []byte) error
- type DataClient
- type DataServer
- type Data_GetChangesClient
- type Data_GetChangesServer
- type Data_GetFilesClient
- type Data_GetFilesServer
- type EventID
- type EventResponse
- func (*EventResponse) Descriptor() ([]byte, []int)
- func (m *EventResponse) Marshal() (dAtA []byte, err error)
- func (m *EventResponse) MarshalTo(dAtA []byte) (int, error)
- func (*EventResponse) ProtoMessage()
- func (m *EventResponse) Reset()
- func (m *EventResponse) Size() (n int)
- func (m *EventResponse) String() string
- func (m *EventResponse) Unmarshal(dAtA []byte) error
- type EventType
- type File
- func (*File) Descriptor() ([]byte, []int)
- func (m *File) Marshal() (dAtA []byte, err error)
- func (m *File) MarshalTo(dAtA []byte) (int, error)
- func (*File) ProtoMessage()
- func (m *File) ProtoSize() (n int)
- func (m *File) Reset()
- func (m *File) String() string
- func (m *File) Unmarshal(dAtA []byte) error
- type FilesRequest
- func (*FilesRequest) Descriptor() ([]byte, []int)
- func (m *FilesRequest) Marshal() (dAtA []byte, err error)
- func (m *FilesRequest) MarshalTo(dAtA []byte) (int, error)
- func (*FilesRequest) ProtoMessage()
- func (m *FilesRequest) Reset()
- func (m *FilesRequest) Size() (n int)
- func (m *FilesRequest) String() string
- func (m *FilesRequest) Unmarshal(dAtA []byte) error
- type PushEvent
- func (*PushEvent) Descriptor() ([]byte, []int)
- func (e *PushEvent) ID() EventID
- func (m *PushEvent) Marshal() (dAtA []byte, err error)
- func (m *PushEvent) MarshalTo(dAtA []byte) (int, error)
- func (*PushEvent) ProtoMessage()
- func (m *PushEvent) Reset()
- func (e *PushEvent) Revision() *CommitRevision
- func (m *PushEvent) Size() (n int)
- func (m *PushEvent) String() string
- func (e *PushEvent) Type() EventType
- func (m *PushEvent) Unmarshal(dAtA []byte) error
- func (e *PushEvent) Validate() error
- type ReferencePointer
- func (*ReferencePointer) Descriptor() ([]byte, []int)
- func (m *ReferencePointer) Marshal() (dAtA []byte, err error)
- func (m *ReferencePointer) MarshalTo(dAtA []byte) (int, error)
- func (*ReferencePointer) ProtoMessage()
- func (e *ReferencePointer) Repository() *RepositoryInfo
- func (m *ReferencePointer) Reset()
- func (e *ReferencePointer) Short() string
- func (m *ReferencePointer) Size() (n int)
- func (m *ReferencePointer) String() string
- func (m *ReferencePointer) Unmarshal(dAtA []byte) error
- type RepositoryInfo
- type ReviewEvent
- func (*ReviewEvent) Descriptor() ([]byte, []int)
- func (e *ReviewEvent) ID() EventID
- func (m *ReviewEvent) Marshal() (dAtA []byte, err error)
- func (m *ReviewEvent) MarshalTo(dAtA []byte) (int, error)
- func (*ReviewEvent) ProtoMessage()
- func (m *ReviewEvent) Reset()
- func (e *ReviewEvent) Revision() *CommitRevision
- func (m *ReviewEvent) Size() (n int)
- func (m *ReviewEvent) String() string
- func (e *ReviewEvent) Type() EventType
- func (m *ReviewEvent) Unmarshal(dAtA []byte) error
- func (e *ReviewEvent) Validate() error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthEvent = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowEvent = fmt.Errorf("proto: integer overflow") )
View Source
var ( ErrInvalidLengthServiceAnalyzer = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowServiceAnalyzer = fmt.Errorf("proto: integer overflow") )
View Source
var ( ErrInvalidLengthServiceData = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowServiceData = fmt.Errorf("proto: integer overflow") )
Functions ¶
func RegisterAnalyzerServer ¶
func RegisterAnalyzerServer(s *grpc.Server, srv AnalyzerServer)
func RegisterDataServer ¶
func RegisterDataServer(s *grpc.Server, srv DataServer)
Types ¶
type AnalyzerClient ¶
type AnalyzerClient interface { NotifyReviewEvent(ctx context.Context, in *ReviewEvent, opts ...grpc.CallOption) (*EventResponse, error) NotifyPushEvent(ctx context.Context, in *PushEvent, opts ...grpc.CallOption) (*EventResponse, error) }
func NewAnalyzerClient ¶
func NewAnalyzerClient(cc *grpc.ClientConn) AnalyzerClient
type AnalyzerServer ¶
type AnalyzerServer interface { NotifyReviewEvent(context.Context, *ReviewEvent) (*EventResponse, error) NotifyPushEvent(context.Context, *PushEvent) (*EventResponse, error) }
type Change ¶
type Change struct { Base *File `protobuf:"bytes,1,opt,name=base" json:"base,omitempty"` Head *File `protobuf:"bytes,2,opt,name=head" json:"head,omitempty"` }
func (*Change) Descriptor ¶
func (*Change) ProtoMessage ¶
func (*Change) ProtoMessage()
type ChangesRequest ¶
type ChangesRequest struct { Base *ReferencePointer `protobuf:"bytes,1,opt,name=base" json:"base,omitempty"` Head *ReferencePointer `protobuf:"bytes,2,opt,name=head" json:"head,omitempty"` IncludePattern string `protobuf:"bytes,3,opt,name=include_pattern,json=includePattern,proto3" json:"include_pattern,omitempty"` ExcludePattern string `protobuf:"bytes,4,opt,name=exclude_pattern,json=excludePattern,proto3" json:"exclude_pattern,omitempty"` ExcludeVendored bool `protobuf:"varint,5,opt,name=exclude_vendored,json=excludeVendored,proto3" json:"exclude_vendored,omitempty"` WantContents bool `protobuf:"varint,6,opt,name=want_contents,json=wantContents,proto3" json:"want_contents,omitempty"` WantUAST bool `protobuf:"varint,7,opt,name=want_uast,json=wantUast,proto3" json:"want_uast,omitempty"` WantLanguage bool `protobuf:"varint,8,opt,name=want_language,json=wantLanguage,proto3" json:"want_language,omitempty"` }
func (*ChangesRequest) Descriptor ¶
func (*ChangesRequest) Descriptor() ([]byte, []int)
func (*ChangesRequest) Marshal ¶
func (m *ChangesRequest) Marshal() (dAtA []byte, err error)
func (*ChangesRequest) ProtoMessage ¶
func (*ChangesRequest) ProtoMessage()
func (*ChangesRequest) Reset ¶
func (m *ChangesRequest) Reset()
func (*ChangesRequest) Size ¶
func (m *ChangesRequest) Size() (n int)
func (*ChangesRequest) String ¶
func (m *ChangesRequest) String() string
func (*ChangesRequest) Unmarshal ¶
func (m *ChangesRequest) Unmarshal(dAtA []byte) error
type Comment ¶
type Comment struct { // File this comment belongs to. If empty, it is a global comment. File string `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"` // Line this comment refers to. If 0 (and file is set), it is a // file-level comment. Line is expressed aqs a 1-based index. Line int32 `protobuf:"varint,2,opt,name=line,proto3" json:"line,omitempty"` // Text of the comment. Text string `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty"` // Confidence in the comment. It should be an integer between 0 and 100. Confidence uint32 `protobuf:"varint,4,opt,name=confidence,proto3" json:"confidence,omitempty"` }
Comment is a comment on a commit or changeset.
func (*Comment) Descriptor ¶
func (*Comment) ProtoMessage ¶
func (*Comment) ProtoMessage()
type CommitRevision ¶
type CommitRevision struct { // Base of the revision. Base ReferencePointer `protobuf:"bytes,1,opt,name=base" json:"base"` // Head of the revision. Head ReferencePointer `protobuf:"bytes,2,opt,name=head" json:"head"` }
CommitRevision defines a range of commits, from a base to a head.
func (*CommitRevision) Descriptor ¶
func (*CommitRevision) Descriptor() ([]byte, []int)
func (*CommitRevision) Marshal ¶
func (m *CommitRevision) Marshal() (dAtA []byte, err error)
func (*CommitRevision) ProtoMessage ¶
func (*CommitRevision) ProtoMessage()
func (*CommitRevision) Reset ¶
func (m *CommitRevision) Reset()
func (*CommitRevision) Size ¶
func (m *CommitRevision) Size() (n int)
func (*CommitRevision) String ¶
func (m *CommitRevision) String() string
func (*CommitRevision) Unmarshal ¶
func (m *CommitRevision) Unmarshal(dAtA []byte) error
type DataClient ¶
type DataClient interface { GetChanges(ctx context.Context, in *ChangesRequest, opts ...grpc.CallOption) (Data_GetChangesClient, error) GetFiles(ctx context.Context, in *FilesRequest, opts ...grpc.CallOption) (Data_GetFilesClient, error) }
func NewDataClient ¶
func NewDataClient(cc *grpc.ClientConn) DataClient
type DataServer ¶
type DataServer interface { GetChanges(*ChangesRequest, Data_GetChangesServer) error GetFiles(*FilesRequest, Data_GetFilesServer) error }
type Data_GetChangesClient ¶
type Data_GetChangesClient interface { Recv() (*Change, error) grpc.ClientStream }
type Data_GetChangesServer ¶
type Data_GetChangesServer interface { Send(*Change) error grpc.ServerStream }
type Data_GetFilesClient ¶
type Data_GetFilesClient interface { Recv() (*File, error) grpc.ClientStream }
type Data_GetFilesServer ¶
type Data_GetFilesServer interface { Send(*File) error grpc.ServerStream }
type EventID ¶
type EventID [20]byte
func ComputeEventID ¶
ComputeEventID compute the hash for a given provider and content.
type EventResponse ¶
type EventResponse struct { AnalyzerVersion string `protobuf:"bytes,1,opt,name=analyzer_version,json=analyzerVersion,proto3" json:"analyzer_version,omitempty"` Comments []*Comment `protobuf:"bytes,2,rep,name=comments" json:"comments,omitempty"` }
func (*EventResponse) Descriptor ¶
func (*EventResponse) Descriptor() ([]byte, []int)
func (*EventResponse) Marshal ¶
func (m *EventResponse) Marshal() (dAtA []byte, err error)
func (*EventResponse) ProtoMessage ¶
func (*EventResponse) ProtoMessage()
func (*EventResponse) Reset ¶
func (m *EventResponse) Reset()
func (*EventResponse) Size ¶
func (m *EventResponse) Size() (n int)
func (*EventResponse) String ¶
func (m *EventResponse) String() string
func (*EventResponse) Unmarshal ¶
func (m *EventResponse) Unmarshal(dAtA []byte) error
type File ¶
type File struct { // File path. Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` // POSIX-style file mode. Mode uint32 `protobuf:"varint,2,opt,name=mode,proto3" json:"mode,omitempty"` // Hash of the file contents. Hash string `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"` // Raw content of the file. Content []byte `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"` // UAST. UAST *gopkg_in_bblfsh_sdk_v1_uast.Node `protobuf:"bytes,5,opt,name=uast" json:"uast,omitempty"` // Programming/data/markup language of the file. Language string `protobuf:"bytes,6,opt,name=language,proto3" json:"language,omitempty"` }
func (*File) Descriptor ¶
func (*File) ProtoMessage ¶
func (*File) ProtoMessage()
type FilesRequest ¶
type FilesRequest struct { Revision *ReferencePointer `protobuf:"bytes,1,opt,name=revision" json:"revision,omitempty"` IncludePattern string `protobuf:"bytes,2,opt,name=include_pattern,json=includePattern,proto3" json:"include_pattern,omitempty"` ExcludePattern string `protobuf:"bytes,3,opt,name=exclude_pattern,json=excludePattern,proto3" json:"exclude_pattern,omitempty"` ExcludeVendored bool `protobuf:"varint,4,opt,name=exclude_vendored,json=excludeVendored,proto3" json:"exclude_vendored,omitempty"` WantContents bool `protobuf:"varint,5,opt,name=want_contents,json=wantContents,proto3" json:"want_contents,omitempty"` WantUAST bool `protobuf:"varint,6,opt,name=want_uast,json=wantUast,proto3" json:"want_uast,omitempty"` // WantLanguage set to true if UAST was requested WantLanguage bool `protobuf:"varint,7,opt,name=want_language,json=wantLanguage,proto3" json:"want_language,omitempty"` }
func (*FilesRequest) Descriptor ¶
func (*FilesRequest) Descriptor() ([]byte, []int)
func (*FilesRequest) Marshal ¶
func (m *FilesRequest) Marshal() (dAtA []byte, err error)
func (*FilesRequest) ProtoMessage ¶
func (*FilesRequest) ProtoMessage()
func (*FilesRequest) Reset ¶
func (m *FilesRequest) Reset()
func (*FilesRequest) Size ¶
func (m *FilesRequest) Size() (n int)
func (*FilesRequest) String ¶
func (m *FilesRequest) String() string
func (*FilesRequest) Unmarshal ¶
func (m *FilesRequest) Unmarshal(dAtA []byte) error
type PushEvent ¶
type PushEvent struct { // Provider triggering this event. Provider string `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"` // InternalId is the internal id for this event at the provider. InternalID string `protobuf:"bytes,2,opt,name=internal_id,json=internalId,proto3" json:"internal_id,omitempty"` // CreateAt is the timestamp of the creation date of the push event. CreatedAt time.Time `protobuf:"bytes,3,opt,name=created_at,json=createdAt,stdtime" json:"created_at"` // Commits is the number of commits in the push. Commits uint32 `protobuf:"varint,4,opt,name=commits,proto3" json:"commits,omitempty"` // Commits is the number of distinct commits in the push. DistinctCommits uint32 `protobuf:"varint,5,opt,name=distinct_commits,json=distinctCommits,proto3" json:"distinct_commits,omitempty"` // Configuration contains any configuration related to specific analyzer Configuration google_protobuf2.Struct `protobuf:"bytes,6,opt,name=configuration" json:"configuration"` CommitRevision `protobuf:"bytes,7,opt,name=commit_revision,json=commitRevision,embedded=commit_revision" json:"commit_revision"` }
PushEvent represents a Push to a git repository.
func (*PushEvent) Descriptor ¶
func (*PushEvent) ProtoMessage ¶
func (*PushEvent) ProtoMessage()
func (*PushEvent) Revision ¶
func (e *PushEvent) Revision() *CommitRevision
Revision honors the Event interface.
type ReferencePointer ¶
type ReferencePointer struct { // InternalRepositoryURL is the original clone URL, not canonicalized. InternalRepositoryURL string `` /* 126-byte string literal not displayed */ // ReferenceName is the name of the reference pointing. ReferenceName gopkg_in_src_d_go_git_v4_plumbing.ReferenceName `` /* 157-byte string literal not displayed */ // Hash is the hash of the reference pointing. Hash string `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"` }
ReferencePointer is the reference to a git refererence in a repository.
func (*ReferencePointer) Descriptor ¶
func (*ReferencePointer) Descriptor() ([]byte, []int)
func (*ReferencePointer) Marshal ¶
func (m *ReferencePointer) Marshal() (dAtA []byte, err error)
func (*ReferencePointer) ProtoMessage ¶
func (*ReferencePointer) ProtoMessage()
func (*ReferencePointer) Repository ¶
func (e *ReferencePointer) Repository() *RepositoryInfo
Repository returns the RepositoryInfo
func (*ReferencePointer) Reset ¶
func (m *ReferencePointer) Reset()
func (*ReferencePointer) Short ¶
func (e *ReferencePointer) Short() string
Short is a short string representation of a ReferencePointer.
func (*ReferencePointer) Size ¶
func (m *ReferencePointer) Size() (n int)
func (*ReferencePointer) String ¶
func (m *ReferencePointer) String() string
func (*ReferencePointer) Unmarshal ¶
func (m *ReferencePointer) Unmarshal(dAtA []byte) error
type RepositoryInfo ¶
type RepositoryInfo = vcsurl.RepoInfo //TODO(mcuadros): improve repository references
type ReviewEvent ¶
type ReviewEvent struct { // Provider triggering this event. Provider string `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"` // InternalId is the internal id for this event at the provider. InternalID string `protobuf:"bytes,2,opt,name=internal_id,json=internalId,proto3" json:"internal_id,omitempty"` // CreateAt is the timestamp of the creation date of the push event. CreatedAt time.Time `protobuf:"bytes,3,opt,name=created_at,json=createdAt,stdtime" json:"created_at"` // UpdatedAt is the timestamp of the last modification of the pull request. UpdatedAt time.Time `protobuf:"bytes,4,opt,name=updated_at,json=updatedAt,stdtime" json:"updated_at"` // IsMergeable, if the pull request is mergeable. IsMergeable bool `protobuf:"varint,5,opt,name=is_mergeable,json=isMergeable,proto3" json:"is_mergeable,omitempty"` // Source reference to the original branch and repository where the changes came from. Source ReferencePointer `protobuf:"bytes,8,opt,name=source" json:"source"` // Merge reference to the branch and repository where the merged Pull Request is stored. Merge ReferencePointer `protobuf:"bytes,9,opt,name=merge" json:"merge"` // Configuration contains any configuration related to specific analyzer Configuration google_protobuf2.Struct `protobuf:"bytes,10,opt,name=configuration" json:"configuration"` // RepositoryId is internal provider repository id RepositoryID uint32 `protobuf:"varint,11,opt,name=repository_id,json=repositoryId,proto3" json:"repository_id,omitempty"` // Number is internal provider id of review scoped by repository Number uint32 `protobuf:"varint,12,opt,name=number,proto3" json:"number,omitempty"` CommitRevision `protobuf:"bytes,7,opt,name=commit_revision,json=commitRevision,embedded=commit_revision" json:"commit_revision"` }
ReviewEvent represents a Review (PullRequest in case of Github) being created or updated.
func (*ReviewEvent) Descriptor ¶
func (*ReviewEvent) Descriptor() ([]byte, []int)
func (*ReviewEvent) Marshal ¶
func (m *ReviewEvent) Marshal() (dAtA []byte, err error)
func (*ReviewEvent) ProtoMessage ¶
func (*ReviewEvent) ProtoMessage()
func (*ReviewEvent) Reset ¶
func (m *ReviewEvent) Reset()
func (*ReviewEvent) Revision ¶
func (e *ReviewEvent) Revision() *CommitRevision
Revision honors the Event interface.
func (*ReviewEvent) Size ¶
func (m *ReviewEvent) Size() (n int)
func (*ReviewEvent) String ¶
func (m *ReviewEvent) String() string
func (*ReviewEvent) Unmarshal ¶
func (m *ReviewEvent) Unmarshal(dAtA []byte) error
func (*ReviewEvent) Validate ¶ added in v0.0.2
func (e *ReviewEvent) Validate() error
Validate honors the Event interface.
Click to show internal directories.
Click to hide internal directories.