Documentation ¶
Overview ¶
Package sources is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterSourcesServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterSourcesServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SourcesServiceClient) error
- func RegisterSourcesServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterSourcesServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SourcesServiceServer) error
- func RegisterSourcesServiceServer(s *grpc.Server, srv SourcesServiceServer)
- type CreateSourceRequest
- func (*CreateSourceRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateSourceRequest) GetSource() *Source
- func (*CreateSourceRequest) ProtoMessage()
- func (x *CreateSourceRequest) ProtoReflect() protoreflect.Message
- func (x *CreateSourceRequest) Reset()
- func (x *CreateSourceRequest) String() string
- type Source
- type SourcesServiceClient
- type SourcesServiceServer
- type UnimplementedSourcesServiceServer
Constants ¶
This section is empty.
Variables ¶
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) ProtoMessage ¶
func (*Source) ProtoMessage()
func (*Source) ProtoReflect ¶
func (x *Source) ProtoReflect() protoreflect.Message
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.
func NewSourcesServiceClient ¶
func NewSourcesServiceClient(cc grpc.ClientConnInterface) SourcesServiceClient
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 ¶
func (*UnimplementedSourcesServiceServer) CreateSource(context.Context, *CreateSourceRequest) (*longrunning.Operation, error)