dependenciesv2

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: 18 Imported by: 0

Documentation

Overview

Package dependenciesv2 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	Dependencies_Echo_FullMethodName            = "/scanoss.api.dependencies.v2.Dependencies/Echo"
	Dependencies_GetDependencies_FullMethodName = "/scanoss.api.dependencies.v2.Dependencies/GetDependencies"
)

Variables

View Source
var Dependencies_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "scanoss.api.dependencies.v2.Dependencies",
	HandlerType: (*DependenciesServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Echo",
			Handler:    _Dependencies_Echo_Handler,
		},
		{
			MethodName: "GetDependencies",
			Handler:    _Dependencies_GetDependencies_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "scanoss/api/dependencies/v2/scanoss-dependencies.proto",
}

Dependencies_ServiceDesc is the grpc.ServiceDesc for Dependencies 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_scanoss_api_dependencies_v2_scanoss_dependencies_proto protoreflect.FileDescriptor

Functions

func RegisterDependenciesHandler added in v0.1.0

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

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

func RegisterDependenciesHandlerClient added in v0.1.0

func RegisterDependenciesHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DependenciesClient) error

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

func RegisterDependenciesHandlerFromEndpoint added in v0.1.0

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

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

func RegisterDependenciesHandlerServer added in v0.1.0

func RegisterDependenciesHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DependenciesServer) error

RegisterDependenciesHandlerServer registers the http handlers for service Dependencies to "mux". UnaryRPC :call DependenciesServer 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 RegisterDependenciesHandlerFromEndpoint instead.

func RegisterDependenciesServer

func RegisterDependenciesServer(s grpc.ServiceRegistrar, srv DependenciesServer)

Types

type DependenciesClient

type DependenciesClient interface {
	// Standard echo
	Echo(ctx context.Context, in *commonv2.EchoRequest, opts ...grpc.CallOption) (*commonv2.EchoResponse, error)
	// Get dependency details
	GetDependencies(ctx context.Context, in *DependencyRequest, opts ...grpc.CallOption) (*DependencyResponse, error)
}

DependenciesClient is the client API for Dependencies 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 DependenciesServer

type DependenciesServer interface {
	// Standard echo
	Echo(context.Context, *commonv2.EchoRequest) (*commonv2.EchoResponse, error)
	// Get dependency details
	GetDependencies(context.Context, *DependencyRequest) (*DependencyResponse, error)
	// contains filtered or unexported methods
}

DependenciesServer is the server API for Dependencies service. All implementations must embed UnimplementedDependenciesServer for forward compatibility

type DependencyRequest

type DependencyRequest struct {

	// List of dependency files
	Files []*DependencyRequest_Files `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"`
	// Depth to go when searching dependencies
	Depth int32 `protobuf:"varint,2,opt,name=depth,proto3" json:"depth,omitempty"`
	// contains filtered or unexported fields
}

Dependency request data (JSON payload)

func (*DependencyRequest) Descriptor deprecated

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

Deprecated: Use DependencyRequest.ProtoReflect.Descriptor instead.

func (*DependencyRequest) GetDepth

func (x *DependencyRequest) GetDepth() int32

func (*DependencyRequest) GetFiles added in v0.0.2

func (x *DependencyRequest) GetFiles() []*DependencyRequest_Files

func (*DependencyRequest) ProtoMessage

func (*DependencyRequest) ProtoMessage()

func (*DependencyRequest) ProtoReflect

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

func (*DependencyRequest) Reset

func (x *DependencyRequest) Reset()

func (*DependencyRequest) String

func (x *DependencyRequest) String() string

type DependencyRequest_Files added in v0.0.2

type DependencyRequest_Files struct {

	// dependency filename
	File string `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"`
	// List of purls
	Purls []*DependencyRequest_Purls `protobuf:"bytes,2,rep,name=purls,proto3" json:"purls,omitempty"`
	// contains filtered or unexported fields
}

List of dependency files

func (*DependencyRequest_Files) Descriptor deprecated added in v0.0.2

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

Deprecated: Use DependencyRequest_Files.ProtoReflect.Descriptor instead.

func (*DependencyRequest_Files) GetFile added in v0.0.2

