friendrpc

package
v0.0.0-...-6d7266f Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
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

View Source
var File_friend_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use BatchResp.ProtoReflect.Descriptor instead.

func (*BatchResp) GetSuccessCount

func (x *BatchResp) GetSuccessCount() int64

func (*BatchResp) ProtoMessage

func (*BatchResp) ProtoMessage()

func (*BatchResp) ProtoReflect

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

func (*BatchResp) Reset

func (x *BatchResp) Reset()

func (*BatchResp) String

func (x *BatchResp) String() string

type EmptyReq

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

func (*EmptyReq) Descriptor deprecated

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

Deprecated: Use EmptyReq.ProtoReflect.Descriptor instead.

func (*EmptyReq) ProtoMessage

func (*EmptyReq) ProtoMessage()

func (*EmptyReq) ProtoReflect

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

func (*EmptyReq) Reset

func (x *EmptyReq) Reset()

func (*EmptyReq) String

func (x *EmptyReq) String() string

type EmptyResp

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

func (*EmptyResp) Descriptor deprecated

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

Deprecated: Use EmptyResp.ProtoReflect.Descriptor instead.

func (*EmptyResp) ProtoMessage

func (*EmptyResp) ProtoMessage()

func (*EmptyResp) ProtoReflect

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

func (*EmptyResp) Reset

func (x *EmptyResp) Reset()

func (*EmptyResp) String

func (x *EmptyResp) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use IdReq.ProtoReflect.Descriptor instead.

func (*IdReq) GetId

func (x *IdReq) GetId() int64

func (*IdReq) ProtoMessage

func (*IdReq) ProtoMessage()

func (*IdReq) ProtoReflect

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

func (*IdReq) Reset

func (x *IdReq) Reset()

func (*IdReq) String

func (x *IdReq) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use IdsReq.ProtoReflect.Descriptor instead.

func (*IdsReq) GetIds

func (x *IdsReq) GetIds() []int64

func (*IdsReq) ProtoMessage

func (*IdsReq) ProtoMessage()

func (*IdsReq) ProtoReflect

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

func (*IdsReq) Reset

func (x *IdsReq) Reset()

func (*IdsReq) String

func (x *IdsReq) String() string

type UnimplementedFriendRpcServer

type UnimplementedFriendRpcServer struct {
}

UnimplementedFriendRpcServer must be embedded to have forward compatible implementations.

func (UnimplementedFriendRpcServer) AddFriend

func (UnimplementedFriendRpcServer) DeleteFriend

func (UnimplementedFriendRpcServer) FindFriendList

func (UnimplementedFriendRpcServer) UpdateFriend

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) Descriptor() ([]byte, []int)

Deprecated: Use UserIdReq.ProtoReflect.Descriptor instead.

func (*UserIdReq) GetUserId

func (x *UserIdReq) GetUserId() string

func (*UserIdReq) ProtoMessage

func (*UserIdReq) ProtoMessage()

func (*UserIdReq) ProtoReflect

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

func (*UserIdReq) Reset

func (x *UserIdReq) Reset()

func (*UserIdReq) String

func (x *UserIdReq) String() string

Jump to

Keyboard shortcuts

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