friend

package
v0.0.0-...-d272d5c Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FriendStatus_name = map[int32]string{
		0: "FRIEND_STATUS_UNKNOWN",
		1: "FRIEND_STATUS_APPLYING",
		2: "FRIEND_STATUS_VERIFYING",
		3: "FRIEND_STATUS_PASS",
		4: "FRIEND_STATUS_REFUSE",
		5: "FRIEND_STATUS_BLACK",
		6: "FRIEND_STATUS_DELETE",
	}
	FriendStatus_value = map[string]int32{
		"FRIEND_STATUS_UNKNOWN":   0,
		"FRIEND_STATUS_APPLYING":  1,
		"FRIEND_STATUS_VERIFYING": 2,
		"FRIEND_STATUS_PASS":      3,
		"FRIEND_STATUS_REFUSE":    4,
		"FRIEND_STATUS_BLACK":     5,
		"FRIEND_STATUS_DELETE":    6,
	}
)

Enum value maps for FriendStatus.

View Source
var File_v1_friend_friend_proto protoreflect.FileDescriptor
View Source
var Friend_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "Friend",
	HandlerType: (*FriendServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateFriend",
			Handler:    _Friend_CreateFriend_Handler,
		},
		{
			MethodName: "UpdateFriendStatus",
			Handler:    _Friend_UpdateFriendStatus_Handler,
		},
		{
			MethodName: "UpdateFriendRemark",
			Handler:    _Friend_UpdateFriendRemark_Handler,
		},
		{
			MethodName: "ListUserFriend",
			Handler:    _Friend_ListUserFriend_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "v1/friend/friend.proto",
}

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

Functions

func RegisterFriendServer

func RegisterFriendServer(s grpc.ServiceRegistrar, srv FriendServer)

Types

type CreateFriendReq

type CreateFriendReq struct {
	UserId        int64  `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`                     //用户id
	FriendId      int64  `protobuf:"varint,2,opt,name=friend_id,json=friendId,proto3" json:"friend_id,omitempty"`               //好友id
	FriendStatus  int32  `protobuf:"varint,3,opt,name=friend_status,json=friendStatus,proto3" json:"friend_status,omitempty"`   //好友状态
	VerifyMessage string `protobuf:"bytes,4,opt,name=verify_message,json=verifyMessage,proto3" json:"verify_message,omitempty"` //验证消息或问题答案
	// contains filtered or unexported fields
}

添加好友请求参数

func (*CreateFriendReq) Descriptor deprecated

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

Deprecated: Use CreateFriendReq.ProtoReflect.Descriptor instead.

func (*CreateFriendReq) GetFriendId

func (x *CreateFriendReq) GetFriendId() int64

func (*CreateFriendReq) GetFriendStatus

func (x *CreateFriendReq) GetFriendStatus() int32

func (*CreateFriendReq) GetUserId

func (x *CreateFriendReq) GetUserId() int64

func (*CreateFriendReq) GetVerifyMessage

func (x *CreateFriendReq) GetVerifyMessage() string

func (*CreateFriendReq) ProtoMessage

func (*CreateFriendReq) ProtoMessage()

func (*CreateFriendReq) ProtoReflect

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

func (*CreateFriendReq) Reset

func (x *CreateFriendReq) Reset()

func (*CreateFriendReq) String

func (x *CreateFriendReq) String() string

type CreateFriendRsp

type CreateFriendRsp struct {
	// contains filtered or unexported fields
}

添加好友相应参数

func (*CreateFriendRsp) Descriptor deprecated

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

Deprecated: Use CreateFriendRsp.ProtoReflect.Descriptor instead.

func (*CreateFriendRsp) ProtoMessage

func (*CreateFriendRsp) ProtoMessage()

func (*CreateFriendRsp) ProtoReflect

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

func (*CreateFriendRsp) Reset

func (x *CreateFriendRsp) Reset()

