Documentation ¶
Overview ¶
Package user_pb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterUserServiceBPHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterUserServiceBPHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserServiceBPClient) error
- func RegisterUserServiceBPHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterUserServiceBPHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserServiceBPServer) error
- func RegisterUserServiceBPServer(s grpc.ServiceRegistrar, srv UserServiceBPServer)
- type ListAllUsersResponse
- func (*ListAllUsersResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListAllUsersResponse) GetUserResponse() []*UserResponse
- func (*ListAllUsersResponse) ProtoMessage()
- func (x *ListAllUsersResponse) ProtoReflect() protoreflect.Message
- func (x *ListAllUsersResponse) Reset()
- func (x *ListAllUsersResponse) String() string
- type NewUserRequest
- type UnimplementedUserServiceBPServer
- func (UnimplementedUserServiceBPServer) CreateUser(context.Context, *NewUserRequest) (*UserResponse, error)
- func (UnimplementedUserServiceBPServer) DeleteUser(context.Context, *UserRequest) (*Void, error)
- func (UnimplementedUserServiceBPServer) FindUserById(context.Context, *UserRequest) (*UserResponse, error)
- func (UnimplementedUserServiceBPServer) ListAllUsers(context.Context, *Void) (*ListAllUsersResponse, error)
- func (UnimplementedUserServiceBPServer) UpdateUser(context.Context, *UpdateUserRequest) (*UserResponse, error)
- type UnsafeUserServiceBPServer
- type UpdateUserRequest
- func (*UpdateUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateUserRequest) GetId() int64
- func (x *UpdateUserRequest) GetName() string
- func (*UpdateUserRequest) ProtoMessage()
- func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateUserRequest) Reset()
- func (x *UpdateUserRequest) String() string
- type UserRequest
- type UserResponse
- func (*UserResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UserResponse) GetId() int64
- func (x *UserResponse) GetName() string
- func (*UserResponse) ProtoMessage()
- func (x *UserResponse) ProtoReflect() protoreflect.Message
- func (x *UserResponse) Reset()
- func (x *UserResponse) String() string
- type UserServiceBPClient
- type UserServiceBPServer
- type Void
Constants ¶
This section is empty.
Variables ¶
var File_user_user_proto protoreflect.FileDescriptor
var UserServiceBP_ServiceDesc = grpc.ServiceDesc{ ServiceName: "user.UserServiceBP", HandlerType: (*UserServiceBPServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateUser", Handler: _UserServiceBP_CreateUser_Handler, }, { MethodName: "UpdateUser", Handler: _UserServiceBP_UpdateUser_Handler, }, { MethodName: "FindUserById", Handler: _UserServiceBP_FindUserById_Handler, }, { MethodName: "ListAllUsers", Handler: _UserServiceBP_ListAllUsers_Handler, }, { MethodName: "DeleteUser", Handler: _UserServiceBP_DeleteUser_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "user/user.proto", }
UserServiceBP_ServiceDesc is the grpc.ServiceDesc for UserServiceBP service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterUserServiceBPHandler ¶
func RegisterUserServiceBPHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterUserServiceBPHandler registers the http handlers for service UserServiceBP to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterUserServiceBPHandlerClient ¶
func RegisterUserServiceBPHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserServiceBPClient) error
RegisterUserServiceBPHandlerClient registers the http handlers for service UserServiceBP to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "UserServiceBPClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "UserServiceBPClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "UserServiceBPClient" to call the correct interceptors.
func RegisterUserServiceBPHandlerFromEndpoint ¶
func RegisterUserServiceBPHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterUserServiceBPHandlerFromEndpoint is same as RegisterUserServiceBPHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterUserServiceBPHandlerServer ¶
func RegisterUserServiceBPHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserServiceBPServer) error
RegisterUserServiceBPHandlerServer registers the http handlers for service UserServiceBP to "mux". UnaryRPC :call UserServiceBPServer 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 RegisterUserServiceBPHandlerFromEndpoint instead.
func RegisterUserServiceBPServer ¶
func RegisterUserServiceBPServer(s grpc.ServiceRegistrar, srv UserServiceBPServer)
Types ¶
type ListAllUsersResponse ¶
type ListAllUsersResponse struct { UserResponse []*UserResponse `protobuf:"bytes,1,rep,name=UserResponse,proto3" json:"UserResponse,omitempty"` // contains filtered or unexported fields }
func (*ListAllUsersResponse) Descriptor
deprecated
func (*ListAllUsersResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListAllUsersResponse.ProtoReflect.Descriptor instead.
func (*ListAllUsersResponse) GetUserResponse ¶
func (x *ListAllUsersResponse) GetUserResponse() []*UserResponse
func (*ListAllUsersResponse) ProtoMessage ¶
func (*ListAllUsersResponse) ProtoMessage()
func (*ListAllUsersResponse) ProtoReflect ¶
func (x *ListAllUsersResponse) ProtoReflect() protoreflect.Message
func (*ListAllUsersResponse) Reset ¶
func (x *ListAllUsersResponse) Reset()
func (*ListAllUsersResponse) String ¶
func (x *ListAllUsersResponse) String() string
type NewUserRequest ¶
type NewUserRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*NewUserRequest) Descriptor
deprecated
func (*NewUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use NewUserRequest.ProtoReflect.Descriptor instead.
func (*NewUserRequest) GetName ¶
func (x *NewUserRequest) GetName() string
func (*NewUserRequest) ProtoMessage ¶
func (*NewUserRequest) ProtoMessage()
func (*NewUserRequest) ProtoReflect ¶
func (x *NewUserRequest) ProtoReflect() protoreflect.Message
func (*NewUserRequest) Reset ¶
func (x *NewUserRequest) Reset()
func (*NewUserRequest) String ¶
func (x *NewUserRequest) String() string
type UnimplementedUserServiceBPServer ¶
type UnimplementedUserServiceBPServer struct { }
UnimplementedUserServiceBPServer must be embedded to have forward compatible implementations.
func (UnimplementedUserServiceBPServer) CreateUser ¶
func (UnimplementedUserServiceBPServer) CreateUser(context.Context, *NewUserRequest) (*UserResponse, error)
func (UnimplementedUserServiceBPServer) DeleteUser ¶
func (UnimplementedUserServiceBPServer) DeleteUser(context.Context, *UserRequest) (*Void, error)
func (UnimplementedUserServiceBPServer) FindUserById ¶
func (UnimplementedUserServiceBPServer) FindUserById(context.Context, *UserRequest) (*UserResponse, error)
func (UnimplementedUserServiceBPServer) ListAllUsers ¶
func (UnimplementedUserServiceBPServer) ListAllUsers(context.Context, *Void) (*ListAllUsersResponse, error)
func (UnimplementedUserServiceBPServer) UpdateUser ¶
func (UnimplementedUserServiceBPServer) UpdateUser(context.Context, *UpdateUserRequest) (*UserResponse, error)
type UnsafeUserServiceBPServer ¶
type UnsafeUserServiceBPServer interface {
// contains filtered or unexported methods
}
UnsafeUserServiceBPServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServiceBPServer will result in compilation errors.
type UpdateUserRequest ¶
type UpdateUserRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*UpdateUserRequest) Descriptor
deprecated
func (*UpdateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateUserRequest.ProtoReflect.Descriptor instead.
func (*UpdateUserRequest) GetId ¶
func (x *UpdateUserRequest) GetId() int64
func (*UpdateUserRequest) GetName ¶
func (x *UpdateUserRequest) GetName() string
func (*UpdateUserRequest) ProtoMessage ¶
func (*UpdateUserRequest) ProtoMessage()
func (*UpdateUserRequest) ProtoReflect ¶
func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message
func (*UpdateUserRequest) Reset ¶
func (x *UpdateUserRequest) Reset()
func (*UpdateUserRequest) String ¶
func (x *UpdateUserRequest) String() string
type UserRequest ¶
type UserRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*UserRequest) Descriptor
deprecated
func (*UserRequest) Descriptor() ([]byte, []int)
Deprecated: Use UserRequest.ProtoReflect.Descriptor instead.
func (*UserRequest) GetId ¶
func (x *UserRequest) GetId() int64
func (*UserRequest) ProtoMessage ¶
func (*UserRequest) ProtoMessage()
func (*UserRequest) ProtoReflect ¶
func (x *UserRequest) ProtoReflect() protoreflect.Message
func (*UserRequest) Reset ¶
func (x *UserRequest) Reset()
func (*UserRequest) String ¶
func (x *UserRequest) String() string
type UserResponse ¶
type UserResponse struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*UserResponse) Descriptor
deprecated
func (*UserResponse) Descriptor() ([]byte, []int)
Deprecated: Use UserResponse.ProtoReflect.Descriptor instead.
func (*UserResponse) GetId ¶
func (x *UserResponse) GetId() int64
func (*UserResponse) GetName ¶
func (x *UserResponse) GetName() string
func (*UserResponse) ProtoMessage ¶
func (*UserResponse) ProtoMessage()
func (*UserResponse) ProtoReflect ¶
func (x *UserResponse) ProtoReflect() protoreflect.Message
func (*UserResponse) Reset ¶
func (x *UserResponse) Reset()
func (*UserResponse) String ¶
func (x *UserResponse) String() string
type UserServiceBPClient ¶
type UserServiceBPClient interface { CreateUser(ctx context.Context, in *NewUserRequest, opts ...grpc.CallOption) (*UserResponse, error) UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UserResponse, error) FindUserById(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*UserResponse, error) ListAllUsers(ctx context.Context, in *Void, opts ...grpc.CallOption) (*ListAllUsersResponse, error) DeleteUser(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*Void, error) }
UserServiceBPClient is the client API for UserServiceBP 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 NewUserServiceBPClient ¶
func NewUserServiceBPClient(cc grpc.ClientConnInterface) UserServiceBPClient
type UserServiceBPServer ¶
type UserServiceBPServer interface { CreateUser(context.Context, *NewUserRequest) (*UserResponse, error) UpdateUser(context.Context, *UpdateUserRequest) (*UserResponse, error) FindUserById(context.Context, *UserRequest) (*UserResponse, error) ListAllUsers(context.Context, *Void) (*ListAllUsersResponse, error) DeleteUser(context.Context, *UserRequest) (*Void, error) // contains filtered or unexported methods }
UserServiceBPServer is the server API for UserServiceBP service. All implementations must embed UnimplementedUserServiceBPServer for forward compatibility
type Void ¶
type Void struct {
// contains filtered or unexported fields
}
func (*Void) Descriptor
deprecated
func (*Void) ProtoMessage ¶
func (*Void) ProtoMessage()
func (*Void) ProtoReflect ¶
func (x *Void) ProtoReflect() protoreflect.Message