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: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RelationService_FollowUser_FullMethodName            = "/relation.sdk.v1.RelationService/FollowUser"
	RelationService_GetUserFanList_FullMethodName        = "/relation.sdk.v1.RelationService/GetUserFanList"
	RelationService_GetUserFollowingList_FullMethodName  = "/relation.sdk.v1.RelationService/GetUserFollowingList"
	RelationService_RemoveUserFan_FullMethodName         = "/relation.sdk.v1.RelationService/RemoveUserFan"
	RelationService_GetUserFanCount_FullMethodName       = "/relation.sdk.v1.RelationService/GetUserFanCount"
	RelationService_GetUserFollowingCount_FullMethodName = "/relation.sdk.v1.RelationService/GetUserFollowingCount"
)

Variables

View Source
var (
	FollowUserRequest_Action_name = map[int32]string{
		0: "ACTION_UNSPECIFIED",
		1: "ACTION_FOLLOW",
		2: "ACTION_UNFOLLOW",
	}
	FollowUserRequest_Action_value = map[string]int32{
		"ACTION_UNSPECIFIED": 0,
		"ACTION_FOLLOW":      1,
		"ACTION_UNFOLLOW":    2,
	}
)

Enum value maps for FollowUserRequest_Action.

View Source
var File_v1_relation_proto protoreflect.FileDescriptor
View Source
var RelationService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "relation.sdk.v1.RelationService",
	HandlerType: (*RelationServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "FollowUser",
			Handler:    _RelationService_FollowUser_Handler,
		},
		{
			MethodName: "GetUserFanList",
			Handler:    _RelationService_GetUserFanList_Handler,
		},
		{
			MethodName: "GetUserFollowingList",
			Handler:    _RelationService_GetUserFollowingList_Handler,
		},
		{
			MethodName: "RemoveUserFan",
			Handler:    _RelationService_RemoveUserFan_Handler,
		},
		{
			MethodName: "GetUserFanCount",
			Handler:    _RelationService_GetUserFanCount_Handler,
		},
		{
			MethodName: "GetUserFollowingCount",
			Handler:    _RelationService_GetUserFollowingCount_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "v1/relation.proto",
}

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

Functions

func RegisterRelationServiceServer

func RegisterRelationServiceServer(s grpc.ServiceRegistrar, srv RelationServiceServer)

Types

type FollowUserRequest

type FollowUserRequest struct {
	Follower uint64                   `protobuf:"varint,1,opt,name=follower,proto3" json:"follower,omitempty"` // 关注者
	Followee uint64                   `protobuf:"varint,2,opt,name=followee,proto3" json:"followee,omitempty"` // 被关注者
	Action   FollowUserRequest_Action `protobuf:"varint,3,opt,name=action,proto3,enum=relation.sdk.v1.FollowUserRequest_Action" json:"action,omitempty"`
	// contains filtered or unexported fields
}

func (*FollowUserRequest) Descriptor deprecated

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

Deprecated: Use FollowUserRequest.ProtoReflect.Descriptor instead.

func (*FollowUserRequest) GetAction

func (*FollowUserRequest) GetFollowee

func (x *FollowUserRequest) GetFollowee() uint64

func (*FollowUserRequest) GetFollower

func (x *FollowUserRequest) GetFollower() uint64

func (*FollowUserRequest) ProtoMessage

func (*FollowUserRequest) ProtoMessage()

func (*FollowUserRequest) ProtoReflect

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

func (*FollowUserRequest) Reset

func (x *FollowUserRequest) Reset()

func (*FollowUserRequest) String

func (x *FollowUserRequest) String() string

type FollowUserRequest_Action

type FollowUserRequest_Action int32
const (
	FollowUserRequest_ACTION_UNSPECIFIED FollowUserRequest_Action = 0
	FollowUserRequest_ACTION_FOLLOW      FollowUserRequest_Action = 1 // follower发起关注followee
	FollowUserRequest_ACTION_UNFOLLOW    FollowUserRequest_Action = 2 // follower取消对followee的关注
)

func (FollowUserRequest_Action) Descriptor

func (FollowUserRequest_Action) Enum

func (FollowUserRequest_Action) EnumDescriptor deprecated

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

Deprecated: Use FollowUserRequest_Action.Descriptor instead.

func (FollowUserRequest_Action) Number

func (FollowUserRequest_Action) String

