pb

package
v0.0.0-...-04961f1 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Follow_Follow_FullMethodName     = "/pb.Follow/Follow"
	Follow_UnFollow_FullMethodName   = "/pb.Follow/UnFollow"
	Follow_FollowList_FullMethodName = "/pb.Follow/FollowList"
	Follow_FansList_FullMethodName   = "/pb.Follow/FansList"
)

Variables

View Source
var File_follow_proto protoreflect.FileDescriptor
View Source
var Follow_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pb.Follow",
	HandlerType: (*FollowServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Follow",
			Handler:    _Follow_Follow_Handler,
		},
		{
			MethodName: "UnFollow",
			Handler:    _Follow_UnFollow_Handler,
		},
		{
			MethodName: "FollowList",
			Handler:    _Follow_FollowList_Handler,
		},
		{
			MethodName: "FansList",
			Handler:    _Follow_FansList_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "follow.proto",
}

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

Functions

func RegisterFollowServer

func RegisterFollowServer(s grpc.ServiceRegistrar, srv FollowServer)

Types

type FansItem

type FansItem struct {
	UserId      int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"`
	FansUserId  int64 `protobuf:"varint,2,opt,name=fansUserId,proto3" json:"fansUserId,omitempty"`
	FollowCount int64 `protobuf:"varint,3,opt,name=followCount,proto3" json:"followCount,omitempty"`
	FansCount   int64 `protobuf:"varint,4,opt,name=fansCount,proto3" json:"fansCount,omitempty"`
	CreateTime  int64 `protobuf:"varint,5,opt,name=createTime,proto3" json:"createTime,omitempty"`
	// contains filtered or unexported fields
}

func (*FansItem) Descriptor deprecated

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

Deprecated: Use FansItem.ProtoReflect.Descriptor instead.

func (*FansItem) GetCreateTime

func (x *FansItem) GetCreateTime() int64

func (*FansItem) GetFansCount

func (x *FansItem) GetFansCount() int64

func (*FansItem) GetFansUserId

func (x *FansItem) GetFansUserId() int64

func (*FansItem) GetFollowCount

func (x *FansItem) GetFollowCount() int64

func (*FansItem) GetUserId

func (x *FansItem) GetUserId() int64

func (*FansItem) ProtoMessage

func (*FansItem) ProtoMessage()

func (*FansItem) ProtoReflect

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

func (*FansItem) Reset

func (x *FansItem) Reset()

func (*FansItem) String

func (x *FansItem) String() string

type FansListRequest

type FansListRequest struct {
	UserId   int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"`
	Cursor   int64 `protobuf:"varint,2,opt,name=cursor,proto3" json:"cursor,omitempty"`
	PageSize int64 `protobuf:"varint,3,opt,name=pageSize,proto3" json:"pageSize,omitempty"`
	Id       int64 `protobuf:"varint,4,opt,name=Id,proto3" json:"Id,omitempty"`
	// contains filtered or unexported fields
}

func (*FansListRequest) Descriptor deprecated

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

Deprecated: Use FansListRequest.ProtoReflect.Descriptor instead.

func (*FansListRequest) GetCursor

func (x *FansListRequest) GetCursor() int64

func (*FansListRequest) GetId

func (x *FansListRequest) GetId() int64

func (*FansListRequest) GetPageSize

func (x *FansListRequest) GetPageSize() int64

func (*FansListRequest) GetUserId

func (x *FansListRequest) GetUserId() int64

func (*FansListRequest) ProtoMessage

func (*FansListRequest) ProtoMessage()

func (*FansListRequest) ProtoReflect

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

func (*FansListRequest) Reset

func (x *FansListRequest) Reset()

func (*FansListRequest) String

func (x *FansListRequest) String() string

type FansListResponse

