friends

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type Entity

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

func (*Entity) Default

func (e *Entity) Default(ctx *crdt.Context) (crdt.CRDT, error)

func (*Entity) HandleCommand

func (e *Entity) HandleCommand(ctx *crdt.CommandContext, name string, msg proto.Message) (*any.Any, error)

func (*Entity) Set

func (e *Entity) Set(ctx *crdt.Context, state crdt.CRDT) error

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

Deprecated: Use Friend.ProtoReflect.Descriptor instead.

func (*Friend) GetAvatar

func (x *Friend) GetAvatar() string

func (*Friend) GetUser

func (x *Friend) GetUser() string

func (*Friend) ProtoMessage

func (*Friend) ProtoMessage()

func (*Friend) ProtoReflect

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

func (*Friend) Reset

func (x *Friend) Reset()

func (*Friend) String

func (x *Friend) String() string

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) GetFriends

func (UnimplementedFriendsServer) Remove

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetUser

func (x *User) GetUser() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

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

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

Jump to

Keyboard shortcuts

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