Documentation ¶
Overview ¶
Package user is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterUserHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterUserHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserClient) error
- func RegisterUserHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterUserHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserServer) error
- func RegisterUserServer(s *grpc.Server, srv UserServer)
- type Request
- type Response
- type Response_Message
- func (*Response_Message) Descriptor() ([]byte, []int)deprecated
- func (x *Response_Message) GetError() string
- func (x *Response_Message) GetMessage() []*any.Any
- func (*Response_Message) ProtoMessage()
- func (x *Response_Message) ProtoReflect() protoreflect.Message
- func (x *Response_Message) Reset()
- func (x *Response_Message) String() string
- type UnimplementedUserServer
- type UserClient
- type UserServer
Constants ¶
This section is empty.
Variables ¶
var File_github_com_gen95mis_messenger_protobuf_user_user_proto protoreflect.FileDescriptor
Functions ¶
func RegisterUserHandler ¶
RegisterUserHandler registers the http handlers for service User to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterUserHandlerClient ¶
RegisterUserHandlerClient registers the http handlers for service User to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "UserClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "UserClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "UserClient" to call the correct interceptors.
func RegisterUserHandlerFromEndpoint ¶
func RegisterUserHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterUserHandlerFromEndpoint is same as RegisterUserHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterUserHandlerServer ¶
RegisterUserHandlerServer registers the http handlers for service User to "mux". UnaryRPC :call UserServer 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 RegisterUserHandlerFromEndpoint instead.
func RegisterUserServer ¶
func RegisterUserServer(s *grpc.Server, srv UserServer)
Types ¶
type Request ¶
type Request struct { Login string `protobuf:"bytes,1,opt,name=login,proto3" json:"login,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*Request) Descriptor
deprecated
func (*Request) GetPassword ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
type Response ¶
type Response struct { Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` Response *Response_Message `protobuf:"bytes,2,opt,name=response,proto3" json:"response,omitempty"` // contains filtered or unexported fields }
func (*Response) Descriptor
deprecated
func (*Response) GetResponse ¶
func (x *Response) GetResponse() *Response_Message
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type Response_Message ¶
type Response_Message struct { Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` Message []*any.Any `protobuf:"bytes,2,rep,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*Response_Message) Descriptor
deprecated
func (*Response_Message) Descriptor() ([]byte, []int)
Deprecated: Use Response_Message.ProtoReflect.Descriptor instead.
func (*Response_Message) GetError ¶
func (x *Response_Message) GetError() string
func (*Response_Message) GetMessage ¶
func (x *Response_Message) GetMessage() []*any.Any
func (*Response_Message) ProtoMessage ¶
func (*Response_Message) ProtoMessage()
func (*Response_Message) ProtoReflect ¶
func (x *Response_Message) ProtoReflect() protoreflect.Message
func (*Response_Message) Reset ¶
func (x *Response_Message) Reset()
func (*Response_Message) String ¶
func (x *Response_Message) String() string
type UnimplementedUserServer ¶
type UnimplementedUserServer struct { }
UnimplementedUserServer can be embedded to have forward compatible implementations.
func (*UnimplementedUserServer) UpdatePassword ¶
type UserClient ¶
type UserClient interface { New(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) UpdatePassword(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) Count(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Response, error) }
UserClient is the client API for User service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewUserClient ¶
func NewUserClient(cc grpc.ClientConnInterface) UserClient