type FansListResponse struct {
	Items  []*FansItem `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	Cursor int64       `protobuf:"varint,2,opt,name=cursor,proto3" json:"cursor,omitempty"`
	IsEnd  bool        `protobuf:"varint,3,opt,name=isEnd,proto3" json:"isEnd,omitempty"`
	Id     int64       `protobuf:"varint,4,opt,name=Id,proto3" json:"Id,omitempty"`
	// contains filtered or unexported fields
}

func (*FansListResponse) Descriptor deprecated

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

Deprecated: Use FansListResponse.ProtoReflect.Descriptor instead.

func (*FansListResponse) GetCursor

func (x *FansListResponse) GetCursor() int64

func (*FansListResponse) GetId

func (x *FansListResponse) GetId() int64

func (*FansListResponse) GetIsEnd

func (x *FansListResponse) GetIsEnd() bool

func (*FansListResponse) GetItems

func (x *FansListResponse) GetItems() []*FansItem

func (*FansListResponse) ProtoMessage

func (*FansListResponse) ProtoMessage()

func (*FansListResponse) ProtoReflect

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

func (*FansListResponse) Reset

func (x *FansListResponse) Reset()

func (*FansListResponse) String

func (x *FansListResponse) String() string

type FollowClient

type FollowClient interface {
	// 关注
	Follow(ctx context.Context, in *FollowRequest, opts ...grpc.CallOption) (*FollowResponse, error)
	// 取消关注
	UnFollow(ctx context.Context, in *UnFollowRequest, opts ...grpc.CallOption) (*UnFollowResponse, error)
	// 关注列表
	FollowList(ctx context.Context, in *FollowListRequest, opts ...grpc.CallOption) (*FollowListResponse, error)
	// 粉丝列表
	FansList(ctx context.Context, in *FansListRequest, opts ...grpc.CallOption) (*FansListResponse, error)
}

FollowClient is the client API for Follow 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 NewFollowClient

func NewFollowClient(cc grpc.ClientConnInterface) FollowClient

type FollowItem

type FollowItem struct {
	Id             int64 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"`
	FollowedUserId int64 `protobuf:"varint,2,opt,name=followedUserId,proto3" json:"followedUserId,omitempty"` // 被关注者
	FansCount      int64 `protobuf:"varint,3,opt,name=fansCount,proto3" json:"fansCount,omitempty"`           // 粉丝数
	CreateTime     int64 `protobuf:"varint,4,opt,name=createTime,proto3" json:"createTime,omitempty"`         // 关注时间
	// contains filtered or unexported fields
}

func (*FollowItem) Descriptor deprecated

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

Deprecated: Use FollowItem.ProtoReflect.Descriptor instead.

func (*FollowItem) GetCreateTime

func (x *FollowItem) GetCreateTime() int64

func (*FollowItem) GetFansCount

func (x *FollowItem) GetFansCount() int64

func (*FollowItem) GetFollowedUserId

func (x *FollowItem) GetFollowedUserId() int64

func (*FollowItem) GetId

func (x *FollowItem) GetId() int64

func (*FollowItem) ProtoMessage

func (*FollowItem) ProtoMessage()

func (*FollowItem) ProtoReflect

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

func (*FollowItem) Reset

func (x *FollowItem) Reset()

func (*FollowItem) String

func (x *FollowItem) String() string

type FollowListRequest

type FollowListRequest struct {
	Id       int64 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"`
	UserId   int64 `protobuf:"varint,2,opt,name=userId,proto3" json:"userId,omitempty"`
	Cursor   int64 `protobuf:"varint,3,opt,name=cursor,proto3" json:"cursor,omitempty"`
	PageSize int64 `protobuf:"varint,4,opt,name=pageSize,proto3" json:"pageSize,omitempty"`
	// contains filtered or unexported fields
}

func (*FollowListRequest) Descriptor deprecated

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

Deprecated: Use FollowListRequest.ProtoReflect.Descriptor instead.

func (*FollowListRequest) GetCursor

func (x *FollowListRequest) GetCursor() int64

func (*FollowListRequest) GetId

func (x *FollowListRequest) GetId() int64

func (*FollowListRequest) GetPageSize

func (x *FollowListRequest) GetPageSize() int64

func (*FollowListRequest) GetUserId

func (x *FollowListRequest) GetUserId() int64

func (*FollowListRequest) ProtoMessage

func (*FollowListRequest) ProtoMessage()

func (*FollowListRequest) ProtoReflect

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

func (*FollowListRequest) Reset

func (x *FollowListRequest) Reset()

func (*FollowListRequest) String

func (x *FollowListRequest) String() string

type FollowListResponse

