Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterFriendRpcServer(s grpc.ServiceRegistrar, srv FriendRpcServer)
- type BatchResp
- type EmptyReq
- type EmptyResp
- type FindFriendListReq
- func (*FindFriendListReq) Descriptor() ([]byte, []int)deprecated
- func (x *FindFriendListReq) GetLinkName() string
- func (x *FindFriendListReq) GetPage() int64
- func (x *FindFriendListReq) GetPageSize() int64
- func (x *FindFriendListReq) GetSorts() []string
- func (*FindFriendListReq) ProtoMessage()
- func (x *FindFriendListReq) ProtoReflect() protoreflect.Message
- func (x *FindFriendListReq) Reset()
- func (x *FindFriendListReq) String() string
- type FindFriendListResp
- func (*FindFriendListResp) Descriptor() ([]byte, []int)deprecated
- func (x *FindFriendListResp) GetList() []*FriendDetails
- func (x *FindFriendListResp) GetTotal() int64
- func (*FindFriendListResp) ProtoMessage()
- func (x *FindFriendListResp) ProtoReflect() protoreflect.Message
- func (x *FindFriendListResp) Reset()
- func (x *FindFriendListResp) String() string
- type FriendDetails
- func (*FriendDetails) Descriptor() ([]byte, []int)deprecated
- func (x *FriendDetails) GetCreatedAt() int64
- func (x *FriendDetails) GetId() int64
- func (x *FriendDetails) GetLinkAddress() string
- func (x *FriendDetails) GetLinkAvatar() string
- func (x *FriendDetails) GetLinkIntro() string
- func (x *FriendDetails) GetLinkName() string
- func (x *FriendDetails) GetUpdatedAt() int64
- func (*FriendDetails) ProtoMessage()
- func (x *FriendDetails) ProtoReflect() protoreflect.Message
- func (x *FriendDetails) Reset()
- func (x *FriendDetails) String() string
- type FriendNewReq
- func (*FriendNewReq) Descriptor() ([]byte, []int)deprecated
- func (x *FriendNewReq) GetId() int64
- func (x *FriendNewReq) GetLinkAddress() string
- func (x *FriendNewReq) GetLinkAvatar() string
- func (x *FriendNewReq) GetLinkIntro() string
- func (x *FriendNewReq) GetLinkName() string
- func (*FriendNewReq) ProtoMessage()
- func (x *FriendNewReq) ProtoReflect() protoreflect.Message
- func (x *FriendNewReq) Reset()
- func (x *FriendNewReq) String() string
- type FriendRpcClient
- type FriendRpcServer
- type IdReq
- type IdsReq
- type UnimplementedFriendRpcServer
- func (UnimplementedFriendRpcServer) AddFriend(context.Context, *FriendNewReq) (*FriendDetails, error)
- func (UnimplementedFriendRpcServer) DeleteFriend(context.Context, *IdsReq) (*BatchResp, error)
- func (UnimplementedFriendRpcServer) FindFriendList(context.Context, *FindFriendListReq) (*FindFriendListResp, error)
- func (UnimplementedFriendRpcServer) UpdateFriend(context.Context, *FriendNewReq) (*FriendDetails, error)
- type UnsafeFriendRpcServer
- type UserIdReq
Constants ¶
const ( FriendRpc_AddFriend_FullMethodName = "/friendrpc.FriendRpc/AddFriend" FriendRpc_UpdateFriend_FullMethodName = "/friendrpc.FriendRpc/UpdateFriend" FriendRpc_DeleteFriend_FullMethodName = "/friendrpc.FriendRpc/DeleteFriend" FriendRpc_FindFriendList_FullMethodName = "/friendrpc.FriendRpc/FindFriendList" )
Variables ¶
var File_friend_proto protoreflect.FileDescriptor
var FriendRpc_ServiceDesc = grpc.ServiceDesc{ ServiceName: "friendrpc.FriendRpc", HandlerType: (*FriendRpcServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "AddFriend", Handler: _FriendRpc_AddFriend_Handler, }, { MethodName: "UpdateFriend", Handler: _FriendRpc_UpdateFriend_Handler, }, { MethodName: "DeleteFriend", Handler: _FriendRpc_DeleteFriend_Handler, }, { MethodName: "FindFriendList", Handler: _FriendRpc_FindFriendList_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "friend.proto", }
FriendRpc_ServiceDesc is the grpc.ServiceDesc for FriendRpc service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterFriendRpcServer ¶
func RegisterFriendRpcServer(s grpc.ServiceRegistrar, srv FriendRpcServer)
Types ¶
type BatchResp ¶
type BatchResp struct { SuccessCount int64 `protobuf:"varint,1,opt,name=success_count,json=successCount,proto3" json:"success_count,omitempty"` // contains filtered or unexported fields }
func (*BatchResp) Descriptor
deprecated
func (*BatchResp) GetSuccessCount ¶
func (*BatchResp) ProtoMessage ¶
func (*BatchResp) ProtoMessage()
func (*BatchResp) ProtoReflect ¶
func (x *BatchResp) ProtoReflect() protoreflect.Message
type EmptyReq ¶
type EmptyReq struct {
// contains filtered or unexported fields
}
func (*EmptyReq) Descriptor
deprecated
func (*EmptyReq) ProtoMessage ¶
func (*EmptyReq) ProtoMessage()
func (*EmptyReq) ProtoReflect ¶
func (x *EmptyReq) ProtoReflect() protoreflect.Message
type EmptyResp ¶
type EmptyResp struct {
// contains filtered or unexported fields
}
func (*EmptyResp) Descriptor
deprecated
func (*EmptyResp) ProtoMessage ¶
func (*EmptyResp) ProtoMessage()
func (*EmptyResp) ProtoReflect ¶
func (x *EmptyResp) ProtoReflect() protoreflect.Message
type FindFriendListReq ¶
type FindFriendListReq struct { Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` Sorts []string `protobuf:"bytes,3,rep,name=sorts,proto3" json:"sorts,omitempty"` // 排序 LinkName string `protobuf:"bytes,4,opt,name=link_name,json=linkName,proto3" json:"link_name,omitempty"` // 链接名 // contains filtered or unexported fields }
func (*FindFriendListReq) Descriptor
deprecated
func (*FindFriendListReq) Descriptor() ([]byte, []int)
Deprecated: Use FindFriendListReq.ProtoReflect.Descriptor instead.
func (*FindFriendListReq) GetLinkName ¶
func (x *FindFriendListReq) GetLinkName() string
func (*FindFriendListReq) GetPage ¶
func (x *FindFriendListReq) GetPage() int64
func (*FindFriendListReq) GetPageSize ¶
func (x *FindFriendListReq) GetPageSize() int64
func (*FindFriendListReq) GetSorts ¶
func (x *FindFriendListReq) GetSorts() []string
func (*FindFriendListReq) ProtoMessage ¶
func (*FindFriendListReq) ProtoMessage()
func (*FindFriendListReq) ProtoReflect ¶
func (x *FindFriendListReq) ProtoReflect() protoreflect.Message
func (*FindFriendListReq) Reset ¶
func (x *FindFriendListReq) Reset()
func (*FindFriendListReq) String ¶
func (x *FindFriendListReq) String() string
type FindFriendListResp ¶
type FindFriendListResp struct { List []*FriendDetails `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"` Total int64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` // contains filtered or unexported fields }
func (*FindFriendListResp) Descriptor
deprecated
func (*FindFriendListResp) Descriptor() ([]byte, []int)
Deprecated: Use FindFriendListResp.ProtoReflect.Descriptor instead.
func (*FindFriendListResp) GetList ¶
func (x *FindFriendListResp) GetList() []*FriendDetails
func (*FindFriendListResp) GetTotal ¶
func (x *FindFriendListResp) GetTotal() int64
func (*FindFriendListResp) ProtoMessage ¶
func (*FindFriendListResp) ProtoMessage()
func (*FindFriendListResp) ProtoReflect ¶
func (x *FindFriendListResp) ProtoReflect() protoreflect.Message
func (*FindFriendListResp) Reset ¶
func (x *FindFriendListResp) Reset()
func (*FindFriendListResp) String ¶
func (x *FindFriendListResp) String() string
type FriendDetails ¶
type FriendDetails struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // id LinkName string `protobuf:"bytes,2,opt,name=link_name,json=linkName,proto3" json:"link_name,omitempty"` // 链接名 LinkAvatar string `protobuf:"bytes,3,opt,name=link_avatar,json=linkAvatar,proto3" json:"link_avatar,omitempty"` // 链接头像 LinkAddress string `protobuf:"bytes,4,opt,name=link_address,json=linkAddress,proto3" json:"link_address,omitempty"` // 链接地址 LinkIntro string `protobuf:"bytes,5,opt,name=link_intro,json=linkIntro,proto3" json:"link_intro,omitempty"` // 链接介绍 CreatedAt int64 `protobuf:"varint,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // 创建时间 UpdatedAt int64 `protobuf:"varint,7,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // 更新时间 // contains filtered or unexported fields }
func (*FriendDetails) Descriptor
deprecated
func (*FriendDetails) Descriptor() ([]byte, []int)
Deprecated: Use FriendDetails.ProtoReflect.Descriptor instead.
func (*FriendDetails) GetCreatedAt ¶
func (x *FriendDetails) GetCreatedAt() int64
func (*FriendDetails) GetId ¶
func (x *FriendDetails) GetId() int64
func (*FriendDetails) GetLinkAddress ¶
func (x *FriendDetails) GetLinkAddress() string
func (*FriendDetails) GetLinkAvatar ¶
func (x *FriendDetails) GetLinkAvatar() string
func (*FriendDetails) GetLinkIntro ¶
func (x *FriendDetails) GetLinkIntro() string
func (*FriendDetails) GetLinkName ¶
func (x *FriendDetails) GetLinkName() string
func (*FriendDetails) GetUpdatedAt ¶
func (x *FriendDetails) GetUpdatedAt() int64
func (*FriendDetails) ProtoMessage ¶
func (*FriendDetails) ProtoMessage()
func (*FriendDetails) ProtoReflect ¶
func (x *FriendDetails) ProtoReflect() protoreflect.Message
func (*FriendDetails) Reset ¶
func (x *FriendDetails) Reset()
func (*FriendDetails) String ¶
func (x *FriendDetails) String() string
type FriendNewReq ¶
type FriendNewReq struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // id LinkName string `protobuf:"bytes,2,opt,name=link_name,json=linkName,proto3" json:"link_name,omitempty"` // 链接名 LinkAvatar string `protobuf:"bytes,3,opt,name=link_avatar,json=linkAvatar,proto3" json:"link_avatar,omitempty"` // 链接头像 LinkAddress string `protobuf:"bytes,4,opt,name=link_address,json=linkAddress,proto3" json:"link_address,omitempty"` // 链接地址 LinkIntro string `protobuf:"bytes,5,opt,name=link_intro,json=linkIntro,proto3" json:"link_intro,omitempty"` // 链接介绍 // contains filtered or unexported fields }
************* blog 友链管理 *************
func (*FriendNewReq) Descriptor
deprecated
func (*FriendNewReq) Descriptor() ([]byte, []int)
Deprecated: Use FriendNewReq.ProtoReflect.Descriptor instead.
func (*FriendNewReq) GetId ¶
func (x *FriendNewReq) GetId() int64
func (*FriendNewReq) GetLinkAddress ¶
func (x *FriendNewReq) GetLinkAddress() string
func (*FriendNewReq) GetLinkAvatar ¶
func (x *FriendNewReq) GetLinkAvatar() string
func (*FriendNewReq) GetLinkIntro ¶
func (x *FriendNewReq) GetLinkIntro() string
func (*FriendNewReq) GetLinkName ¶
func (x *FriendNewReq) GetLinkName() string
func (*FriendNewReq) ProtoMessage ¶
func (*FriendNewReq) ProtoMessage()
func (*FriendNewReq) ProtoReflect ¶
func (x *FriendNewReq) ProtoReflect() protoreflect.Message
func (*FriendNewReq) Reset ¶
func (x *FriendNewReq) Reset()
func (*FriendNewReq) String ¶
func (x *FriendNewReq) String() string
type FriendRpcClient ¶
type FriendRpcClient interface { // 创建友链 AddFriend(ctx context.Context, in *FriendNewReq, opts ...grpc.CallOption) (*FriendDetails, error) // 更新友链 UpdateFriend(ctx context.Context, in *FriendNewReq, opts ...grpc.CallOption) (*FriendDetails, error) // 删除友链 DeleteFriend(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*BatchResp, error) // 查询友链列表 FindFriendList(ctx context.Context, in *FindFriendListReq, opts ...grpc.CallOption) (*FindFriendListResp, error) }
FriendRpcClient is the client API for FriendRpc 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 NewFriendRpcClient ¶
func NewFriendRpcClient(cc grpc.ClientConnInterface) FriendRpcClient
type FriendRpcServer ¶
type FriendRpcServer interface { // 创建友链 AddFriend(context.Context, *FriendNewReq) (*FriendDetails, error) // 更新友链 UpdateFriend(context.Context, *FriendNewReq) (*FriendDetails, error) // 删除友链 DeleteFriend(context.Context, *IdsReq) (*BatchResp, error) // 查询友链列表 FindFriendList(context.Context, *FindFriendListReq) (*FindFriendListResp, error) // contains filtered or unexported methods }
FriendRpcServer is the server API for FriendRpc service. All implementations must embed UnimplementedFriendRpcServer for forward compatibility
type IdReq ¶
type IdReq struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*IdReq) Descriptor
deprecated
func (*IdReq) ProtoMessage ¶
func (*IdReq) ProtoMessage()
func (*IdReq) ProtoReflect ¶
func (x *IdReq) ProtoReflect() protoreflect.Message
type IdsReq ¶
type IdsReq struct { Ids []int64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"` // contains filtered or unexported fields }
func (*IdsReq) Descriptor
deprecated
func (*IdsReq) ProtoMessage ¶
func (*IdsReq) ProtoMessage()
func (*IdsReq) ProtoReflect ¶
func (x *IdsReq) ProtoReflect() protoreflect.Message
type UnimplementedFriendRpcServer ¶
type UnimplementedFriendRpcServer struct { }
UnimplementedFriendRpcServer must be embedded to have forward compatible implementations.
func (UnimplementedFriendRpcServer) AddFriend ¶
func (UnimplementedFriendRpcServer) AddFriend(context.Context, *FriendNewReq) (*FriendDetails, error)
func (UnimplementedFriendRpcServer) DeleteFriend ¶
func (UnimplementedFriendRpcServer) FindFriendList ¶
func (UnimplementedFriendRpcServer) FindFriendList(context.Context, *FindFriendListReq) (*FindFriendListResp, error)
func (UnimplementedFriendRpcServer) UpdateFriend ¶
func (UnimplementedFriendRpcServer) UpdateFriend(context.Context, *FriendNewReq) (*FriendDetails, error)
type UnsafeFriendRpcServer ¶
type UnsafeFriendRpcServer interface {
// contains filtered or unexported methods
}
UnsafeFriendRpcServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FriendRpcServer will result in compilation errors.
type UserIdReq ¶
type UserIdReq struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*UserIdReq) Descriptor
deprecated
func (*UserIdReq) ProtoMessage ¶
func (*UserIdReq) ProtoMessage()
func (*UserIdReq) ProtoReflect ¶
func (x *UserIdReq) ProtoReflect() protoreflect.Message