Documentation ¶
Overview ¶
Package extractor is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- 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.ServiceRegistrar, srv DependencyExtractorServer)
- type DependencyExtractorClient
- type DependencyExtractorServer
- type ExtractRequest
- func (*ExtractRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ExtractRequest) GetFileContents() map[string]string
- func (x *ExtractRequest) GetSeparator() string
- func (x *ExtractRequest) GetUrl() string
- func (*ExtractRequest) ProtoMessage()
- func (x *ExtractRequest) ProtoReflect() protoreflect.Message
- func (x *ExtractRequest) Reset()
- func (x *ExtractRequest) String() string
- type ExtractResponse
- func (*ExtractResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ExtractResponse) GetManagementFiles() []*deps.DependencyManagementFile
- func (*ExtractResponse) ProtoMessage()
- func (x *ExtractResponse) ProtoReflect() protoreflect.Message
- func (x *ExtractResponse) Reset()
- func (x *ExtractResponse) String() string
- type MatchRequest
- func (*MatchRequest) Descriptor() ([]byte, []int)deprecated
- func (x *MatchRequest) GetPaths() []string
- func (x *MatchRequest) GetSeparator() string
- func (*MatchRequest) ProtoMessage()
- func (x *MatchRequest) ProtoReflect() protoreflect.Message
- func (x *MatchRequest) Reset()
- func (x *MatchRequest) String() string
- type MatchResponse
- type UnimplementedDependencyExtractorServer
- type UnsafeDependencyExtractorServer
Constants ¶
This section is empty.
Variables ¶
var DependencyExtractor_ServiceDesc = grpc.ServiceDesc{ ServiceName: "cloud.deps.api.v1alpha.extractor.DependencyExtractor", HandlerType: (*DependencyExtractorServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Match", Handler: _DependencyExtractor_Match_Handler, }, { MethodName: "Extract", Handler: _DependencyExtractor_Extract_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "depscloud_api/v1alpha/extractor/extractor.proto", }
DependencyExtractor_ServiceDesc is the grpc.ServiceDesc for DependencyExtractor service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_depscloud_api_v1alpha_extractor_extractor_proto protoreflect.FileDescriptor
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 to stop working. Consider using RegisterDependencyExtractorHandlerFromEndpoint instead.
func RegisterDependencyExtractorServer ¶
func RegisterDependencyExtractorServer(s grpc.ServiceRegistrar, 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://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewDependencyExtractorClient ¶
func NewDependencyExtractorClient(cc grpc.ClientConnInterface) DependencyExtractorClient
type DependencyExtractorServer ¶
type DependencyExtractorServer interface { Match(context.Context, *MatchRequest) (*MatchResponse, error) Extract(context.Context, *ExtractRequest) (*ExtractResponse, error) // contains filtered or unexported methods }
DependencyExtractorServer is the server API for DependencyExtractor service. All implementations must embed UnimplementedDependencyExtractorServer for forward compatibility
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"` // contains filtered or unexported fields }
func (*ExtractRequest) Descriptor
deprecated
func (*ExtractRequest) Descriptor() ([]byte, []int)
Deprecated: Use ExtractRequest.ProtoReflect.Descriptor instead.
func (*ExtractRequest) GetFileContents ¶
func (x *ExtractRequest) GetFileContents() map[string]string
func (*ExtractRequest) GetSeparator ¶
func (x *ExtractRequest) GetSeparator() string
func (*ExtractRequest) GetUrl ¶
func (x *ExtractRequest) GetUrl() string
func (*ExtractRequest) ProtoMessage ¶
func (*ExtractRequest) ProtoMessage()
func (*ExtractRequest) ProtoReflect ¶ added in v0.3.2
func (x *ExtractRequest) ProtoReflect() protoreflect.Message
func (*ExtractRequest) Reset ¶
func (x *ExtractRequest) Reset()
func (*ExtractRequest) String ¶
func (x *ExtractRequest) String() string
type ExtractResponse ¶
type ExtractResponse struct { ManagementFiles []*deps.DependencyManagementFile `protobuf:"bytes,1,rep,name=managementFiles,proto3" json:"managementFiles,omitempty"` // contains filtered or unexported fields }
func (*ExtractResponse) Descriptor
deprecated
func (*ExtractResponse) Descriptor() ([]byte, []int)
Deprecated: Use ExtractResponse.ProtoReflect.Descriptor instead.
func (*ExtractResponse) GetManagementFiles ¶
func (x *ExtractResponse) GetManagementFiles() []*deps.DependencyManagementFile
func (*ExtractResponse) ProtoMessage ¶
func (*ExtractResponse) ProtoMessage()
func (*ExtractResponse) ProtoReflect ¶ added in v0.3.2
func (x *ExtractResponse) ProtoReflect() protoreflect.Message
func (*ExtractResponse) Reset ¶
func (x *ExtractResponse) Reset()
func (*ExtractResponse) String ¶
func (x *ExtractResponse) String() string
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"` // contains filtered or unexported fields }
func (*MatchRequest) Descriptor
deprecated
func (*MatchRequest) Descriptor() ([]byte, []int)
Deprecated: Use MatchRequest.ProtoReflect.Descriptor instead.
func (*MatchRequest) GetPaths ¶
func (x *MatchRequest) GetPaths() []string
func (*MatchRequest) GetSeparator ¶
func (x *MatchRequest) GetSeparator() string
func (*MatchRequest) ProtoMessage ¶
func (*MatchRequest) ProtoMessage()
func (*MatchRequest) ProtoReflect ¶ added in v0.3.2
func (x *MatchRequest) ProtoReflect() protoreflect.Message
func (*MatchRequest) Reset ¶
func (x *MatchRequest) Reset()
func (*MatchRequest) String ¶
func (x *MatchRequest) String() string
type MatchResponse ¶
type MatchResponse struct { MatchedPaths []string `protobuf:"bytes,1,rep,name=matchedPaths,proto3" json:"matchedPaths,omitempty"` // contains filtered or unexported fields }
func (*MatchResponse) Descriptor
deprecated
func (*MatchResponse) Descriptor() ([]byte, []int)
Deprecated: Use MatchResponse.ProtoReflect.Descriptor instead.
func (*MatchResponse) GetMatchedPaths ¶
func (x *MatchResponse) GetMatchedPaths() []string
func (*MatchResponse) ProtoMessage ¶
func (*MatchResponse) ProtoMessage()
func (*MatchResponse) ProtoReflect ¶ added in v0.3.2
func (x *MatchResponse) ProtoReflect() protoreflect.Message
func (*MatchResponse) Reset ¶
func (x *MatchResponse) Reset()
func (*MatchResponse) String ¶
func (x *MatchResponse) String() string
type UnimplementedDependencyExtractorServer ¶
type UnimplementedDependencyExtractorServer struct { }
UnimplementedDependencyExtractorServer must be embedded to have forward compatible implementations.
func (UnimplementedDependencyExtractorServer) Extract ¶
func (UnimplementedDependencyExtractorServer) Extract(context.Context, *ExtractRequest) (*ExtractResponse, error)
func (UnimplementedDependencyExtractorServer) Match ¶
func (UnimplementedDependencyExtractorServer) Match(context.Context, *MatchRequest) (*MatchResponse, error)
type UnsafeDependencyExtractorServer ¶ added in v0.3.2
type UnsafeDependencyExtractorServer interface {
// contains filtered or unexported methods
}
UnsafeDependencyExtractorServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DependencyExtractorServer will result in compilation errors.