type FollowListResponse struct {
	Items  []*FollowItem `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	Cursor int64         `protobuf:"varint,2,opt,name=cursor,proto3" json:"cursor,omitempty"`
	IsEnd  bool          `protobuf:"varint,3,opt,name=isEnd,proto3" json:"isEnd,omitempty"`
	Id     int64         `protobuf:"varint,4,opt,name=Id,proto3" json:"Id,omitempty"`
	// contains filtered or unexported fields
}

func (*FollowListResponse) Descriptor deprecated

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

Deprecated: Use FollowListResponse.ProtoReflect.Descriptor instead.

func (*FollowListResponse) GetCursor

func (x *FollowListResponse) GetCursor() int64

func (*FollowListResponse) GetId

func (x *FollowListResponse) GetId() int64

func (*FollowListResponse) GetIsEnd

func (x *FollowListResponse) GetIsEnd() bool

func (*FollowListResponse) GetItems

func (x *FollowListResponse) GetItems() []*FollowItem

func (*FollowListResponse) ProtoMessage

func (*FollowListResponse) ProtoMessage()

func (*FollowListResponse) ProtoReflect

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

func (*FollowListResponse) Reset

func (x *FollowListResponse) Reset()

func (*FollowListResponse) String

func (x *FollowListResponse) String() string

type FollowRequest

type FollowRequest struct {
	UserId         int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"`                 // 关注者
	FollowedUserId int64 `protobuf:"varint,2,opt,name=followedUserId,proto3" json:"followedUserId,omitempty"` // 被关注者
	// contains filtered or unexported fields
}

func (*FollowRequest) Descriptor deprecated

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

Deprecated: Use FollowRequest.ProtoReflect.Descriptor instead.

func (*FollowRequest) GetFollowedUserId

func (x *FollowRequest) GetFollowedUserId() int64

func (*FollowRequest) GetUserId

func (x *FollowRequest) GetUserId() int64

func (*FollowRequest) ProtoMessage

func (*FollowRequest) ProtoMessage()

func (*FollowRequest) ProtoReflect

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

func (*FollowRequest) Reset

func (x *FollowRequest) Reset()

func (*FollowRequest) String

func (x *FollowRequest) String() string

type FollowResponse

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

func (*FollowResponse) Descriptor deprecated

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

Deprecated: Use FollowResponse.ProtoReflect.Descriptor instead.

func (*FollowResponse) ProtoMessage

func (*FollowResponse) ProtoMessage()

func (*FollowResponse) ProtoReflect

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

func (*FollowResponse) Reset

func (x *FollowResponse) Reset()

func (*FollowResponse) String

func (x *FollowResponse) String() string

type FollowServer

type FollowServer interface {
	// 关注
	Follow(context.Context, *FollowRequest) (*FollowResponse, error)
	// 取消关注
	UnFollow(context.Context, *UnFollowRequest) (*UnFollowResponse, error)
	// 关注列表
	FollowList(context.Context, *FollowListRequest) (*FollowListResponse, error)
	// 粉丝列表
	FansList(context.Context, *FansListRequest) (*FansListResponse, error)
	// contains filtered or unexported methods
}

FollowServer is the server API for Follow service. All implementations must embed UnimplementedFollowServer for forward compatibility

type UnFollowRequest

type UnFollowRequest struct {
	UserId         int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"`
	FollowedUserId int64 `protobuf:"varint,2,opt,name=followedUserId,proto3" json:"followedUserId,omitempty"`
	// contains filtered or unexported fields
}

func (*UnFollowRequest) Descriptor deprecated

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

Deprecated: Use UnFollowRequest.ProtoReflect.Descriptor instead.

func (*UnFollowRequest) GetFollowedUserId

func (x *UnFollowRequest) GetFollowedUserId() int64

func (*UnFollowRequest) GetUserId

func (x *UnFollowRequest) GetUserId() int64

func (*UnFollowRequest) ProtoMessage

func (*UnFollowRequest) ProtoMessage()

func (*UnFollowRequest) ProtoReflect

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

func (*UnFollowRequest) Reset

func (x *UnFollowRequest) Reset()

func (*UnFollowRequest) String

func (x *UnFollowRequest) String() string

type UnFollowResponse

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

func (*UnFollowResponse) Descriptor deprecated

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

Deprecated: Use UnFollowResponse.ProtoReflect.Descriptor instead.

func (*UnFollowResponse) ProtoMessage

func (*UnFollowResponse) ProtoMessage()

func (*UnFollowResponse) ProtoReflect

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

func (*UnFollowResponse) Reset

func (x *UnFollowResponse) Reset()

func (*UnFollowResponse) String

func (x *UnFollowResponse) String() string

type UnimplementedFollowServer

type UnimplementedFollowServer struct {
}

UnimplementedFollowServer must be embedded to have forward compatible implementations.

func (UnimplementedFollowServer) FansList

func (UnimplementedFollowServer) Follow

func (UnimplementedFollowServer) FollowList

func (UnimplementedFollowServer) UnFollow

type UnsafeFollowServer

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

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

Jump to

Keyboard shortcuts

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