scanningv2

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package scanningv2 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	Scanning_Echo_FullMethodName = "/scanoss.api.scanning.v2.Scanning/Echo"
)

Variables

View Source
var File_scanoss_api_scanning_v2_scanoss_scanning_proto protoreflect.FileDescriptor
View Source
var Scanning_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "scanoss.api.scanning.v2.Scanning",
	HandlerType: (*ScanningServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Echo",
			Handler:    _Scanning_Echo_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "scanoss/api/scanning/v2/scanoss-scanning.proto",
}

Scanning_ServiceDesc is the grpc.ServiceDesc for Scanning service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterScanningHandler added in v0.1.0

func RegisterScanningHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterScanningHandler registers the http handlers for service Scanning to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterScanningHandlerClient added in v0.1.0

func RegisterScanningHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ScanningClient) error

RegisterScanningHandlerClient registers the http handlers for service Scanning to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ScanningClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ScanningClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ScanningClient" to call the correct interceptors.

func RegisterScanningHandlerFromEndpoint added in v0.1.0

func RegisterScanningHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterScanningHandlerFromEndpoint is same as RegisterScanningHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterScanningHandlerServer added in v0.1.0

func RegisterScanningHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ScanningServer) error

RegisterScanningHandlerServer registers the http handlers for service Scanning to "mux". UnaryRPC :call ScanningServer 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 RegisterScanningHandlerFromEndpoint instead.

func RegisterScanningServer

func RegisterScanningServer(s grpc.ServiceRegistrar, srv ScanningServer)

Types

type ScanningClient

type ScanningClient interface {
	// Standard echo
	Echo(ctx context.Context, in *commonv2.EchoRequest, opts ...grpc.CallOption) (*commonv2.EchoResponse, error)
}

ScanningClient is the client API for Scanning 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 NewScanningClient

func NewScanningClient(cc grpc.ClientConnInterface) ScanningClient

type ScanningServer

type ScanningServer interface {
	// Standard echo
	Echo(context.Context, *commonv2.EchoRequest) (*commonv2.EchoResponse, error)
	// contains filtered or unexported methods
}

ScanningServer is the server API for Scanning service. All implementations must embed UnimplementedScanningServer for forward compatibility

type UnimplementedScanningServer

type UnimplementedScanningServer struct {
}

UnimplementedScanningServer must be embedded to have forward compatible implementations.

func (UnimplementedScanningServer) Echo

type UnsafeScanningServer

type UnsafeScanningServer interface {
	// contains filtered or unexported methods
}

UnsafeScanningServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ScanningServer will result in compilation errors.

Jump to

Keyboard shortcuts

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