Documentation ¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterOpServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterOpServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client OpServiceClient) error
- func RegisterOpServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterOpServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server OpServiceServer) error
- func RegisterOpServiceServer(s *grpc.Server, srv OpServiceServer)
- type NewUserRegistrationRequest
- type NewUserRegistrationResponse
- type OpServiceClient
- type OpServiceServer
- type UnimplementedOpServiceServer
Constants ¶
This section is empty.
Variables ¶
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 (x *NewUserRegistrationRequest) ProtoReflect() protoreflect.Message
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 (x *NewUserRegistrationResponse) ProtoReflect() protoreflect.Message
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 ¶
func (*UnimplementedOpServiceServer) NewUserRegistration(context.Context, *NewUserRegistrationRequest) (*NewUserRegistrationResponse, error)