service

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_graphdb_proto protoreflect.FileDescriptor
View Source
var Graphdb_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "service.Graphdb",
	HandlerType: (*GraphdbServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetFriendsOfFriends",
			Handler:    _Graphdb_GetFriendsOfFriends_Handler,
		},
		{
			MethodName: "AddFollow",
			Handler:    _Graphdb_AddFollow_Handler,
		},
		{
			MethodName: "RemoveFollow",
			Handler:    _Graphdb_RemoveFollow_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "graphdb.proto",
}

Graphdb_ServiceDesc is the grpc.ServiceDesc for Graphdb service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterGraphdbServer

func RegisterGraphdbServer(s grpc.ServiceRegistrar, srv GraphdbServer)

func SetGraphClient

func SetGraphClient(g *graph.Graph)

Types

type Follow

type Follow struct {
	From int64 `protobuf:"varint,1,opt,name=from,proto3" json:"from,omitempty"`
	To   int64 `protobuf:"varint,2,opt,name=to,proto3" json:"to,omitempty"`
	// contains filtered or unexported fields
}

func (*Follow) Descriptor deprecated

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

Deprecated: Use Follow.ProtoReflect.Descriptor instead.

func (*Follow) GetFrom

func (x *Follow) GetFrom() int64

func (*Follow) GetTo

func (x *Follow) GetTo() int64

func (*Follow) ProtoMessage

func (*Follow) ProtoMessage()

func (*Follow) ProtoReflect

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

func (*Follow) Reset

func (x *Follow) Reset()

func (*Follow) String

func (x *Follow) String() string

type GraphdbClient

type GraphdbClient interface {
	GetFriendsOfFriends(ctx context.Context, in *User, opts ...grpc.CallOption) (*UserSlice, error)
	AddFollow(ctx context.Context, in *Follow, opts ...grpc.CallOption) (*Follow, error)
	RemoveFollow(ctx context.Context, in *Follow, opts ...grpc.CallOption) (*Follow, error)
}

GraphdbClient is the client API for Graphdb 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 NewGraphdbClient

func NewGraphdbClient(cc grpc.ClientConnInterface) GraphdbClient

type GraphdbServer

type GraphdbServer interface {
	GetFriendsOfFriends(context.Context, *User) (*UserSlice, error)
	AddFollow(context.Context, *Follow) (*Follow, error)
	RemoveFollow(context.Context, *Follow) (*Follow, error)
	// contains filtered or unexported methods
}

GraphdbServer is the server API for Graphdb service. All implementations must embed UnimplementedGraphdbServer for forward compatibility

type ImplementedGraphdbServer

type ImplementedGraphdbServer struct{}

func (ImplementedGraphdbServer) AddFollow

func (ImplementedGraphdbServer) GetFriendsOfFriends

func (ImplementedGraphdbServer) GetFriendsOfFriends(c context.Context, u *User) (*UserSlice, error)

func (ImplementedGraphdbServer) RemoveFollow

func (ImplementedGraphdbServer) RemoveFollow(c context.Context, f *Follow) (*Follow, error)

type Unfollow

type Unfollow struct {
	From int64 `protobuf:"varint,1,opt,name=from,proto3" json:"from,omitempty"`
	To   int64 `protobuf:"varint,2,opt,name=to,proto3" json:"to,omitempty"`
	// contains filtered or unexported fields
}

func (*Unfollow) Descriptor deprecated

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

Deprecated: Use Unfollow.ProtoReflect.Descriptor instead.

func (*Unfollow) GetFrom

func (x *Unfollow) GetFrom() int64

func (*Unfollow) GetTo

func (x *Unfollow) GetTo() int64

func (*Unfollow) ProtoMessage

func (*Unfollow) ProtoMessage()

func (*Unfollow) ProtoReflect

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

func (*Unfollow) Reset

func (x *Unfollow) Reset()

func (*Unfollow) String

func (x *Unfollow) String() string

type UnimplementedGraphdbServer

type UnimplementedGraphdbServer struct {
}

UnimplementedGraphdbServer must be embedded to have forward compatible implementations.

func (UnimplementedGraphdbServer) AddFollow

func (UnimplementedGraphdbServer) GetFriendsOfFriends

func (UnimplementedGraphdbServer) GetFriendsOfFriends(context.Context, *User) (*UserSlice, error)

func (UnimplementedGraphdbServer) RemoveFollow

type UnsafeGraphdbServer

type UnsafeGraphdbServer interface {
	// contains filtered or unexported methods
}

UnsafeGraphdbServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GraphdbServer will result in compilation errors.

type User

type User struct {
	Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetId

func (x *User) GetId() int64

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

type UserSlice

type UserSlice struct {
	Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
	// contains filtered or unexported fields
}

func (*UserSlice) Descriptor deprecated

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

Deprecated: Use UserSlice.ProtoReflect.Descriptor instead.

func (*UserSlice) GetUsers

func (x *UserSlice) GetUsers() []*User

func (*UserSlice) ProtoMessage

func (*UserSlice) ProtoMessage()

func (*UserSlice) ProtoReflect

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

func (*UserSlice) Reset

func (x *UserSlice) Reset()

func (*UserSlice) String

func (x *UserSlice) String() string

Jump to

Keyboard shortcuts

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