protoc

package
v0.0.0-...-5c6cc92 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: MIT Imports: 17 Imported by: 1

Documentation

Overview

Package protoc is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var CodeAnalyzerService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "codeanalyzer.CodeAnalyzerService",
	HandlerType: (*CodeAnalyzerServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "HealthCheck",
			Handler:    _CodeAnalyzerService_HealthCheck_Handler,
		},
		{
			MethodName: "FileUpload",
			Handler:    _CodeAnalyzerService_FileUpload_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "AnalyzeUploader",
			Handler:       _CodeAnalyzerService_AnalyzeUploader_Handler,
			ClientStreams: true,
		},
	},
	Metadata: "code-analyzer/code-analyzer.proto",
}

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

View Source
var File_code_analyzer_code_analyzer_proto protoreflect.FileDescriptor

Functions

func RegisterCodeAnalyzerServiceHandler

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

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

func RegisterCodeAnalyzerServiceHandlerClient

func RegisterCodeAnalyzerServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CodeAnalyzerServiceClient) error

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

func RegisterCodeAnalyzerServiceHandlerFromEndpoint

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

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

func RegisterCodeAnalyzerServiceHandlerServer

func RegisterCodeAnalyzerServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CodeAnalyzerServiceServer) error

RegisterCodeAnalyzerServiceHandlerServer registers the http handlers for service CodeAnalyzerService to "mux". UnaryRPC :call CodeAnalyzerServiceServer 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 RegisterCodeAnalyzerServiceHandlerFromEndpoint instead.

func RegisterCodeAnalyzerServiceServer

func RegisterCodeAnalyzerServiceServer(s grpc.ServiceRegistrar, srv CodeAnalyzerServiceServer)

Types

type CodeAnalyzerServiceClient

type CodeAnalyzerServiceClient interface {
	HealthCheck(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*HealthCheckResponse, error)
	AnalyzeUploader(ctx context.Context, opts ...grpc.CallOption) (CodeAnalyzerService_AnalyzeUploaderClient, error)
	FileUpload(ctx context.Context, in *FileUploadRequest, opts ...grpc.CallOption) (*FileUploadResponse, error)
}

CodeAnalyzerServiceClient is the client API for CodeAnalyzerService 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.

type CodeAnalyzerServiceServer

type CodeAnalyzerServiceServer interface {
	HealthCheck(context.Context, *Empty) (*HealthCheckResponse, error)
	AnalyzeUploader(CodeAnalyzerService_AnalyzeUploaderServer) error
	FileUpload(context.Context, *FileUploadRequest) (*FileUploadResponse, error)
	// contains filtered or unexported methods
}

CodeAnalyzerServiceServer is the server API for CodeAnalyzerService service. All implementations must embed UnimplementedCodeAnalyzerServiceServer for forward compatibility

type CodeAnalyzerService_AnalyzeUploaderClient

type CodeAnalyzerService_AnalyzeUploaderClient interface {
	Send(*UploadRequest) error
	CloseAndRecv() (*UploadResponse, error)
	grpc.ClientStream
}

type CodeAnalyzerService_AnalyzeUploaderServer

type CodeAnalyzerService_AnalyzeUploaderServer interface {
	SendAndClose(*UploadResponse) error
	Recv() (*UploadRequest, error)
	grpc.ServerStream
}

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

func (*Empty) Descriptor deprecated

func (*Empty) Descriptor() ([]byte, []int)

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

func (x *Empty) ProtoReflect() protoreflect.Message

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type FileUploadRequest

type FileUploadRequest struct {
	Mime     string `protobuf:"bytes,1,opt,name=mime,proto3" json:"mime"`
	Base64   string `protobuf:"bytes,2,opt,name=base64,proto3" json:"base64"`
	Name     string `protobuf:"bytes,3,opt,name=name,proto3" json:"name"`
	ReportId string `protobuf:"bytes,4,opt,name=report_id,json=reportId,proto3" json:"report_id"`
	RepoId   uint32 `protobuf:"varint,5,opt,name=repo_id,json=repoId,proto3" json:"repo_id"`
	CommitId string `protobuf:"bytes,6,opt,name=commit_id,json=commitId,proto3" json:"commit_id"`
	QueueAt  string `protobuf:"bytes,7,opt,name=queue_at,json=queueAt,proto3" json:"queue_at"`
	// contains filtered or unexported fields
}

