Documentation ¶
Index ¶
- Variables
- func RegisterFriendsServer(s grpc.ServiceRegistrar, srv FriendsServer)
- type Empty
- type Entity
- type Friend
- type FriendRequest
- func (*FriendRequest) Descriptor() ([]byte, []int)deprecated
- func (x *FriendRequest) GetFriend() *Friend
- func (x *FriendRequest) GetUser() string
- func (*FriendRequest) ProtoMessage()
- func (x *FriendRequest) ProtoReflect() protoreflect.Message
- func (x *FriendRequest) Reset()
- func (x *FriendRequest) String() string
- type FriendsClient
- type FriendsList
- type FriendsServer
- type UnimplementedFriendsServer
- type UnsafeFriendsServer
- type User
Constants ¶
This section is empty.
Variables ¶
var File_friends_proto protoreflect.FileDescriptor
Functions ¶
func RegisterFriendsServer ¶
func RegisterFriendsServer(s grpc.ServiceRegistrar, srv FriendsServer)
Types ¶
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type Entity ¶
type Entity struct {
// contains filtered or unexported fields
}
func (*Entity) HandleCommand ¶
type Friend ¶
type Friend struct { User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` Avatar string `protobuf:"bytes,2,opt,name=avatar,proto3" json:"avatar,omitempty"` // contains filtered or unexported fields }
func (*Friend) Descriptor
deprecated
func (*Friend) ProtoMessage ¶
func (*Friend) ProtoMessage()
func (*Friend) ProtoReflect ¶
func (x *Friend) ProtoReflect() protoreflect.Message
type FriendRequest ¶
type FriendRequest struct { User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` Friend *Friend `protobuf:"bytes,2,opt,name=friend,proto3" json:"friend,omitempty"` // contains filtered or unexported fields }
func (*FriendRequest) Descriptor
deprecated
func (*FriendRequest) Descriptor() ([]byte, []int)
Deprecated: Use FriendRequest.ProtoReflect.Descriptor instead.
func (*FriendRequest) GetFriend ¶
func (x *FriendRequest) GetFriend() *Friend
func (*FriendRequest) GetUser ¶
func (x *FriendRequest) GetUser() string
func (*FriendRequest) ProtoMessage ¶
func (*FriendRequest) ProtoMessage()
func (*FriendRequest) ProtoReflect ¶
func (x *FriendRequest) ProtoReflect() protoreflect.Message
func (*FriendRequest) Reset ¶
func (x *FriendRequest) Reset()
func (*FriendRequest) String ¶
func (x *FriendRequest) String() string
type FriendsClient ¶
type FriendsClient interface { Add(ctx context.Context, in *FriendRequest, opts ...grpc.CallOption) (*Empty, error) Remove(ctx context.Context, in *FriendRequest, opts ...grpc.CallOption) (*Empty, error) GetFriends(ctx context.Context, in *User, opts ...grpc.CallOption) (*FriendsList, error) }
FriendsClient is the client API for Friends 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 NewFriendsClient ¶
func NewFriendsClient(cc grpc.ClientConnInterface) FriendsClient
type FriendsList ¶
type FriendsList struct { Friends []*Friend `protobuf:"bytes,1,rep,name=friends,proto3" json:"friends,omitempty"` // contains filtered or unexported fields }
func (*FriendsList) Descriptor
deprecated
func (*FriendsList) Descriptor() ([]byte, []int)
Deprecated: Use FriendsList.ProtoReflect.Descriptor instead.
func (*FriendsList) GetFriends ¶
func (x *FriendsList) GetFriends() []*Friend
func (*FriendsList) ProtoMessage ¶
func (*FriendsList) ProtoMessage()
func (*FriendsList) ProtoReflect ¶
func (x *FriendsList) ProtoReflect() protoreflect.Message
func (*FriendsList) Reset ¶
func (x *FriendsList) Reset()
func (*FriendsList) String ¶
func (x *FriendsList) String() string
type FriendsServer ¶
type FriendsServer interface { Add(context.Context, *FriendRequest) (*Empty, error) Remove(context.Context, *FriendRequest) (*Empty, error) GetFriends(context.Context, *User) (*FriendsList, error) // contains filtered or unexported methods }
FriendsServer is the server API for Friends service. All implementations must embed UnimplementedFriendsServer for forward compatibility
type UnimplementedFriendsServer ¶
type UnimplementedFriendsServer struct { }
UnimplementedFriendsServer must be embedded to have forward compatible implementations.
func (UnimplementedFriendsServer) Add ¶
func (UnimplementedFriendsServer) Add(context.Context, *FriendRequest) (*Empty, error)
func (UnimplementedFriendsServer) GetFriends ¶
func (UnimplementedFriendsServer) GetFriends(context.Context, *User) (*FriendsList, error)
func (UnimplementedFriendsServer) Remove ¶
func (UnimplementedFriendsServer) Remove(context.Context, *FriendRequest) (*Empty, error)
type UnsafeFriendsServer ¶ added in v0.3.0
type UnsafeFriendsServer interface {
// contains filtered or unexported methods
}
UnsafeFriendsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FriendsServer will result in compilation errors.
type User ¶
type User struct { User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message