sources

package
v0.0.0-...-2610577 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package sources is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_sources_v1_sources_service_proto protoreflect.FileDescriptor

Functions

func RegisterSourcesServiceHandler

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

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

func RegisterSourcesServiceHandlerClient

func RegisterSourcesServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SourcesServiceClient) error

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

func RegisterSourcesServiceHandlerFromEndpoint

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

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

func RegisterSourcesServiceHandlerServer

func RegisterSourcesServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SourcesServiceServer) error

RegisterSourcesServiceHandlerServer registers the http handlers for service SourcesService to "mux". UnaryRPC :call SourcesServiceServer 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 RegisterSourcesServiceHandlerFromEndpoint instead.

func RegisterSourcesServiceServer

func RegisterSourcesServiceServer(s *grpc.Server, srv SourcesServiceServer)

Types

type CreateSourceRequest

type CreateSourceRequest struct {

	// Source to create.
	Source *Source `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateSourceRequest) Descriptor deprecated

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

Deprecated: Use CreateSourceRequest.ProtoReflect.Descriptor instead.

func (*CreateSourceRequest) GetSource

func (x *CreateSourceRequest) GetSource() *Source

func (*CreateSourceRequest) ProtoMessage

func (*CreateSourceRequest) ProtoMessage()

func (*CreateSourceRequest) ProtoReflect

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

func (*CreateSourceRequest) Reset

func (x *CreateSourceRequest) Reset()

func (*CreateSourceRequest) String

func (x *CreateSourceRequest) String() string

type Source

type Source struct {

	// Source url.
	Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	// contains filtered or unexported fields
}

func (*Source) Descriptor deprecated

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

Deprecated: Use Source.ProtoReflect.Descriptor instead.

func (*Source) GetUrl

func (x *Source) GetUrl() string

func (*Source) ProtoMessage

func (*Source) ProtoMessage()

func (*Source) ProtoReflect

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

func (*Source) Reset

func (x *Source) Reset()

func (*Source) String

func (x *Source) String() string

type SourcesServiceClient

type SourcesServiceClient interface {
	// Create source
	//
	// Allows to create a new source for a user.
	CreateSource(ctx context.Context, in *CreateSourceRequest, opts ...grpc.CallOption) (*longrunning.Operation, error)
}

SourcesServiceClient is the client API for SourcesService 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 SourcesServiceServer

type SourcesServiceServer interface {
	// Create source
	//
	// Allows to create a new source for a user.
	CreateSource(context.Context, *CreateSourceRequest) (*longrunning.Operation, error)
}

SourcesServiceServer is the server API for SourcesService service.

type UnimplementedSourcesServiceServer

type UnimplementedSourcesServiceServer struct {
}

UnimplementedSourcesServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedSourcesServiceServer) CreateSource

Jump to

Keyboard shortcuts

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