v1

package
v0.0.0-...-8f08b9d Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2020 License: Apache-2.0 Imports: 18 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_op_service_proto protoreflect.FileDescriptor

Functions

func RegisterOpServiceHandler

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

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

func RegisterOpServiceHandlerClient

func RegisterOpServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client OpServiceClient) error

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

func RegisterOpServiceHandlerFromEndpoint

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

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

func RegisterOpServiceHandlerServer

func RegisterOpServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server OpServiceServer) error

RegisterOpServiceHandlerServer registers the http handlers for service OpService to "mux". UnaryRPC :call OpServiceServer 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 RegisterOpServiceHandlerFromEndpoint instead.

func RegisterOpServiceServer

func RegisterOpServiceServer(s *grpc.Server, srv OpServiceServer)

Types

type NewUserRegistrationRequest

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

Request data to create new op

func (*NewUserRegistrationRequest) Descriptor deprecated

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

Deprecated: Use NewUserRegistrationRequest.ProtoReflect.Descriptor instead.

func (*NewUserRegistrationRequest) ProtoMessage

func (*NewUserRegistrationRequest) ProtoMessage()

func (*NewUserRegistrationRequest) ProtoReflect

func (*NewUserRegistrationRequest) Reset

func (x *NewUserRegistrationRequest) Reset()

func (*NewUserRegistrationRequest) String

func (x *NewUserRegistrationRequest) String() string

type NewUserRegistrationResponse

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

Contains data of created op

func (*NewUserRegistrationResponse) Descriptor deprecated

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

Deprecated: Use NewUserRegistrationResponse.ProtoReflect.Descriptor instead.

func (*NewUserRegistrationResponse) ProtoMessage

func (*NewUserRegistrationResponse) ProtoMessage()

func (*NewUserRegistrationResponse) ProtoReflect

func (*NewUserRegistrationResponse) Reset

func (x *NewUserRegistrationResponse) Reset()

func (*NewUserRegistrationResponse) String

func (x *NewUserRegistrationResponse) String() string

type OpServiceClient

type OpServiceClient interface {
	// RegistrationUser new op task
	NewUserRegistration(ctx context.Context, in *NewUserRegistrationRequest, opts ...grpc.CallOption) (*NewUserRegistrationResponse, error)
}

OpServiceClient is the client API for OpService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewOpServiceClient

func NewOpServiceClient(cc grpc.ClientConnInterface) OpServiceClient

type OpServiceServer

type OpServiceServer interface {
	// RegistrationUser new op task
	NewUserRegistration(context.Context, *NewUserRegistrationRequest) (*NewUserRegistrationResponse, error)
}

OpServiceServer is the server API for OpService service.

type UnimplementedOpServiceServer

type UnimplementedOpServiceServer struct {
}

UnimplementedOpServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedOpServiceServer) NewUserRegistration

Jump to

Keyboard shortcuts

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