func (x *DependencyRequest_Files) GetFile() string

func (*DependencyRequest_Files) GetPurls added in v0.0.2

func (*DependencyRequest_Files) ProtoMessage added in v0.0.2

func (*DependencyRequest_Files) ProtoMessage()

func (*DependencyRequest_Files) ProtoReflect added in v0.0.2

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

func (*DependencyRequest_Files) Reset added in v0.0.2

func (x *DependencyRequest_Files) Reset()

func (*DependencyRequest_Files) String added in v0.0.2

func (x *DependencyRequest_Files) String() string

type DependencyRequest_Purls added in v0.0.2

type DependencyRequest_Purls struct {

	// Purl name
	Purl string `protobuf:"bytes,1,opt,name=purl,proto3" json:"purl,omitempty"`
	// requirement - optional
	Requirement string `protobuf:"bytes,2,opt,name=requirement,proto3" json:"requirement,omitempty"` //    string scope = 3;  // TODO what did we want scope for?
	// contains filtered or unexported fields
}

List of Purls/requirements

func (*DependencyRequest_Purls) Descriptor deprecated added in v0.0.2

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

Deprecated: Use DependencyRequest_Purls.ProtoReflect.Descriptor instead.

func (*DependencyRequest_Purls) GetPurl added in v0.0.2

func (x *DependencyRequest_Purls) GetPurl() string

func (*DependencyRequest_Purls) GetRequirement added in v0.0.2

func (x *DependencyRequest_Purls) GetRequirement() string

func (*DependencyRequest_Purls) ProtoMessage added in v0.0.2

func (*DependencyRequest_Purls) ProtoMessage()

func (*DependencyRequest_Purls) ProtoReflect added in v0.0.2

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

func (*DependencyRequest_Purls) Reset added in v0.0.2

func (x *DependencyRequest_Purls) Reset()

func (*DependencyRequest_Purls) String added in v0.0.2

func (x *DependencyRequest_Purls) String() string

type DependencyResponse

type DependencyResponse struct {

	// Dependency response details
	Files []*DependencyResponse_Files `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"`
	// Response status (required?)
	Status *commonv2.StatusResponse `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

Dependency response data (JSON payload)

func (*DependencyResponse) Descriptor deprecated

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

Deprecated: Use DependencyResponse.ProtoReflect.Descriptor instead.

func (*DependencyResponse) GetFiles added in v0.0.2

func (*DependencyResponse) GetStatus

func (x *DependencyResponse) GetStatus() *commonv2.StatusResponse

func (*DependencyResponse) ProtoMessage

func (*DependencyResponse) ProtoMessage()

func (*DependencyResponse) ProtoReflect

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

func (*DependencyResponse) Reset

func (x *DependencyResponse) Reset()

func (*DependencyResponse) String

func (x *DependencyResponse) String() string

type DependencyResponse_Dependencies added in v0.0.2

type DependencyResponse_Dependencies struct {
	Component string                         `protobuf:"bytes,1,opt,name=component,proto3" json:"component,omitempty"`
	Purl      string                         `protobuf:"bytes,2,opt,name=purl,proto3" json:"purl,omitempty"`
	Version   string                         `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	Licenses  []*DependencyResponse_Licenses `protobuf:"bytes,4,rep,name=licenses,proto3" json:"licenses,omitempty"`
	Url       string                         `protobuf:"bytes,5,opt,name=url,proto3" json:"url,omitempty"`
	Comment   string                         `protobuf:"bytes,6,opt,name=comment,proto3" json:"comment,omitempty"` //    string scope = 7;
	// contains filtered or unexported fields
}

func (*DependencyResponse_Dependencies) Descriptor deprecated added in v0.0.2

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

Deprecated: Use DependencyResponse_Dependencies.ProtoReflect.Descriptor instead.

func (*DependencyResponse_Dependencies) GetComment added in v0.0.4

func (x *DependencyResponse_Dependencies) GetComment() string

func (*DependencyResponse_Dependencies) GetComponent added in v0.0.2

func (x *DependencyResponse_Dependencies) GetComponent() string

func (*DependencyResponse_Dependencies) GetLicenses added in v0.0.2