func (x FollowUserRequest_Action) String() string

func (FollowUserRequest_Action) Type

type FollowUserResponse

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

func (*FollowUserResponse) Descriptor deprecated

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

Deprecated: Use FollowUserResponse.ProtoReflect.Descriptor instead.

func (*FollowUserResponse) ProtoMessage

func (*FollowUserResponse) ProtoMessage()

func (*FollowUserResponse) ProtoReflect

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

func (*FollowUserResponse) Reset

func (x *FollowUserResponse) Reset()

func (*FollowUserResponse) String

func (x *FollowUserResponse) String() string

type GetUserFanCountRequest

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

func (*GetUserFanCountRequest) Descriptor deprecated

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

Deprecated: Use GetUserFanCountRequest.ProtoReflect.Descriptor instead.

func (*GetUserFanCountRequest) GetUid

func (x *GetUserFanCountRequest) GetUid() uint64

func (*GetUserFanCountRequest) ProtoMessage

func (*GetUserFanCountRequest) ProtoMessage()

func (*GetUserFanCountRequest) ProtoReflect

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

func (*GetUserFanCountRequest) Reset

func (x *GetUserFanCountRequest) Reset()

func (*GetUserFanCountRequest) String

func (x *GetUserFanCountRequest) String() string

type GetUserFanCountResponse

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

func (*GetUserFanCountResponse) Descriptor deprecated

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

Deprecated: Use GetUserFanCountResponse.ProtoReflect.Descriptor instead.

func (*GetUserFanCountResponse) GetCount

func (x *GetUserFanCountResponse) GetCount() uint64

func (*GetUserFanCountResponse) ProtoMessage

func (*GetUserFanCountResponse) ProtoMessage()

func (*GetUserFanCountResponse) ProtoReflect

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

func (*GetUserFanCountResponse) Reset

func (x *GetUserFanCountResponse) Reset()

func (*GetUserFanCountResponse) String

func (x *GetUserFanCountResponse) String() string

type GetUserFanListRequest

