pb

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2018 License: AGPL-3.0 Imports: 16 Imported by: 0

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

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)

func ToStruct

func ToStruct(v map[string]interface{}) *types.Struct

ToStruct converts a map[string]interface{} to a types.Struct

func ToValue

func ToValue(v interface{}) *types.Value

ToValue converts an interface{} to a types.Value

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) Descriptor() ([]byte, []int)

func (*Change) Marshal

func (m *Change) Marshal() (dAtA []byte, err error)

func (*Change) MarshalTo

func (m *Change) MarshalTo(dAtA []byte) (int, error)

func (*Change) ProtoMessage

func (*Change) ProtoMessage()

func (*Change) ProtoSize

func (m *Change) ProtoSize() (n int)

func (*Change) Reset

func (m *Change) Reset()

func (*Change) String

func (m *Change) String() string

func (*Change) Unmarshal

func (m *Change) Unmarshal(dAtA []byte) error

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) MarshalTo

func (m *ChangesRequest) MarshalTo(dAtA []byte) (int, 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) Descriptor() ([]byte, []int)

func (*Comment) Marshal

func (m *Comment) Marshal() (dAtA []byte, err error)

func (*Comment) MarshalTo

func (m *Comment) MarshalTo(dAtA []byte) (int, error)

func (*Comment) ProtoMessage

func (*Comment) ProtoMessage()

func (*Comment) Reset

func (m *Comment) Reset()

func (*Comment) Size

func (m *Comment) Size() (n int)

func (*Comment) String

func (m *Comment) String() string

func (*Comment) Unmarshal

func (m *Comment) Unmarshal(dAtA []byte) error

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) MarshalTo

func (m *CommitRevision) MarshalTo(dAtA []byte) (int, 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

func ComputeEventID(provider, content string) EventID

ComputeEventID compute the hash for a given provider and content.

func (EventID) IsZero

func (h EventID) IsZero() bool

func (EventID) String

func (h EventID) String() string

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) MarshalTo

func (m *EventResponse) MarshalTo(dAtA []byte) (int, 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 EventType

type EventType int
const (
	PushEventType EventType
	ReviewEventType
)

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) Descriptor() ([]byte, []int)

func (*File) Marshal

func (m *File) Marshal() (dAtA []byte, err error)

func (*File) MarshalTo

func (m *File) MarshalTo(dAtA []byte) (int, error)

func (*File) ProtoMessage

func (*File) ProtoMessage()

func (*File) ProtoSize

func (m *File) ProtoSize() (n int)

func (*File) Reset

func (m *File) Reset()

func (*File) String

func (m *File) String() string

func (*File) Unmarshal

func (m *File) Unmarshal(dAtA []byte) error

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) MarshalTo

func (m *FilesRequest) MarshalTo(dAtA []byte) (int, 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) Descriptor() ([]byte, []int)

func (*PushEvent) ID

func (e *PushEvent) ID() EventID

ID honors the Event interface.

func (*PushEvent) Marshal

func (m *PushEvent) Marshal() (dAtA []byte, err error)

func (*PushEvent) MarshalTo

func (m *PushEvent) MarshalTo(dAtA []byte) (int, error)

func (*PushEvent) ProtoMessage

func (*PushEvent) ProtoMessage()

func (*PushEvent) Reset

func (m *PushEvent) Reset()

func (*PushEvent) Revision

func (e *PushEvent) Revision() *CommitRevision

Revision honors the Event interface.

func (*PushEvent) Size

func (m *PushEvent) Size() (n int)

func (*PushEvent) String

func (m *PushEvent) String() string

func (*PushEvent) Type

func (e *PushEvent) Type() EventType

Type honors the Event interface.

func (*PushEvent) Unmarshal

func (m *PushEvent) Unmarshal(dAtA []byte) error

func (*PushEvent) Validate added in v0.0.2

func (e *PushEvent) Validate() error

Validate 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) MarshalTo

func (m *ReferencePointer) MarshalTo(dAtA []byte) (int, 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) ID

func (e *ReviewEvent) ID() EventID

ID honors the Event interface.

func (*ReviewEvent) Marshal

func (m *ReviewEvent) Marshal() (dAtA []byte, err error)

func (*ReviewEvent) MarshalTo

func (m *ReviewEvent) MarshalTo(dAtA []byte) (int, 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) Type

func (e *ReviewEvent) Type() EventType

Type honors the Event interface.

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.

Jump to

Keyboard shortcuts

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