Documentation
¶
Index ¶
- Variables
- func AddLogFields(ctx context.Context, fields Fields) context.Context
- func CtxlogStreamClientInterceptor(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, ...) (grpc.ClientStream, error)
- func CtxlogStreamServerInterceptor(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, ...) error
- func CtxlogUnaryClientInterceptor(ctx context.Context, method string, req, reply interface{}, ...) error
- func CtxlogUnaryServerInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (interface{}, error)
- func DialContext(ctx context.Context, target string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
- func DialContextWithInterceptors(ctx context.Context, target string, ...) (*grpc.ClientConn, error)
- func Listen(address string) (net.Listener, error)
- func LogStreamClientInterceptor(log LogFn) grpc.StreamClientInterceptor
- func LogStreamServerInterceptor(log LogFn) grpc.StreamServerInterceptor
- func LogUnaryClientInterceptor(log LogFn) grpc.UnaryClientInterceptor
- func LogUnaryServerInterceptor(log LogFn) grpc.UnaryServerInterceptor
- func NewServer(opts ...grpc.ServerOption) *grpc.Server
- func NewServerWithInterceptors(streamInterceptors []grpc.StreamServerInterceptor, ...) *grpc.Server
- func RegisterAnalyzerServer(s *grpc.Server, srv AnalyzerServer)
- func RegisterDataServer(s *grpc.Server, srv DataServer)
- func ToGoGrpcAddress(address string) (string, error)
- func ToNetListenerAddress(target string) (network, address string, err error)
- 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
- func (m *Change) XXX_DiscardUnknown()
- func (m *Change) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Change) XXX_Merge(src proto.Message)
- func (m *Change) XXX_Size() int
- func (m *Change) XXX_Unmarshal(b []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
- func (m *ChangesRequest) XXX_DiscardUnknown()
- func (m *ChangesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *ChangesRequest) XXX_Merge(src proto.Message)
- func (m *ChangesRequest) XXX_Size() int
- func (m *ChangesRequest) XXX_Unmarshal(b []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
- func (m *Comment) XXX_DiscardUnknown()
- func (m *Comment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Comment) XXX_Merge(src proto.Message)
- func (m *Comment) XXX_Size() int
- func (m *Comment) XXX_Unmarshal(b []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
- func (m *CommitRevision) XXX_DiscardUnknown()
- func (m *CommitRevision) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *CommitRevision) XXX_Merge(src proto.Message)
- func (m *CommitRevision) XXX_Size() int
- func (m *CommitRevision) XXX_Unmarshal(b []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
- func (m *EventResponse) XXX_DiscardUnknown()
- func (m *EventResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *EventResponse) XXX_Merge(src proto.Message)
- func (m *EventResponse) XXX_Size() int
- func (m *EventResponse) XXX_Unmarshal(b []byte) error
- type EventType
- type Fields
- 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
- func (m *File) XXX_DiscardUnknown()
- func (m *File) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *File) XXX_Merge(src proto.Message)
- func (m *File) XXX_Size() int
- func (m *File) XXX_Unmarshal(b []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
- func (m *FilesRequest) XXX_DiscardUnknown()
- func (m *FilesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *FilesRequest) XXX_Merge(src proto.Message)
- func (m *FilesRequest) XXX_Size() int
- func (m *FilesRequest) XXX_Unmarshal(b []byte) error
- type LogFn
- 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
- func (m *PushEvent) XXX_DiscardUnknown()
- func (m *PushEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *PushEvent) XXX_Merge(src proto.Message)
- func (m *PushEvent) XXX_Size() int
- func (m *PushEvent) XXX_Unmarshal(b []byte) 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
- func (m *ReferencePointer) XXX_DiscardUnknown()
- func (m *ReferencePointer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *ReferencePointer) XXX_Merge(src proto.Message)
- func (m *ReferencePointer) XXX_Size() int
- func (m *ReferencePointer) XXX_Unmarshal(b []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
- func (m *ReviewEvent) XXX_DiscardUnknown()
- func (m *ReviewEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *ReviewEvent) XXX_Merge(src proto.Message)
- func (m *ReviewEvent) XXX_Size() int
- func (m *ReviewEvent) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthEvent = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowEvent = fmt.Errorf("proto: integer overflow") )
var ( ErrInvalidLengthServiceAnalyzer = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowServiceAnalyzer = fmt.Errorf("proto: integer overflow") )
var ( ErrInvalidLengthServiceData = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowServiceData = fmt.Errorf("proto: integer overflow") )
Functions ¶
func AddLogFields ¶ added in v0.6.0
AddLogFields returns a context by updating the current log fields with those provided. Setting a key that is already present has no effect.
func CtxlogStreamClientInterceptor ¶ added in v0.6.0
func CtxlogStreamClientInterceptor(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, streamer grpc.Streamer, opts ...grpc.CallOption) (grpc.ClientStream, error)
CtxlogStreamClientInterceptor is a streaming client interceptor that adds the log fields to the grpc metadata, with the key 'logFieldsKeyMeta'.
func CtxlogStreamServerInterceptor ¶ added in v0.6.0
func CtxlogStreamServerInterceptor(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error
CtxlogStreamServerInterceptor is a streaming server interceptor that adds to the context the log fields found in the request metadata with the key `logFieldsKeyMeta`.
func CtxlogUnaryClientInterceptor ¶ added in v0.6.0
func CtxlogUnaryClientInterceptor(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error
CtxlogUnaryClientInterceptor is an unary client interceptor that adds the log fields to the grpc metadata, with the key 'logFieldsKeyMeta'.
func CtxlogUnaryServerInterceptor ¶ added in v0.6.0
func CtxlogUnaryServerInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
CtxlogUnaryServerInterceptor is an unary server interceptor that adds to the context the log fields found in the request metadata with the key `logFieldsKeyMeta`.
func DialContext ¶ added in v0.2.0
func DialContext(ctx context.Context, target string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
DialContext creates a client connection to the given target with custom message size and default interceptors
func DialContextWithInterceptors ¶ added in v0.6.0
func DialContextWithInterceptors( ctx context.Context, target string, streamInterceptors []grpc.StreamClientInterceptor, unaryInterceptors []grpc.UnaryClientInterceptor, opts ...grpc.DialOption, ) (*grpc.ClientConn, error)
DialContextWithInterceptors creates a client connection to the given target with custom message size and default interceptors. The provided interceptors will be executed before the default ones.
func Listen ¶ added in v0.2.0
Listen is equivalent to standard net.Listen, but taking gRPC URL as input.
func LogStreamClientInterceptor ¶ added in v0.6.0
func LogStreamClientInterceptor(log LogFn) grpc.StreamClientInterceptor
LogStreamClientInterceptor returns a new streaming client interceptor that logs the execution of external gRPC calls.
func LogStreamServerInterceptor ¶ added in v0.6.0
func LogStreamServerInterceptor(log LogFn) grpc.StreamServerInterceptor
LogStreamServerInterceptor returns a new streaming server interceptor that logs request/response.
func LogUnaryClientInterceptor ¶ added in v0.6.0
func LogUnaryClientInterceptor(log LogFn) grpc.UnaryClientInterceptor
LogUnaryClientInterceptor returns a new unary client interceptor that logs the execution of external gRPC calls.
func LogUnaryServerInterceptor ¶ added in v0.6.0
func LogUnaryServerInterceptor(log LogFn) grpc.UnaryServerInterceptor
LogUnaryServerInterceptor returns a new unary server interceptor that logs request/response.
func NewServer ¶ added in v0.2.0
func NewServer(opts ...grpc.ServerOption) *grpc.Server
NewServer creates new grpc.Server with custom message size
func NewServerWithInterceptors ¶ added in v0.6.0
func NewServerWithInterceptors( streamInterceptors []grpc.StreamServerInterceptor, unaryInterceptors []grpc.UnaryServerInterceptor, opts ...grpc.ServerOption, ) *grpc.Server
NewServerWithInterceptors creates new grpc.Server with custom message size and default interceptors. The provided interceptors be executed after the default ones.
func RegisterAnalyzerServer ¶
func RegisterAnalyzerServer(s *grpc.Server, srv AnalyzerServer)
func RegisterDataServer ¶
func RegisterDataServer(s *grpc.Server, srv DataServer)
func ToGoGrpcAddress ¶ added in v0.2.0
ToGoGrpcAddress converts a standard gRPC target name to a one that is supported by grpc-go.
func ToNetListenerAddress ¶ added in v0.2.0
ToNetListenerAddress converts a gRPC URL to a network+address consumable by net.Listen. For example:
ipv4://127.0.0.1:8080 -> (tcp4, 127.0.0.1:8080)
Types ¶
type AnalyzerClient ¶
type AnalyzerClient interface {
// NotifyReviewEvent returns comments for a ReviewEvent.
NotifyReviewEvent(ctx context.Context, in *ReviewEvent, opts ...grpc.CallOption) (*EventResponse, error)
// NotifyPushEvent is not expected to return any comments. Its purpose for
// now is to notify the analyzer of a new push to a repository, that could
// be used to trigger training tasks over new contents.
NotifyPushEvent(ctx context.Context, in *PushEvent, opts ...grpc.CallOption) (*EventResponse, error)
}
AnalyzerClient is the client API for Analyzer service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewAnalyzerClient ¶
func NewAnalyzerClient(cc *grpc.ClientConn) AnalyzerClient
type AnalyzerServer ¶
type AnalyzerServer interface {
// NotifyReviewEvent returns comments for a ReviewEvent.
NotifyReviewEvent(context.Context, *ReviewEvent) (*EventResponse, error)
// NotifyPushEvent is not expected to return any comments. Its purpose for
// now is to notify the analyzer of a new push to a repository, that could
// be used to trigger training tasks over new contents.
NotifyPushEvent(context.Context, *PushEvent) (*EventResponse, error)
}
AnalyzerServer is the server API for Analyzer service.
type Change ¶
type Change struct {
// Base is the file version at the base of the revision range. It will be
// empty for new files.
Base *File `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"`
// Head is the file version at the head of the revision range. It will be
// empty for deleted files.
Head *File `protobuf:"bytes,2,opt,name=head,proto3" json:"head,omitempty"`
}
Change contains two versions of a File in a revision range.
func (*Change) Descriptor ¶
func (*Change) ProtoMessage ¶
func (*Change) ProtoMessage()
func (*Change) XXX_DiscardUnknown ¶
func (m *Change) XXX_DiscardUnknown()
func (*Change) XXX_Marshal ¶
func (*Change) XXX_Unmarshal ¶
type ChangesRequest ¶
type ChangesRequest struct {
// Base of the revision range.
Base *ReferencePointer `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"`
// Head of the revision range.
Head *ReferencePointer `protobuf:"bytes,2,opt,name=head,proto3" json:"head,omitempty"`
// IncludePattern is a regexp. Only the files with matching file paths will
// be included in the response.
IncludePattern string `protobuf:"bytes,3,opt,name=include_pattern,json=includePattern,proto3" json:"include_pattern,omitempty"`
// ExcludePattern is a regexp. Any files with matching file paths will be
// excluded from the response.
ExcludePattern string `protobuf:"bytes,4,opt,name=exclude_pattern,json=excludePattern,proto3" json:"exclude_pattern,omitempty"`
// ExcludeVendored will exclude any verdored file from the response. The
// list of paths considered as vendor is available at:
// https://github.com/github/linguist/blob/master/lib/linguist/vendor.yml
ExcludeVendored bool `protobuf:"varint,5,opt,name=exclude_vendored,json=excludeVendored,proto3" json:"exclude_vendored,omitempty"`
// WantContents will fill the response file Content.
WantContents bool `protobuf:"varint,6,opt,name=want_contents,json=wantContents,proto3" json:"want_contents,omitempty"`
// WantUAST will fill the response file UAST and Language.
WantUAST bool `protobuf:"varint,7,opt,name=want_uast,json=wantUast,proto3" json:"want_uast,omitempty"`
// WantLanguage will fill the response file Language.
WantLanguage bool `protobuf:"varint,8,opt,name=want_language,json=wantLanguage,proto3" json:"want_language,omitempty"`
// IncludeLanguages will filter files by language. The language names are
// case insensitive. The list of language names is available at
// https://github.com/github/linguist/blob/master/lib/linguist/languages.yml
IncludeLanguages []string `protobuf:"bytes,9,rep,name=include_languages,json=includeLanguages,proto3" json:"include_languages,omitempty"`
}
ChangesRequest defines a request of Changes to the Data service.
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
func (*ChangesRequest) XXX_DiscardUnknown ¶
func (m *ChangesRequest) XXX_DiscardUnknown()
func (*ChangesRequest) XXX_Marshal ¶
func (m *ChangesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ChangesRequest) XXX_Merge ¶
func (dst *ChangesRequest) XXX_Merge(src proto.Message)
func (*ChangesRequest) XXX_Size ¶
func (m *ChangesRequest) XXX_Size() int
func (*ChangesRequest) XXX_Unmarshal ¶
func (m *ChangesRequest) XXX_Unmarshal(b []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()
func (*Comment) XXX_DiscardUnknown ¶
func (m *Comment) XXX_DiscardUnknown()
func (*Comment) XXX_Marshal ¶
func (*Comment) XXX_Unmarshal ¶
type CommitRevision ¶
type CommitRevision struct {
// Base of the revision range.
Base ReferencePointer `protobuf:"bytes,1,opt,name=base,proto3" json:"base"`
// Head of the revision range.
Head ReferencePointer `protobuf:"bytes,2,opt,name=head,proto3" 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
func (*CommitRevision) XXX_DiscardUnknown ¶
func (m *CommitRevision) XXX_DiscardUnknown()
func (*CommitRevision) XXX_Marshal ¶
func (m *CommitRevision) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CommitRevision) XXX_Merge ¶
func (dst *CommitRevision) XXX_Merge(src proto.Message)
func (*CommitRevision) XXX_Size ¶
func (m *CommitRevision) XXX_Size() int
func (*CommitRevision) XXX_Unmarshal ¶
func (m *CommitRevision) XXX_Unmarshal(b []byte) error
type DataClient ¶
type DataClient interface {
// GetChanges returns a stream of Changes
GetChanges(ctx context.Context, in *ChangesRequest, opts ...grpc.CallOption) (Data_GetChangesClient, error)
// GetFiles returns a stream of Files
GetFiles(ctx context.Context, in *FilesRequest, opts ...grpc.CallOption) (Data_GetFilesClient, error)
}
DataClient is the client API for Data service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewDataClient ¶
func NewDataClient(cc *grpc.ClientConn) DataClient
type DataServer ¶
type DataServer interface {
// GetChanges returns a stream of Changes
GetChanges(*ChangesRequest, Data_GetChangesServer) error
// GetFiles returns a stream of Files
GetFiles(*FilesRequest, Data_GetFilesServer) error
}
DataServer is the server API for Data service.
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 ¶ added in v0.0.4
type EventID [20]byte
EventID unique hash id for an event
func ComputeEventID ¶ added in v0.0.4
ComputeEventID compute the hash for a given list of strings.
type EventResponse ¶
type EventResponse struct {
// AnalyzerVersion must be set to the current analyzer version. Used for
// logging.
AnalyzerVersion string `protobuf:"bytes,1,opt,name=analyzer_version,json=analyzerVersion,proto3" json:"analyzer_version,omitempty"`
// Comments to post as the analysis result.
Comments []*Comment `protobuf:"bytes,2,rep,name=comments,proto3" json:"comments,omitempty"`
}
EventResponse contains the results of a Review or Push event.
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
func (*EventResponse) XXX_DiscardUnknown ¶
func (m *EventResponse) XXX_DiscardUnknown()
func (*EventResponse) XXX_Marshal ¶
func (m *EventResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EventResponse) XXX_Merge ¶
func (dst *EventResponse) XXX_Merge(src proto.Message)
func (*EventResponse) XXX_Size ¶
func (m *EventResponse) XXX_Size() int
func (*EventResponse) XXX_Unmarshal ¶
func (m *EventResponse) XXX_Unmarshal(b []byte) error
type EventType ¶ added in v0.0.4
type EventType int
EventType supported event types
const ( // PushEventType is an event type when a repository branch gets updated PushEventType EventType // ReviewEventType is an event type for proposed changes like pull request ReviewEventType )
type Fields ¶ added in v0.6.0
type Fields map[string]interface{}
Fields is a log fields container
func GetLogFields ¶ added in v0.6.0
GetLogFields returns a copy of the log fields of the context. It can be nil.
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"`
// SHA1 hash of the file contents.
Hash string `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"`
// Raw content of the file. It will be empty if WantContents was not set in
// the request.
Content []byte `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"`
// UAST is a Babelfish v1 UAST of the file contents. It will be empty if
// WantUAST was not set in the request.
UAST *uast.Node `protobuf:"bytes,5,opt,name=uast,proto3" json:"uast,omitempty"`
// Programming/data/markup language of the file as returned by enry. It will
// be empty unless WantLanguage or WantUAST were set in the request.
Language string `protobuf:"bytes,6,opt,name=language,proto3" json:"language,omitempty"`
}
File is a repository file.
func (*File) Descriptor ¶
func (*File) ProtoMessage ¶
func (*File) ProtoMessage()
func (*File) XXX_DiscardUnknown ¶
func (m *File) XXX_DiscardUnknown()
func (*File) XXX_Unmarshal ¶
type FilesRequest ¶
type FilesRequest struct {
// Revision of the file.
Revision *ReferencePointer `protobuf:"bytes,1,opt,name=revision,proto3" json:"revision,omitempty"`
// IncludePattern is a regexp. Only the files with matching file paths will
// be included in the response.
IncludePattern string `protobuf:"bytes,2,opt,name=include_pattern,json=includePattern,proto3" json:"include_pattern,omitempty"`
// ExcludePattern is a regexp. Any files with matching file paths will be
// excluded from the response.
ExcludePattern string `protobuf:"bytes,3,opt,name=exclude_pattern,json=excludePattern,proto3" json:"exclude_pattern,omitempty"`
// ExcludeVendored will exclude any verdored file from the response. The
// list of paths considered as vendor is available at:
// https://github.com/github/linguist/blob/master/lib/linguist/vendor.yml
ExcludeVendored bool `protobuf:"varint,4,opt,name=exclude_vendored,json=excludeVendored,proto3" json:"exclude_vendored,omitempty"`
// WantContents will fill the response file Content.
WantContents bool `protobuf:"varint,5,opt,name=want_contents,json=wantContents,proto3" json:"want_contents,omitempty"`
// WantUAST will fill the response file UAST and Language.
WantUAST bool `protobuf:"varint,6,opt,name=want_uast,json=wantUast,proto3" json:"want_uast,omitempty"`
// WantLanguage will fill the response file Language.
WantLanguage bool `protobuf:"varint,7,opt,name=want_language,json=wantLanguage,proto3" json:"want_language,omitempty"`
// IncludeLanguages will filter files by language. The language names are
// case insensitive. The list of language names is available at
// https://github.com/github/linguist/blob/master/lib/linguist/languages.yml
IncludeLanguages []string `protobuf:"bytes,8,rep,name=include_languages,json=includeLanguages,proto3" json:"include_languages,omitempty"`
}
FilesRequest defines a request of Files to the Data service.
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
func (*FilesRequest) XXX_DiscardUnknown ¶
func (m *FilesRequest) XXX_DiscardUnknown()
func (*FilesRequest) XXX_Marshal ¶
func (m *FilesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*FilesRequest) XXX_Merge ¶
func (dst *FilesRequest) XXX_Merge(src proto.Message)
func (*FilesRequest) XXX_Size ¶
func (m *FilesRequest) XXX_Size() int
func (*FilesRequest) XXX_Unmarshal ¶
func (m *FilesRequest) XXX_Unmarshal(b []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"`
// CreatedAt is the timestamp of the creation date of the push event.
CreatedAt time.Time `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3,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"`
// DistinctCommits 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 related to the specific analyzer receiving the PushEvent.
Configuration types.Struct `protobuf:"bytes,6,opt,name=configuration,proto3" json:"configuration"`
// CommitRevision is the revision range of this push.
CommitRevision `protobuf:"bytes,7,opt,name=commit_revision,json=commitRevision,proto3,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 ¶ added in v0.0.4
func (e *PushEvent) Revision() *CommitRevision
Revision honors the Event interface.
func (*PushEvent) XXX_DiscardUnknown ¶
func (m *PushEvent) XXX_DiscardUnknown()
func (*PushEvent) XXX_Marshal ¶
func (*PushEvent) XXX_Unmarshal ¶
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 target reference.
ReferenceName gopkg_in_src_d_go_git_v4_plumbing.ReferenceName `` /* 157-byte string literal not displayed */
// Hash is the full SHA1 of the target reference.
Hash string `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"`
}
ReferencePointer is a pointer 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 ¶ added in v0.0.4
func (e *ReferencePointer) Repository() *RepositoryInfo
Repository returns the RepositoryInfo
func (*ReferencePointer) Reset ¶
func (m *ReferencePointer) Reset()
func (*ReferencePointer) Short ¶ added in v0.0.4
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
func (*ReferencePointer) XXX_DiscardUnknown ¶
func (m *ReferencePointer) XXX_DiscardUnknown()
func (*ReferencePointer) XXX_Marshal ¶
func (m *ReferencePointer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ReferencePointer) XXX_Merge ¶
func (dst *ReferencePointer) XXX_Merge(src proto.Message)
func (*ReferencePointer) XXX_Size ¶
func (m *ReferencePointer) XXX_Size() int
func (*ReferencePointer) XXX_Unmarshal ¶
func (m *ReferencePointer) XXX_Unmarshal(b []byte) error
type RepositoryInfo ¶ added in v0.0.4
RepositoryInfo contains information about a repository
func ParseRepositoryInfo ¶ added in v0.1.1
func ParseRepositoryInfo(input string) (*RepositoryInfo, error)
ParseRepositoryInfo creates RepositoryInfo from a string
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"`
// CreatedAt is the timestamp of the creation date of the review event.
CreatedAt time.Time `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3,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,proto3,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,proto3" json:"source"`
// Configuration related to the specific analyzer receiving the ReviewEvent.
Configuration types.Struct `protobuf:"bytes,10,opt,name=configuration,proto3" 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 is the revision range of this review.
CommitRevision `protobuf:"bytes,7,opt,name=commit_revision,json=commitRevision,proto3,embedded=commit_revision" json:"commit_revision"`
}
ReviewEvent represents a Review (pull request in case of GitHub) being created or updated.
func (*ReviewEvent) Descriptor ¶
func (*ReviewEvent) Descriptor() ([]byte, []int)
func (*ReviewEvent) ID ¶ added in v0.0.4
func (e *ReviewEvent) ID() EventID
ID honors the Event interface.
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 ¶ added in v0.0.4
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 ¶ added in v0.0.4
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.4
func (e *ReviewEvent) Validate() error
Validate honors the Event interface.
func (*ReviewEvent) XXX_DiscardUnknown ¶
func (m *ReviewEvent) XXX_DiscardUnknown()
func (*ReviewEvent) XXX_Marshal ¶
func (m *ReviewEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ReviewEvent) XXX_Merge ¶
func (dst *ReviewEvent) XXX_Merge(src proto.Message)
func (*ReviewEvent) XXX_Size ¶
func (m *ReviewEvent) XXX_Size() int
func (*ReviewEvent) XXX_Unmarshal ¶
func (m *ReviewEvent) XXX_Unmarshal(b []byte) error