type GetUserFanListRequest struct {
	Uid  uint64          `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` // 目标uid
	Cond *QueryCondition `protobuf:"bytes,2,opt,name=cond,proto3" json:"cond,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserFanListRequest) Descriptor deprecated

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

Deprecated: Use GetUserFanListRequest.ProtoReflect.Descriptor instead.

func (*GetUserFanListRequest) GetCond

func (x *GetUserFanListRequest) GetCond() *QueryCondition

func (*GetUserFanListRequest) GetUid

func (x *GetUserFanListRequest) GetUid() uint64

func (*GetUserFanListRequest) ProtoMessage

func (*GetUserFanListRequest) ProtoMessage()

func (*GetUserFanListRequest) ProtoReflect

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

func (*GetUserFanListRequest) Reset

func (x *GetUserFanListRequest) Reset()

func (*GetUserFanListRequest) String

func (x *GetUserFanListRequest) String() string

type GetUserFanListResponse

type GetUserFanListResponse struct {
	Fans       []uint64 `protobuf:"varint,1,rep,packed,name=fans,proto3" json:"fans,omitempty"`
	NextOffset uint64   `protobuf:"varint,2,opt,name=next_offset,json=nextOffset,proto3" json:"next_offset,omitempty"`
	HasMore    bool     `protobuf:"varint,3,opt,name=has_more,json=hasMore,proto3" json:"has_more,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserFanListResponse) Descriptor deprecated

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

Deprecated: Use GetUserFanListResponse.ProtoReflect.Descriptor instead.

func (*GetUserFanListResponse) GetFans

func (x *GetUserFanListResponse) GetFans() []uint64

func (*GetUserFanListResponse) GetHasMore

func (x *GetUserFanListResponse) GetHasMore() bool

func (*GetUserFanListResponse) GetNextOffset

func (x *GetUserFanListResponse) GetNextOffset() uint64

func (*GetUserFanListResponse) ProtoMessage

func (*GetUserFanListResponse) ProtoMessage()

func (*GetUserFanListResponse) ProtoReflect

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

func (*GetUserFanListResponse) Reset

func (x *GetUserFanListResponse) Reset()

func (*GetUserFanListResponse) String

func (x *GetUserFanListResponse) String() string

type GetUserFollowingCountRequest

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

func (*GetUserFollowingCountRequest) Descriptor deprecated

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

Deprecated: Use GetUserFollowingCountRequest.ProtoReflect.Descriptor instead.

func (*GetUserFollowingCountRequest) GetUid

func (*GetUserFollowingCountRequest) ProtoMessage

func (*GetUserFollowingCountRequest) ProtoMessage()

func (*GetUserFollowingCountRequest) ProtoReflect

func (*GetUserFollowingCountRequest) Reset

func (x *GetUserFollowingCountRequest) Reset()

func (*GetUserFollowingCountRequest) String

type GetUserFollowingCountResponse

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

func (*GetUserFollowingCountResponse) Descriptor deprecated

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

Deprecated: Use GetUserFollowingCountResponse.ProtoReflect.Descriptor instead.

func (*GetUserFollowingCountResponse) GetCount

func (x *GetUserFollowingCountResponse) GetCount() uint64

func (*GetUserFollowingCountResponse) ProtoMessage

func (*GetUserFollowingCountResponse) ProtoMessage()

func (*GetUserFollowingCountResponse) ProtoReflect

func (*GetUserFollowingCountResponse) Reset

func (x *GetUserFollowingCountResponse) Reset()

func (*GetUserFollowingCountResponse) String

type GetUserFollowingListRequest

type GetUserFollowingListRequest struct {
	Uid  uint64          `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` // 目标uid
	Cond *QueryCondition `protobuf:"bytes,2,opt,name=cond,proto3" json:"cond,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserFollowingListRequest) Descriptor deprecated

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

Deprecated: Use GetUserFollowingListRequest.ProtoReflect.Descriptor instead.

func (*GetUserFollowingListRequest) GetCond

func (*GetUserFollowingListRequest) GetUid

func (x *GetUserFollowingListRequest) GetUid() uint64

func (*GetUserFollowingListRequest) ProtoMessage

func (*GetUserFollowingListRequest) ProtoMessage()

func (*GetUserFollowingListRequest) ProtoReflect

func (*GetUserFollowingListRequest) Reset

func (x *GetUserFollowingListRequest) Reset()

func (*GetUserFollowingListRequest) String

func (x *GetUserFollowingListRequest) String() string

type GetUserFollowingListResponse

type GetUserFollowingListResponse struct {
	Followings []uint64 `protobuf:"varint,1,rep,packed,name=followings,proto3" json:"followings,omitempty"`
	NextOffset uint64   `protobuf:"varint,2,opt,name=next_offset,json=nextOffset,proto3" json:"next_offset,omitempty"`
	HasMore    bool     `protobuf:"varint,3,opt,name=has_more,json=hasMore,proto3" json:"has_more,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserFollowingListResponse) Descriptor deprecated

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

Deprecated: Use GetUserFollowingListResponse.ProtoReflect.Descriptor instead.

func (*GetUserFollowingListResponse) GetFollowings

func (x *GetUserFollowingListResponse) GetFollowings() []uint64

func (*GetUserFollowingListResponse) GetHasMore

func (x *GetUserFollowingListResponse) GetHasMore() bool

func (*GetUserFollowingListResponse) GetNextOffset

func (x *GetUserFollowingListResponse) GetNextOffset() uint64

func (*GetUserFollowingListResponse) ProtoMessage

func (*GetUserFollowingListResponse) ProtoMessage()

func (*GetUserFollowingListResponse) ProtoReflect

func (*GetUserFollowingListResponse) Reset

func (x *GetUserFollowingListResponse) Reset()

func (*GetUserFollowingListResponse) String

type QueryCondition

type QueryCondition struct {
	Offset uint64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`
	Count  int32  `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryCondition) Descriptor deprecated

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

Deprecated: Use QueryCondition.ProtoReflect.Descriptor instead.

func (*QueryCondition) GetCount

func (x *QueryCondition) GetCount() int32

func (*QueryCondition) GetOffset

func (x *QueryCondition) GetOffset() uint64

func (*QueryCondition) ProtoMessage

func (*QueryCondition) ProtoMessage()

func (*QueryCondition) ProtoReflect

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

func (*QueryCondition) Reset

func (x *QueryCondition) Reset()

func (*QueryCondition) String

func (x *QueryCondition) String() string

type RelationServiceClient

type RelationServiceClient interface {
	// 关注/取消关注某个用户
	FollowUser(ctx context.Context, in *FollowUserRequest, opts ...grpc.CallOption) (*FollowUserResponse, error)
	// 获取某个用户的粉丝列表
	GetUserFanList(ctx context.Context, in *GetUserFanListRequest, opts ...grpc.CallOption) (*GetUserFanListResponse, error)
	// 获取某个用户的关注列表
	GetUserFollowingList(ctx context.Context, in *GetUserFollowingListRequest, opts ...grpc.CallOption) (*GetUserFollowingListResponse, error)
	// 移除某个用户的粉丝
	RemoveUserFan(ctx context.Context, in *RemoveUserFanRequest, opts ...grpc.CallOption) (*RemoveUserFanResponse, error)
	// 获取用户的粉丝数量
	GetUserFanCount(ctx context.Context, in *GetUserFanCountRequest, opts ...grpc.CallOption) (*GetUserFanCountResponse, error)
	// 获取用户的关注数量
	GetUserFollowingCount(ctx context.Context, in *GetUserFollowingCountRequest, opts ...grpc.CallOption) (*GetUserFollowingCountResponse, error)
}

RelationServiceClient is the client API for RelationService 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 RelationServiceServer

type RelationServiceServer interface {
	// 关注/取消关注某个用户
	FollowUser(context.Context, *FollowUserRequest) (*FollowUserResponse, error)
	// 获取某个用户的粉丝列表
	GetUserFanList(context.Context, *GetUserFanListRequest) (*GetUserFanListResponse, error)
	// 获取某个用户的关注列表
	GetUserFollowingList(context.Context, *GetUserFollowingListRequest) (*GetUserFollowingListResponse, error)
	// 移除某个用户的粉丝
	RemoveUserFan(context.Context, *RemoveUserFanRequest) (*RemoveUserFanResponse, error)
	// 获取用户的粉丝数量
	GetUserFanCount(context.Context, *GetUserFanCountRequest) (*GetUserFanCountResponse, error)
	// 获取用户的关注数量
	GetUserFollowingCount(context.Context, *GetUserFollowingCountRequest) (*GetUserFollowingCountResponse, error)
	// contains filtered or unexported methods
}

RelationServiceServer is the server API for RelationService service. All implementations must embed UnimplementedRelationServiceServer for forward compatibility.

type RemoveUserFanRequest

type RemoveUserFanRequest struct {
	Uid    uint64   `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"`                            // 目标uid
	FansId []uint64 `protobuf:"varint,2,rep,packed,name=fans_id,json=fansId,proto3" json:"fans_id,omitempty"` // 需要移除的粉丝id
	// contains filtered or unexported fields
}

func (*RemoveUserFanRequest) Descriptor deprecated

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

Deprecated: Use RemoveUserFanRequest.ProtoReflect.Descriptor instead.

func (*RemoveUserFanRequest) GetFansId

func (x *RemoveUserFanRequest) GetFansId() []uint64

func (*RemoveUserFanRequest) GetUid

func (x *RemoveUserFanRequest) GetUid() uint64

func (*RemoveUserFanRequest) ProtoMessage

func (*RemoveUserFanRequest) ProtoMessage()

func (*RemoveUserFanRequest) ProtoReflect

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

func (*RemoveUserFanRequest) Reset

func (x *RemoveUserFanRequest) Reset()

func (*RemoveUserFanRequest) String

func (x *RemoveUserFanRequest) String() string

type RemoveUserFanResponse

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

func (*RemoveUserFanResponse) Descriptor deprecated

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

Deprecated: Use RemoveUserFanResponse.ProtoReflect.Descriptor instead.

func (*RemoveUserFanResponse) ProtoMessage

func (*RemoveUserFanResponse) ProtoMessage()

func (*RemoveUserFanResponse) ProtoReflect

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

func (*RemoveUserFanResponse) Reset

func (x *RemoveUserFanResponse) Reset()

func (*RemoveUserFanResponse) String

func (x *RemoveUserFanResponse) String() string

type UnimplementedRelationServiceServer

type UnimplementedRelationServiceServer struct{}

UnimplementedRelationServiceServer 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 (UnimplementedRelationServiceServer) FollowUser

func (UnimplementedRelationServiceServer) GetUserFanCount

func (UnimplementedRelationServiceServer) GetUserFanList

func (UnimplementedRelationServiceServer) RemoveUserFan

type UnsafeRelationServiceServer

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

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

Jump to

Keyboard shortcuts

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