func (*CreateFriendRsp) String

func (x *CreateFriendRsp) String() string

type FriendClient

type FriendClient interface {
	// 添加好友
	CreateFriend(ctx context.Context, in *CreateFriendReq, opts ...grpc.CallOption) (*CreateFriendRsp, error)
	//修改好友状态
	UpdateFriendStatus(ctx context.Context, in *UpdateFriendStatusReq, opts ...grpc.CallOption) (*UpdateFriendStatusRsp, error)
	//修改好友备注
	UpdateFriendRemark(ctx context.Context, in *UpdateFriendRemarkReq, opts ...grpc.CallOption) (*UpdateFriendRemarkRsp, error)
	//列表
	ListUserFriend(ctx context.Context, in *ListUserFriendReq, opts ...grpc.CallOption) (*ListUserFriendRsp, error)
}

FriendClient is the client API for Friend 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 NewFriendClient

func NewFriendClient(cc grpc.ClientConnInterface) FriendClient

type FriendServer

type FriendServer interface {
	// 添加好友
	CreateFriend(context.Context, *CreateFriendReq) (*CreateFriendRsp, error)
	//修改好友状态
	UpdateFriendStatus(context.Context, *UpdateFriendStatusReq) (*UpdateFriendStatusRsp, error)
	//修改好友备注
	UpdateFriendRemark(context.Context, *UpdateFriendRemarkReq) (*UpdateFriendRemarkRsp, error)
	//列表
	ListUserFriend(context.Context, *ListUserFriendReq) (*ListUserFriendRsp, error)
	// contains filtered or unexported methods
}

FriendServer is the server API for Friend service. All implementations must embed UnimplementedFriendServer for forward compatibility

type FriendStatus

type FriendStatus int32

好友状态枚举

const (
	FriendStatus_FRIEND_STATUS_UNKNOWN   FriendStatus = 0 //未知
	FriendStatus_FRIEND_STATUS_APPLYING  FriendStatus = 1 //申请中
	FriendStatus_FRIEND_STATUS_VERIFYING FriendStatus = 2 //验证中
	FriendStatus_FRIEND_STATUS_PASS      FriendStatus = 3 //通过
	FriendStatus_FRIEND_STATUS_REFUSE    FriendStatus = 4 //拒绝
	FriendStatus_FRIEND_STATUS_BLACK     FriendStatus = 5 //拉黑
	FriendStatus_FRIEND_STATUS_DELETE    FriendStatus = 6 //删除
)

func (FriendStatus) Descriptor

func (FriendStatus) Enum

func (x FriendStatus) Enum() *FriendStatus

func (FriendStatus) EnumDescriptor deprecated