func (*FileUploadRequest) Descriptor deprecated

func (*FileUploadRequest) Descriptor() ([]byte, []int)

Deprecated: Use FileUploadRequest.ProtoReflect.Descriptor instead.

func (*FileUploadRequest) GetBase64

func (x *FileUploadRequest) GetBase64() string

func (*FileUploadRequest) GetCommitId

func (x *FileUploadRequest) GetCommitId() string

func (*FileUploadRequest) GetMime

func (x *FileUploadRequest) GetMime() string

func (*FileUploadRequest) GetName

func (x *FileUploadRequest) GetName() string

func (*FileUploadRequest) GetQueueAt

func (x *FileUploadRequest) GetQueueAt() string

func (*FileUploadRequest) GetRepoId

func (x *FileUploadRequest) GetRepoId() uint32

func (*FileUploadRequest) GetReportId

func (x *FileUploadRequest) GetReportId() string

func (*FileUploadRequest) ProtoMessage

func (*FileUploadRequest) ProtoMessage()

func (*FileUploadRequest) ProtoReflect

func (x *FileUploadRequest) ProtoReflect() protoreflect.Message

func (*FileUploadRequest) Reset

func (x *FileUploadRequest) Reset()

func (*FileUploadRequest) String

func (x *FileUploadRequest) String() string

type FileUploadResponse

type FileUploadResponse struct {
	Status  string                   `protobuf:"bytes,1,opt,name=status,proto3" json:"status"`
	Code    string                   `protobuf:"bytes,2,opt,name=code,proto3" json:"code"`
	Message string                   `protobuf:"bytes,3,opt,name=message,proto3" json:"message"`
	Data    *FileUploadResponse_Data `protobuf:"bytes,4,opt,name=data,proto3" json:"data"`
	// contains filtered or unexported fields
}

func (*FileUploadResponse) Descriptor deprecated

func (*FileUploadResponse) Descriptor() ([]byte, []int)

Deprecated: Use FileUploadResponse.ProtoReflect.Descriptor instead.

func (*FileUploadResponse) GetCode

func (x *FileUploadResponse) GetCode() string

func (*FileUploadResponse) GetData

func (*FileUploadResponse) GetMessage

func (x *FileUploadResponse) GetMessage() string

func (*FileUploadResponse) GetStatus

func (x *FileUploadResponse) GetStatus() string

func (*FileUploadResponse) ProtoMessage

func (*FileUploadResponse) ProtoMessage()

func (*FileUploadResponse) ProtoReflect

func (x *FileUploadResponse) ProtoReflect() protoreflect.Message

func (*FileUploadResponse) Reset

func (x *FileUploadResponse) Reset()

func (*FileUploadResponse) String

func (x *FileUploadResponse) String() string

type FileUploadResponse_Data

type FileUploadResponse_Data struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
	// contains filtered or unexported fields
}

func (*FileUploadResponse_Data) Descriptor deprecated

func (*FileUploadResponse_Data) Descriptor() ([]byte, []int)

Deprecated: Use FileUploadResponse_Data.ProtoReflect.Descriptor instead.

func (*FileUploadResponse_Data) GetName

func (x *FileUploadResponse_Data) GetName() string

func (*FileUploadResponse_Data) ProtoMessage

func (*FileUploadResponse_Data) ProtoMessage()

func (*FileUploadResponse_Data) ProtoReflect

func (x *FileUploadResponse_Data) ProtoReflect() protoreflect.Message

func (*FileUploadResponse_Data) Reset

func (x *FileUploadResponse_Data) Reset()

func (*FileUploadResponse_Data) String

func (x *FileUploadResponse_Data) String() string

type HealthCheckResponse

type HealthCheckResponse struct {
	Health   string `protobuf:"bytes,1,opt,name=health,proto3" json:"health"`
	Dbhealth string `protobuf:"bytes,2,opt,name=dbhealth,proto3" json:"dbhealth"`
	Host     string `protobuf:"bytes,3,opt,name=host,proto3" json:"host"`
	Port     string `protobuf:"bytes,4,opt,name=port,proto3" json:"port"`
	Dbhost   string `protobuf:"bytes,5,opt,name=dbhost,proto3" json:"dbhost"`
	Dbport   string `protobuf:"bytes,6,opt,name=dbport,proto3" json:"dbport"`
	// contains filtered or unexported fields
}

