v1

package
v0.0.0-...-d80f745 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserService_BatchGetUser_FullMethodName = "/passport.sdk.user.v1.UserService/BatchGetUser"
	UserService_GetUser_FullMethodName      = "/passport.sdk.user.v1.UserService/GetUser"
)

Variables

View Source
var File_user_v1_user_proto protoreflect.FileDescriptor
View Source
var UserService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "passport.sdk.user.v1.UserService",
	HandlerType: (*UserServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "BatchGetUser",
			Handler:    _UserService_BatchGetUser_Handler,
		},
		{
			MethodName: "GetUser",
			Handler:    _UserService_GetUser_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "user/v1/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 BatchGetUserRequest

type BatchGetUserRequest struct {
	Uids []uint64 `protobuf:"varint,1,rep,packed,name=uids,proto3" json:"uids,omitempty"`
	// contains filtered or unexported fields
}

func (*BatchGetUserRequest) Descriptor deprecated

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

Deprecated: Use BatchGetUserRequest.ProtoReflect.Descriptor instead.

func (*BatchGetUserRequest) GetUids

func (x *BatchGetUserRequest) GetUids() []uint64

func (*BatchGetUserRequest) ProtoMessage

func (*BatchGetUserRequest) ProtoMessage()

func (*BatchGetUserRequest) ProtoReflect

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

func (*BatchGetUserRequest) Reset

func (x *BatchGetUserRequest) Reset()

func (*BatchGetUserRequest) String

func (x *BatchGetUserRequest) String() string

type BatchGetUserResponse

type BatchGetUserResponse struct {
	Users map[string]*UserInfo `` /* 151-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*BatchGetUserResponse) Descriptor deprecated

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

Deprecated: Use BatchGetUserResponse.ProtoReflect.Descriptor instead.

func (*BatchGetUserResponse) GetUsers

func (x *BatchGetUserResponse) GetUsers() map[string]*UserInfo

func (*BatchGetUserResponse) ProtoMessage

func (*BatchGetUserResponse) ProtoMessage()

func (*BatchGetUserResponse) ProtoReflect

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

func (*BatchGetUserResponse) Reset

func (x *BatchGetUserResponse) Reset()

func (*BatchGetUserResponse) String

func (x *BatchGetUserResponse) String() string

type GetUserRequest

type GetUserRequest struct {
	Uid uint64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserRequest) Descriptor deprecated

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

Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead.

func (*GetUserRequest) GetUid

func (x *GetUserRequest) GetUid() uint64

func (*GetUserRequest) ProtoMessage

func (*GetUserRequest) ProtoMessage()

func (*GetUserRequest) ProtoReflect

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

func (*GetUserRequest) Reset

func (x *GetUserRequest) Reset()

func (*GetUserRequest) String

func (x *GetUserRequest) String() string

type GetUserResponse

type GetUserResponse struct {
	User *UserInfo `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserResponse) Descriptor deprecated

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

Deprecated: Use GetUserResponse.ProtoReflect.Descriptor instead.

func (*GetUserResponse) GetUser

func (x *GetUserResponse) GetUser() *UserInfo

func (*GetUserResponse) ProtoMessage

func (*GetUserResponse) ProtoMessage()

func (*GetUserResponse) ProtoReflect

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

func (*GetUserResponse) Reset

func (x *GetUserResponse) Reset()

func (*GetUserResponse) String

func (x *GetUserResponse) 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) BatchGetUser

func (UnimplementedUserServiceServer) GetUser

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 {
	Uid       uint64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,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"`
	StyleSign string `protobuf:"bytes,4,opt,name=style_sign,json=styleSign,proto3" json:"style_sign,omitempty"`
	Gender    string `protobuf:"bytes,5,opt,name=gender,proto3" json:"gender,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) GetGender

func (x *UserInfo) GetGender() string

func (*UserInfo) GetNickname

func (x *UserInfo) GetNickname() string

func (*UserInfo) GetStyleSign

func (x *UserInfo) GetStyleSign() string

func (*UserInfo) GetUid

func (x *UserInfo) GetUid() uint64

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 {
	// 批量获取用户信息
	BatchGetUser(ctx context.Context, in *BatchGetUserRequest, opts ...grpc.CallOption) (*BatchGetUserResponse, error)
	// 获取用户信息
	GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, 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 {
	// 批量获取用户信息
	BatchGetUser(context.Context, *BatchGetUserRequest) (*BatchGetUserResponse, error)
	// 获取用户信息
	GetUser(context.Context, *GetUserRequest) (*GetUserResponse, 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