func (FriendStatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use FriendStatus.Descriptor instead.

func (FriendStatus) Number

func (FriendStatus) String

func (x FriendStatus) String() string

func (FriendStatus) Type

type ListUserFriendReq

type ListUserFriendReq struct {
	UserId       int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` //用户id
	FriendStatus int32 `protobuf:"varint,2,opt,name=friend_status,json=friendStatus,proto3" json:"friend_status,omitempty"`
	// contains filtered or unexported fields
}

列表请求参数

func (*ListUserFriendReq) Descriptor deprecated

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

Deprecated: Use ListUserFriendReq.ProtoReflect.Descriptor instead.

func (*ListUserFriendReq) GetFriendStatus

func (x *ListUserFriendReq) GetFriendStatus() int32

func (*ListUserFriendReq) GetUserId

func (x *ListUserFriendReq) GetUserId() int64

func (*ListUserFriendReq) ProtoMessage

func (*ListUserFriendReq) ProtoMessage()

func (*ListUserFriendReq) ProtoReflect

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

func (*ListUserFriendReq) Reset

func (x *ListUserFriendReq) Reset()

func (*ListUserFriendReq) String

func (x *ListUserFriendReq) String() string

type ListUserFriendRsp

type ListUserFriendRsp struct {
	List []*ListUserFriendRsp_List `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"` //好友列表
	// contains filtered or unexported fields
}

列表响应参数

func (*ListUserFriendRsp) Descriptor deprecated

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

Deprecated: Use ListUserFriendRsp.ProtoReflect.Descriptor instead.

func (*ListUserFriendRsp) GetList

func (x *ListUserFriendRsp) GetList() []*ListUserFriendRsp_List

func (*ListUserFriendRsp) ProtoMessage

func (*ListUserFriendRsp) ProtoMessage()

func (*ListUserFriendRsp) ProtoReflect

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

func (*ListUserFriendRsp) Reset

func (x *ListUserFriendRsp) Reset()

func (*ListUserFriendRsp) String

func (x *ListUserFriendRsp) String() string

type ListUserFriendRsp_List

type ListUserFriendRsp_List struct {
	Id           int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`                                        //好友id
	Nickname     string `protobuf:"bytes,2,opt,name=nickname,proto3" json:"nickname,omitempty"`                             //好友昵称
	Sex          int32  `protobuf:"varint,3,opt,name=sex,proto3" json:"sex,omitempty"`                                      //好友性别
	AvatarUrl    string `protobuf:"bytes,4,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"`          //好友头像
	PersonalSign string `protobuf:"bytes,5,opt,name=personal_sign,json=personalSign,proto3" json:"personal_sign,omitempty"` //好友个性签名
	Remark       string `protobuf:"bytes,6,opt,name=remark,proto3" json:"remark,omitempty"`                                 //好友备注
	// contains filtered or unexported fields
}

func (*ListUserFriendRsp_List) Descriptor deprecated

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

Deprecated: Use ListUserFriendRsp_List.ProtoReflect.Descriptor instead.

func (*ListUserFriendRsp_List) GetAvatarUrl

func (x *ListUserFriendRsp_List) GetAvatarUrl() string

func (*ListUserFriendRsp_List) GetId

func (x *ListUserFriendRsp_List) GetId() int64

func (*ListUserFriendRsp_List) GetNickname

func (x *ListUserFriendRsp_List) GetNickname() string

func (*ListUserFriendRsp_List) GetPersonalSign

func (x *ListUserFriendRsp_List) GetPersonalSign() string

func (*ListUserFriendRsp_List) GetRemark

func (x *ListUserFriendRsp_List) GetRemark() string

func (*ListUserFriendRsp_List) GetSex

func (x *ListUserFriendRsp_List) GetSex() int32

func (*ListUserFriendRsp_List) ProtoMessage

func (*ListUserFriendRsp_List) ProtoMessage()

func (*ListUserFriendRsp_List) ProtoReflect

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

func (*ListUserFriendRsp_List) Reset

func (x *ListUserFriendRsp_List) Reset()

func (*ListUserFriendRsp_List) String

func (x *ListUserFriendRsp_List) String() string

type UnimplementedFriendServer

type UnimplementedFriendServer struct {
}

UnimplementedFriendServer must be embedded to have forward compatible implementations.

func (UnimplementedFriendServer) CreateFriend

func (UnimplementedFriendServer) ListUserFriend

func (UnimplementedFriendServer) UpdateFriendRemark

func (UnimplementedFriendServer) UpdateFriendStatus

type UnsafeFriendServer

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

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

type UpdateFriendRemarkReq

type UpdateFriendRemarkReq struct {
	UserId       int64  `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`                  //用户id
	FriendId     int64  `protobuf:"varint,2,opt,name=friend_id,json=friendId,proto3" json:"friend_id,omitempty"`            //好友id
	FriendRemark string `protobuf:"bytes,3,opt,name=friend_remark,json=friendRemark,proto3" json:"friend_remark,omitempty"` //好友备注
	// contains filtered or unexported fields
}

修改好友备注请求参数

func (*UpdateFriendRemarkReq) Descriptor deprecated

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

Deprecated: Use UpdateFriendRemarkReq.ProtoReflect.Descriptor instead.

func (*UpdateFriendRemarkReq) GetFriendId

func (x *UpdateFriendRemarkReq) GetFriendId() int64

func (*UpdateFriendRemarkReq) GetFriendRemark

func (x *UpdateFriendRemarkReq) GetFriendRemark() string

func (*UpdateFriendRemarkReq) GetUserId

func (x *UpdateFriendRemarkReq) GetUserId() int64

func (*UpdateFriendRemarkReq) ProtoMessage

func (*UpdateFriendRemarkReq) ProtoMessage()

func (*UpdateFriendRemarkReq) ProtoReflect

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

func (*UpdateFriendRemarkReq) Reset

func (x *UpdateFriendRemarkReq) Reset()

func (*UpdateFriendRemarkReq) String

func (x *UpdateFriendRemarkReq) String() string

type UpdateFriendRemarkRsp

type UpdateFriendRemarkRsp struct {
	// contains filtered or unexported fields
}

修改好友备注响应参数

func (*UpdateFriendRemarkRsp) Descriptor deprecated

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

Deprecated: Use UpdateFriendRemarkRsp.ProtoReflect.Descriptor instead.

func (*UpdateFriendRemarkRsp) ProtoMessage

func (*UpdateFriendRemarkRsp) ProtoMessage()

func (*UpdateFriendRemarkRsp) ProtoReflect

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

func (*UpdateFriendRemarkRsp) Reset

func (x *UpdateFriendRemarkRsp) Reset()

func (*UpdateFriendRemarkRsp) String

func (x *UpdateFriendRemarkRsp) String() string

type UpdateFriendStatusReq

type UpdateFriendStatusReq struct {
	UserId       int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`                   //用户id
	FriendId     int64 `protobuf:"varint,2,opt,name=friend_id,json=friendId,proto3" json:"friend_id,omitempty"`             //好友id
	FriendStatus int32 `protobuf:"varint,3,opt,name=friend_status,json=friendStatus,proto3" json:"friend_status,omitempty"` //好友状态
	// contains filtered or unexported fields
}

修改好友状态请求参数

func (*UpdateFriendStatusReq) Descriptor deprecated

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

Deprecated: Use UpdateFriendStatusReq.ProtoReflect.Descriptor instead.

func (*UpdateFriendStatusReq) GetFriendId

func (x *UpdateFriendStatusReq) GetFriendId() int64

func (*UpdateFriendStatusReq) GetFriendStatus

func (x *UpdateFriendStatusReq) GetFriendStatus() int32

func (*UpdateFriendStatusReq) GetUserId

func (x *UpdateFriendStatusReq) GetUserId() int64

func (*UpdateFriendStatusReq) ProtoMessage

func (*UpdateFriendStatusReq) ProtoMessage()

func (*UpdateFriendStatusReq) ProtoReflect

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

func (*UpdateFriendStatusReq) Reset

func (x *UpdateFriendStatusReq) Reset()

func (*UpdateFriendStatusReq) String

func (x *UpdateFriendStatusReq) String() string

type UpdateFriendStatusRsp

type UpdateFriendStatusRsp struct {
	// contains filtered or unexported fields
}

修改好友状态响应参数

func (*UpdateFriendStatusRsp) Descriptor deprecated

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

Deprecated: Use UpdateFriendStatusRsp.ProtoReflect.Descriptor instead.

func (*UpdateFriendStatusRsp) ProtoMessage

func (*UpdateFriendStatusRsp) ProtoMessage()

func (*UpdateFriendStatusRsp) ProtoReflect

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

func (*UpdateFriendStatusRsp) Reset

func (x *UpdateFriendStatusRsp) Reset()

func (*UpdateFriendStatusRsp) String

func (x *UpdateFriendStatusRsp) String() string

Jump to

Keyboard shortcuts

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