userpb

package
v0.0.0-...-2886eff Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2026 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

View Source
const (
	UserService_GetUserInfos_FullMethodName = "/user.UserService/GetUserInfos"
)

Variables

View Source
var File_api_user_user_proto protoreflect.FileDescriptor
View Source
var UserService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "user.UserService",
	HandlerType: (*UserServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetUserInfos",
			Handler:    _UserService_GetUserInfos_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/user/user.proto",
}

UserService_ServiceDesc is the grpc.ServiceDesc for UserService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterUserServiceServer

func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)

Types

type GetUserInfosRequest

type GetUserInfosRequest struct {
	UserIds []int64 `protobuf:"varint,1,rep,packed,name=user_ids,json=userIds,proto3" json:"user_ids,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserInfosRequest) Descriptor deprecated

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

Deprecated: Use GetUserInfosRequest.ProtoReflect.Descriptor instead.

func (*GetUserInfosRequest) GetUserIds

func (x *GetUserInfosRequest) GetUserIds() []int64

func (*GetUserInfosRequest) ProtoMessage

func (*GetUserInfosRequest) ProtoMessage()

func (*GetUserInfosRequest) ProtoReflect

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

func (*GetUserInfosRequest) Reset

func (x *GetUserInfosRequest) Reset()

func (*GetUserInfosRequest) String

func (x *GetUserInfosRequest) String() string

type GetUserInfosResponse

type GetUserInfosResponse struct {
	Users []*UserInfo `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserInfosResponse) Descriptor deprecated

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

Deprecated: Use GetUserInfosResponse.ProtoReflect.Descriptor instead.

func (*GetUserInfosResponse) GetUsers

func (x *GetUserInfosResponse) GetUsers() []*UserInfo

func (*GetUserInfosResponse) ProtoMessage

func (*GetUserInfosResponse) ProtoMessage()

func (*GetUserInfosResponse) ProtoReflect

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

func (*GetUserInfosResponse) Reset

func (x *GetUserInfosResponse) Reset()

func (*GetUserInfosResponse) String

func (x *GetUserInfosResponse) String() string

type UnimplementedUserServiceServer

type UnimplementedUserServiceServer struct{}

UnimplementedUserServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedUserServiceServer) GetUserInfos

type UnsafeUserServiceServer

type UnsafeUserServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServiceServer will result in compilation errors.

type UserInfo

type UserInfo struct {
	UserId   int64  `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Nickname string `protobuf:"bytes,2,opt,name=nickname,proto3" json:"nickname,omitempty"`
	Avatar   string `protobuf:"bytes,3,opt,name=avatar,proto3" json:"avatar,omitempty"`
	// contains filtered or unexported fields
}

func (*UserInfo) Descriptor deprecated

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

Deprecated: Use UserInfo.ProtoReflect.Descriptor instead.

func (*UserInfo) GetAvatar

func (x *UserInfo) GetAvatar() string

func (*UserInfo) GetNickname

func (x *UserInfo) GetNickname() string

func (*UserInfo) GetUserId

func (x *UserInfo) GetUserId() int64

func (*UserInfo) ProtoMessage

func (*UserInfo) ProtoMessage()

func (*UserInfo) ProtoReflect

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

func (*UserInfo) Reset

func (x *UserInfo) Reset()

func (*UserInfo) String

func (x *UserInfo) String() string

type UserServiceClient

type UserServiceClient interface {
	// 批量获取用户信息
	GetUserInfos(ctx context.Context, in *GetUserInfosRequest, opts ...grpc.CallOption) (*GetUserInfosResponse, error)
}

UserServiceClient is the client API for UserService 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 UserServiceServer

type UserServiceServer interface {
	// 批量获取用户信息
	GetUserInfos(context.Context, *GetUserInfosRequest) (*GetUserInfosResponse, error)
	// contains filtered or unexported methods
}

UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility.

Jump to

Keyboard shortcuts

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