Documentation
¶
Index ¶
- Variables
- func RegisterFriendsServer(s *grpc.Server, 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 User
Constants ¶
This section is empty.
Variables ¶
View Source
var File_friends_proto protoreflect.FileDescriptor
Functions ¶
func RegisterFriendsServer ¶
func RegisterFriendsServer(s *grpc.Server, 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://godoc.org/google.golang.org/grpc#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) }
FriendsServer is the server API for Friends service.
type UnimplementedFriendsServer ¶
type UnimplementedFriendsServer struct { }
UnimplementedFriendsServer can 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 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
Click to show internal directories.
Click to hide internal directories.