func (*HealthCheckResponse) Descriptor deprecated

func (*HealthCheckResponse) Descriptor() ([]byte, []int)

Deprecated: Use HealthCheckResponse.ProtoReflect.Descriptor instead.

func (*HealthCheckResponse) GetDbhealth

func (x *HealthCheckResponse) GetDbhealth() string

func (*HealthCheckResponse) GetDbhost

func (x *HealthCheckResponse) GetDbhost() string

func (*HealthCheckResponse) GetDbport

func (x *HealthCheckResponse) GetDbport() string

func (*HealthCheckResponse) GetHealth

func (x *HealthCheckResponse) GetHealth() string

func (*HealthCheckResponse) GetHost

func (x *HealthCheckResponse) GetHost() string

func (*HealthCheckResponse) GetPort

func (x *HealthCheckResponse) GetPort() string

func (*HealthCheckResponse) ProtoMessage

func (*HealthCheckResponse) ProtoMessage()

func (*HealthCheckResponse) ProtoReflect

func (x *HealthCheckResponse) ProtoReflect() protoreflect.Message

func (*HealthCheckResponse) Reset

func (x *HealthCheckResponse) Reset()

func (*HealthCheckResponse) String

func (x *HealthCheckResponse) String() string

type UnimplementedCodeAnalyzerServiceServer

type UnimplementedCodeAnalyzerServiceServer struct {
}

UnimplementedCodeAnalyzerServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedCodeAnalyzerServiceServer) AnalyzeUploader

func (UnimplementedCodeAnalyzerServiceServer) FileUpload

func (UnimplementedCodeAnalyzerServiceServer) HealthCheck

type UnsafeCodeAnalyzerServiceServer

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

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

type UploadRequest

type UploadRequest struct {
	Chunk    []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk"`
	Name     string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"`
	ReportId string `protobuf:"bytes,4,opt,name=report_id,json=reportId,proto3" json:"report_id"`
	RepoId   uint32 `protobuf:"varint,5,opt,name=repo_id,json=repoId,proto3" json:"repo_id"`
	CommitId string `protobuf:"bytes,6,opt,name=commit_id,json=commitId,proto3" json:"commit_id"`
	QueueAt  string `protobuf:"bytes,7,opt,name=queue_at,json=queueAt,proto3" json:"queue_at"`
	// contains filtered or unexported fields
}

func (*UploadRequest) Descriptor deprecated

func (*UploadRequest) Descriptor() ([]byte, []int)

Deprecated: Use UploadRequest.ProtoReflect.Descriptor instead.

func (*UploadRequest) GetChunk

func (x *UploadRequest) GetChunk() []byte

func (*UploadRequest) GetCommitId

func (x *UploadRequest) GetCommitId() string

func (*UploadRequest) GetName

func (x *UploadRequest) GetName() string

func (*UploadRequest) GetQueueAt

func (x *UploadRequest) GetQueueAt() string

func (*UploadRequest) GetRepoId

func (x *UploadRequest) GetRepoId() uint32

func (*UploadRequest) GetReportId

func (x *UploadRequest) GetReportId() string

func (*UploadRequest) ProtoMessage

func (*UploadRequest) ProtoMessage()

func (*UploadRequest) ProtoReflect

func (x *UploadRequest) ProtoReflect() protoreflect.Message

func (*UploadRequest) Reset

func (x *UploadRequest) Reset()

func (*UploadRequest) String

func (x *UploadRequest) String() string

type UploadResponse

type UploadResponse struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
	// contains filtered or unexported fields
}

func (*UploadResponse) Descriptor deprecated

func (*UploadResponse) Descriptor() ([]byte, []int)

Deprecated: Use UploadResponse.ProtoReflect.Descriptor instead.

func (*UploadResponse) GetName

func (x *UploadResponse) GetName() string

func (*UploadResponse) ProtoMessage

func (*UploadResponse) ProtoMessage()

func (*UploadResponse) ProtoReflect

func (x *UploadResponse) ProtoReflect() protoreflect.Message

func (*UploadResponse) Reset

func (x *UploadResponse) Reset()

func (*UploadResponse) String

func (x *UploadResponse) String() string

Jump to

Keyboard shortcuts

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