v1

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2022 License: Unlicense Imports: 16 Imported by: 0

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_bezeichner_v1_service_proto protoreflect.FileDescriptor
View Source
var Service_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "bezeichner.v1.Service",
	HandlerType: (*ServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetIdentifiers",
			Handler:    _Service_GetIdentifiers_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "bezeichner/v1/service.proto",
}

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

Functions

func RegisterServiceHandler

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

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

func RegisterServiceHandlerClient

func RegisterServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ServiceClient) error

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

func RegisterServiceHandlerFromEndpoint

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

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

func RegisterServiceHandlerServer

func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServiceServer) error

RegisterServiceHandlerServer registers the http handlers for service Service to "mux". UnaryRPC :call ServiceServer 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 RegisterServiceHandlerFromEndpoint instead.

func RegisterServiceServer

func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)

Types

type GetIdentifiersRequest

type GetIdentifiersRequest struct {
	Application string `protobuf:"bytes,1,opt,name=application,proto3" json:"application,omitempty"`
	Count       uint64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
	// contains filtered or unexported fields
}

GetIdentifiersRequest for a specific application.

func (*GetIdentifiersRequest) Descriptor deprecated

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

Deprecated: Use GetIdentifiersRequest.ProtoReflect.Descriptor instead.

func (*GetIdentifiersRequest) GetApplication

func (x *GetIdentifiersRequest) GetApplication() string

func (*GetIdentifiersRequest) GetCount

func (x *GetIdentifiersRequest) GetCount() uint64

func (*GetIdentifiersRequest) ProtoMessage

func (*GetIdentifiersRequest) ProtoMessage()

func (*GetIdentifiersRequest) ProtoReflect

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

func (*GetIdentifiersRequest) Reset

func (x *GetIdentifiersRequest) Reset()

func (*GetIdentifiersRequest) String

func (x *GetIdentifiersRequest) String() string

type GetIdentifiersResponse

type GetIdentifiersResponse struct {
	Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
	// contains filtered or unexported fields
}

GetIdentifierResponse for a specific application.

func (*GetIdentifiersResponse) Descriptor deprecated

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

Deprecated: Use GetIdentifiersResponse.ProtoReflect.Descriptor instead.

func (*GetIdentifiersResponse) GetIds

func (x *GetIdentifiersResponse) GetIds() []string

func (*GetIdentifiersResponse) ProtoMessage

func (*GetIdentifiersResponse) ProtoMessage()

func (*GetIdentifiersResponse) ProtoReflect

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

func (*GetIdentifiersResponse) Reset

func (x *GetIdentifiersResponse) Reset()

func (*GetIdentifiersResponse) String

func (x *GetIdentifiersResponse) String() string

type ServiceClient

type ServiceClient interface {
	// GetIdentifiers for a specific application.
	GetIdentifiers(ctx context.Context, in *GetIdentifiersRequest, opts ...grpc.CallOption) (*GetIdentifiersResponse, error)
}

ServiceClient is the client API for Service 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 NewServiceClient

func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient

type ServiceServer

type ServiceServer interface {
	// GetIdentifiers for a specific application.
	GetIdentifiers(context.Context, *GetIdentifiersRequest) (*GetIdentifiersResponse, error)
	// contains filtered or unexported methods
}

ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility

type UnimplementedServiceServer

type UnimplementedServiceServer struct {
}

UnimplementedServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedServiceServer) GetIdentifiers

type UnsafeServiceServer

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

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

Jump to

Keyboard shortcuts

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