Documentation ¶
Overview ¶
Package extractor is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterDependencyExtractorHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterDependencyExtractorHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DependencyExtractorClient) error
- func RegisterDependencyExtractorHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterDependencyExtractorHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DependencyExtractorServer) error
- func RegisterDependencyExtractorServer(s *grpc.Server, srv DependencyExtractorServer)
- type DependencyExtractorClient
- type DependencyExtractorServer
- type ExtractRequest
- func (*ExtractRequest) Descriptor() ([]byte, []int)
- func (m *ExtractRequest) GetFileContents() map[string]string
- func (m *ExtractRequest) GetSeparator() string
- func (m *ExtractRequest) GetUrl() string
- func (*ExtractRequest) ProtoMessage()
- func (m *ExtractRequest) Reset()
- func (m *ExtractRequest) String() string
- func (m *ExtractRequest) XXX_DiscardUnknown()
- func (m *ExtractRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ExtractRequest) XXX_Merge(src proto.Message)
- func (m *ExtractRequest) XXX_Size() int
- func (m *ExtractRequest) XXX_Unmarshal(b []byte) error
- type ExtractResponse
- func (*ExtractResponse) Descriptor() ([]byte, []int)
- func (m *ExtractResponse) GetManagementFiles() []*deps.DependencyManagementFile
- func (*ExtractResponse) ProtoMessage()
- func (m *ExtractResponse) Reset()
- func (m *ExtractResponse) String() string
- func (m *ExtractResponse) XXX_DiscardUnknown()
- func (m *ExtractResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ExtractResponse) XXX_Merge(src proto.Message)
- func (m *ExtractResponse) XXX_Size() int
- func (m *ExtractResponse) XXX_Unmarshal(b []byte) error
- type MatchRequest
- func (*MatchRequest) Descriptor() ([]byte, []int)
- func (m *MatchRequest) GetPaths() []string
- func (m *MatchRequest) GetSeparator() string
- func (*MatchRequest) ProtoMessage()
- func (m *MatchRequest) Reset()
- func (m *MatchRequest) String() string
- func (m *MatchRequest) XXX_DiscardUnknown()
- func (m *MatchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MatchRequest) XXX_Merge(src proto.Message)
- func (m *MatchRequest) XXX_Size() int
- func (m *MatchRequest) XXX_Unmarshal(b []byte) error
- type MatchResponse
- func (*MatchResponse) Descriptor() ([]byte, []int)
- func (m *MatchResponse) GetMatchedPaths() []string
- func (*MatchResponse) ProtoMessage()
- func (m *MatchResponse) Reset()
- func (m *MatchResponse) String() string
- func (m *MatchResponse) XXX_DiscardUnknown()
- func (m *MatchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MatchResponse) XXX_Merge(src proto.Message)
- func (m *MatchResponse) XXX_Size() int
- func (m *MatchResponse) XXX_Unmarshal(b []byte) error
- type UnimplementedDependencyExtractorServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterDependencyExtractorHandler ¶
func RegisterDependencyExtractorHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterDependencyExtractorHandler registers the http handlers for service DependencyExtractor to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterDependencyExtractorHandlerClient ¶
func RegisterDependencyExtractorHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DependencyExtractorClient) error
RegisterDependencyExtractorHandlerClient registers the http handlers for service DependencyExtractor to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "DependencyExtractorClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "DependencyExtractorClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "DependencyExtractorClient" to call the correct interceptors.
func RegisterDependencyExtractorHandlerFromEndpoint ¶
func RegisterDependencyExtractorHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterDependencyExtractorHandlerFromEndpoint is same as RegisterDependencyExtractorHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterDependencyExtractorHandlerServer ¶
func RegisterDependencyExtractorHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DependencyExtractorServer) error
RegisterDependencyExtractorHandlerServer registers the http handlers for service DependencyExtractor to "mux". UnaryRPC :call DependencyExtractorServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterDependencyExtractorHandlerFromEndpoint instead.
func RegisterDependencyExtractorServer ¶
func RegisterDependencyExtractorServer(s *grpc.Server, srv DependencyExtractorServer)
Types ¶
type DependencyExtractorClient ¶
type DependencyExtractorClient interface { Match(ctx context.Context, in *MatchRequest, opts ...grpc.CallOption) (*MatchResponse, error) Extract(ctx context.Context, in *ExtractRequest, opts ...grpc.CallOption) (*ExtractResponse, error) }
DependencyExtractorClient is the client API for DependencyExtractor service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewDependencyExtractorClient ¶
func NewDependencyExtractorClient(cc *grpc.ClientConn) DependencyExtractorClient
type DependencyExtractorServer ¶
type DependencyExtractorServer interface { Match(context.Context, *MatchRequest) (*MatchResponse, error) Extract(context.Context, *ExtractRequest) (*ExtractResponse, error) }
DependencyExtractorServer is the server API for DependencyExtractor service.
type ExtractRequest ¶
type ExtractRequest struct { Separator string `protobuf:"bytes,1,opt,name=separator,proto3" json:"separator,omitempty"` FileContents map[string]string `` /* 165-byte string literal not displayed */ Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ExtractRequest) Descriptor ¶
func (*ExtractRequest) Descriptor() ([]byte, []int)
func (*ExtractRequest) GetFileContents ¶
func (m *ExtractRequest) GetFileContents() map[string]string
func (*ExtractRequest) GetSeparator ¶
func (m *ExtractRequest) GetSeparator() string
func (*ExtractRequest) GetUrl ¶
func (m *ExtractRequest) GetUrl() string
func (*ExtractRequest) ProtoMessage ¶
func (*ExtractRequest) ProtoMessage()
func (*ExtractRequest) Reset ¶
func (m *ExtractRequest) Reset()
func (*ExtractRequest) String ¶
func (m *ExtractRequest) String() string
func (*ExtractRequest) XXX_DiscardUnknown ¶
func (m *ExtractRequest) XXX_DiscardUnknown()
func (*ExtractRequest) XXX_Marshal ¶
func (m *ExtractRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ExtractRequest) XXX_Merge ¶
func (m *ExtractRequest) XXX_Merge(src proto.Message)
func (*ExtractRequest) XXX_Size ¶
func (m *ExtractRequest) XXX_Size() int
func (*ExtractRequest) XXX_Unmarshal ¶
func (m *ExtractRequest) XXX_Unmarshal(b []byte) error
type ExtractResponse ¶
type ExtractResponse struct { ManagementFiles []*deps.DependencyManagementFile `protobuf:"bytes,1,rep,name=managementFiles,proto3" json:"managementFiles,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ExtractResponse) Descriptor ¶
func (*ExtractResponse) Descriptor() ([]byte, []int)
func (*ExtractResponse) GetManagementFiles ¶
func (m *ExtractResponse) GetManagementFiles() []*deps.DependencyManagementFile
func (*ExtractResponse) ProtoMessage ¶
func (*ExtractResponse) ProtoMessage()
func (*ExtractResponse) Reset ¶
func (m *ExtractResponse) Reset()
func (*ExtractResponse) String ¶
func (m *ExtractResponse) String() string
func (*ExtractResponse) XXX_DiscardUnknown ¶
func (m *ExtractResponse) XXX_DiscardUnknown()
func (*ExtractResponse) XXX_Marshal ¶
func (m *ExtractResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ExtractResponse) XXX_Merge ¶
func (m *ExtractResponse) XXX_Merge(src proto.Message)
func (*ExtractResponse) XXX_Size ¶
func (m *ExtractResponse) XXX_Size() int
func (*ExtractResponse) XXX_Unmarshal ¶
func (m *ExtractResponse) XXX_Unmarshal(b []byte) error
type MatchRequest ¶
type MatchRequest struct { Separator string `protobuf:"bytes,1,opt,name=separator,proto3" json:"separator,omitempty"` Paths []string `protobuf:"bytes,2,rep,name=paths,proto3" json:"paths,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*MatchRequest) Descriptor ¶
func (*MatchRequest) Descriptor() ([]byte, []int)
func (*MatchRequest) GetPaths ¶
func (m *MatchRequest) GetPaths() []string
func (*MatchRequest) GetSeparator ¶
func (m *MatchRequest) GetSeparator() string
func (*MatchRequest) ProtoMessage ¶
func (*MatchRequest) ProtoMessage()
func (*MatchRequest) Reset ¶
func (m *MatchRequest) Reset()
func (*MatchRequest) String ¶
func (m *MatchRequest) String() string
func (*MatchRequest) XXX_DiscardUnknown ¶
func (m *MatchRequest) XXX_DiscardUnknown()
func (*MatchRequest) XXX_Marshal ¶
func (m *MatchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MatchRequest) XXX_Merge ¶
func (m *MatchRequest) XXX_Merge(src proto.Message)
func (*MatchRequest) XXX_Size ¶
func (m *MatchRequest) XXX_Size() int
func (*MatchRequest) XXX_Unmarshal ¶
func (m *MatchRequest) XXX_Unmarshal(b []byte) error
type MatchResponse ¶
type MatchResponse struct { MatchedPaths []string `protobuf:"bytes,1,rep,name=matchedPaths,proto3" json:"matchedPaths,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*MatchResponse) Descriptor ¶
func (*MatchResponse) Descriptor() ([]byte, []int)
func (*MatchResponse) GetMatchedPaths ¶
func (m *MatchResponse) GetMatchedPaths() []string
func (*MatchResponse) ProtoMessage ¶
func (*MatchResponse) ProtoMessage()
func (*MatchResponse) Reset ¶
func (m *MatchResponse) Reset()
func (*MatchResponse) String ¶
func (m *MatchResponse) String() string
func (*MatchResponse) XXX_DiscardUnknown ¶
func (m *MatchResponse) XXX_DiscardUnknown()
func (*MatchResponse) XXX_Marshal ¶
func (m *MatchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MatchResponse) XXX_Merge ¶
func (m *MatchResponse) XXX_Merge(src proto.Message)
func (*MatchResponse) XXX_Size ¶
func (m *MatchResponse) XXX_Size() int
func (*MatchResponse) XXX_Unmarshal ¶
func (m *MatchResponse) XXX_Unmarshal(b []byte) error
type UnimplementedDependencyExtractorServer ¶
type UnimplementedDependencyExtractorServer struct { }
UnimplementedDependencyExtractorServer can be embedded to have forward compatible implementations.
func (*UnimplementedDependencyExtractorServer) Extract ¶
func (*UnimplementedDependencyExtractorServer) Extract(ctx context.Context, req *ExtractRequest) (*ExtractResponse, error)
func (*UnimplementedDependencyExtractorServer) Match ¶
func (*UnimplementedDependencyExtractorServer) Match(ctx context.Context, req *MatchRequest) (*MatchResponse, error)