func (*DependencyResponse_Dependencies) GetPurl added in v0.0.2

func (*DependencyResponse_Dependencies) GetUrl added in v0.0.4

func (*DependencyResponse_Dependencies) GetVersion added in v0.0.2

func (x *DependencyResponse_Dependencies) GetVersion() string

func (*DependencyResponse_Dependencies) ProtoMessage added in v0.0.2

func (*DependencyResponse_Dependencies) ProtoMessage()

func (*DependencyResponse_Dependencies) ProtoReflect added in v0.0.2

func (*DependencyResponse_Dependencies) Reset added in v0.0.2

func (*DependencyResponse_Dependencies) String added in v0.0.2

type DependencyResponse_Files added in v0.0.2

type DependencyResponse_Files struct {
	File         string                             `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"`
	Id           string                             `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	Status       string                             `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
	Dependencies []*DependencyResponse_Dependencies `protobuf:"bytes,4,rep,name=dependencies,proto3" json:"dependencies,omitempty"`
	// contains filtered or unexported fields
}

func (*DependencyResponse_Files) Descriptor deprecated added in v0.0.2

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

Deprecated: Use DependencyResponse_Files.ProtoReflect.Descriptor instead.

func (*DependencyResponse_Files) GetDependencies added in v0.0.2

func (*DependencyResponse_Files) GetFile added in v0.0.2

func (x *DependencyResponse_Files) GetFile() string

func (*DependencyResponse_Files) GetId added in v0.0.2

func (x *DependencyResponse_Files) GetId() string

func (*DependencyResponse_Files) GetStatus added in v0.0.2

func (x *DependencyResponse_Files) GetStatus() string

func (*DependencyResponse_Files) ProtoMessage added in v0.0.2

func (*DependencyResponse_Files) ProtoMessage()

func (*DependencyResponse_Files) ProtoReflect added in v0.0.2

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

func (*DependencyResponse_Files) Reset added in v0.0.2

func (x *DependencyResponse_Files) Reset()

func (*DependencyResponse_Files) String added in v0.0.2

func (x *DependencyResponse_Files) String() string

type DependencyResponse_Licenses added in v0.0.2

type DependencyResponse_Licenses struct {
	Name           string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	SpdxId         string `protobuf:"bytes,2,opt,name=spdx_id,json=spdxId,proto3" json:"spdx_id,omitempty"`
	IsSpdxApproved bool   `protobuf:"varint,3,opt,name=is_spdx_approved,json=isSpdxApproved,proto3" json:"is_spdx_approved,omitempty"`
	Url            string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"`
	// contains filtered or unexported fields
}

func (*DependencyResponse_Licenses) Descriptor deprecated added in v0.0.2

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

Deprecated: Use DependencyResponse_Licenses.ProtoReflect.Descriptor instead.

func (*DependencyResponse_Licenses) GetIsSpdxApproved added in v0.0.3

func (x *DependencyResponse_Licenses) GetIsSpdxApproved() bool

func (*DependencyResponse_Licenses) GetName added in v0.0.2

func (x *DependencyResponse_Licenses) GetName() string

func (*DependencyResponse_Licenses) GetSpdxId added in v0.0.3

func (x *DependencyResponse_Licenses) GetSpdxId() string

func (*DependencyResponse_Licenses) GetUrl added in v0.0.4

func (x *DependencyResponse_Licenses) GetUrl() string

func (*DependencyResponse_Licenses) ProtoMessage added in v0.0.2

func (*DependencyResponse_Licenses) ProtoMessage()

func (*DependencyResponse_Licenses) ProtoReflect added in v0.0.2

func (*DependencyResponse_Licenses) Reset added in v0.0.2

func (x *DependencyResponse_Licenses) Reset()

func (*DependencyResponse_Licenses) String added in v0.0.2

func (x *DependencyResponse_Licenses) String() string

type UnimplementedDependenciesServer

type UnimplementedDependenciesServer struct {
}

UnimplementedDependenciesServer must be embedded to have forward compatible implementations.

func (UnimplementedDependenciesServer) Echo

func (UnimplementedDependenciesServer) GetDependencies

type UnsafeDependenciesServer

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

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

Jump to

Keyboard shortcuts

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