user_pb

package
v0.0.0-...-b240728 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package user_pb is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_user_user_proto protoreflect.FileDescriptor
View Source
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) DeleteUser

func (UnimplementedUserServiceBPServer) FindUserById

func (UnimplementedUserServiceBPServer) ListAllUsers

func (UnimplementedUserServiceBPServer) UpdateUser

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.

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) Descriptor() ([]byte, []int)

Deprecated: Use Void.ProtoReflect.Descriptor instead.

func (*Void) ProtoMessage

func (*Void) ProtoMessage()

func (*Void) ProtoReflect

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

func (*Void) Reset

func (x *Void) Reset()

func (*Void) String

func (x *Void) String() string

Jump to

Keyboard shortcuts

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