proto

package
v0.0.0-...-7b67181 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LinkGraph_UpsertLink_FullMethodName       = "/proto.LinkGraph/UpsertLink"
	LinkGraph_UpsertEdge_FullMethodName       = "/proto.LinkGraph/UpsertEdge"
	LinkGraph_Links_FullMethodName            = "/proto.LinkGraph/Links"
	LinkGraph_Edges_FullMethodName            = "/proto.LinkGraph/Edges"
	LinkGraph_RemoveStaleEdges_FullMethodName = "/proto.LinkGraph/RemoveStaleEdges"
)

Variables

View Source
var LinkGraph_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.LinkGraph",
	HandlerType: (*LinkGraphServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "UpsertLink",
			Handler:    _LinkGraph_UpsertLink_Handler,
		},
		{
			MethodName: "UpsertEdge",
			Handler:    _LinkGraph_UpsertEdge_Handler,
		},
		{
			MethodName: "RemoveStaleEdges",
			Handler:    _LinkGraph_RemoveStaleEdges_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Links",
			Handler:       _LinkGraph_Links_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "Edges",
			Handler:       _LinkGraph_Edges_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "api.proto",
}

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

Functions

func RegisterLinkGraphServer

func RegisterLinkGraphServer(s grpc.ServiceRegistrar, srv LinkGraphServer)

Types

type Edge

type Edge struct {
	Uuid      []byte                 `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	SrcUuid   []byte                 `protobuf:"bytes,2,opt,name=src_uuid,json=srcUuid,proto3" json:"src_uuid,omitempty"`
	DstUuid   []byte                 `protobuf:"bytes,3,opt,name=dst_uuid,json=dstUuid,proto3" json:"dst_uuid,omitempty"`
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

Edge describes an edge in the linkgraph.

func (*Edge) Descriptor deprecated

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

Deprecated: Use Edge.ProtoReflect.Descriptor instead.

func (*Edge) GetDstUuid

func (x *Edge) GetDstUuid() []byte

func (*Edge) GetSrcUuid

func (x *Edge) GetSrcUuid() []byte

func (*Edge) GetUpdatedAt

func (x *Edge) GetUpdatedAt() *timestamppb.Timestamp

func (*Edge) GetUuid

func (x *Edge) GetUuid() []byte

func (*Edge) ProtoMessage

func (*Edge) ProtoMessage()

func (*Edge) ProtoReflect

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

func (*Edge) Reset

func (x *Edge) Reset()

func (*Edge) String

func (x *Edge) String() string
type Link struct {
	Uuid        []byte                 `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	Url         string                 `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
	RetrievedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=retrieved_at,json=retrievedAt,proto3" json:"retrieved_at,omitempty"`
	// contains filtered or unexported fields
}

Link describes a link in the linkgraph.

func (*Link) Descriptor deprecated

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

Deprecated: Use Link.ProtoReflect.Descriptor instead.

func (*Link) GetRetrievedAt

func (x *Link) GetRetrievedAt() *timestamppb.Timestamp

func (*Link) GetUrl

func (x *Link) GetUrl() string

func (*Link) GetUuid

func (x *Link) GetUuid() []byte

func (*Link) ProtoMessage

func (*Link) ProtoMessage()

func (*Link) ProtoReflect

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

func (*Link) Reset

func (x *Link) Reset()

func (*Link) String

func (x *Link) String() string

type LinkGraphClient

type LinkGraphClient interface {
	// UpsertLink inserts or updates a link.
	UpsertLink(ctx context.Context, in *Link, opts ...grpc.CallOption) (*Link, error)
	// UpsertEdge inserts or updates an edge.
	UpsertEdge(ctx context.Context, in *Edge, opts ...grpc.CallOption) (*Edge, error)
	// Links streams the set of links in the specified ID range.
	Links(ctx context.Context, in *Range, opts ...grpc.CallOption) (LinkGraph_LinksClient, error)
	// Edges streams the set of edges in the specified ID range.
	Edges(ctx context.Context, in *Range, opts ...grpc.CallOption) (LinkGraph_EdgesClient, error)
	// RemoveStaleEdges removes any edge that originates from the specified
	// link ID and was updated before the specified timestamp.
	RemoveStaleEdges(ctx context.Context, in *RemoveStaleEdgesQuery, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

LinkGraphClient is the client API for LinkGraph 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 NewLinkGraphClient

func NewLinkGraphClient(cc grpc.ClientConnInterface) LinkGraphClient

type LinkGraphServer

type LinkGraphServer interface {
	// UpsertLink inserts or updates a link.
	UpsertLink(context.Context, *Link) (*Link, error)
	// UpsertEdge inserts or updates an edge.
	UpsertEdge(context.Context, *Edge) (*Edge, error)
	// Links streams the set of links in the specified ID range.
	Links(*Range, LinkGraph_LinksServer) error
	// Edges streams the set of edges in the specified ID range.
	Edges(*Range, LinkGraph_EdgesServer) error
	// RemoveStaleEdges removes any edge that originates from the specified
	// link ID and was updated before the specified timestamp.
	RemoveStaleEdges(context.Context, *RemoveStaleEdgesQuery) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

LinkGraphServer is the server API for LinkGraph service. All implementations must embed UnimplementedLinkGraphServer for forward compatibility

type LinkGraph_EdgesClient

type LinkGraph_EdgesClient interface {
	Recv() (*Edge, error)
	grpc.ClientStream
}

type LinkGraph_EdgesServer

type LinkGraph_EdgesServer interface {
	Send(*Edge) error
	grpc.ServerStream
}

type LinkGraph_LinksClient

type LinkGraph_LinksClient interface {
	Recv() (*Link, error)
	grpc.ClientStream
}

type LinkGraph_LinksServer

type LinkGraph_LinksServer interface {
	Send(*Link) error
	grpc.ServerStream
}

type Range

type Range struct {
	FromUuid []byte `protobuf:"bytes,1,opt,name=from_uuid,json=fromUuid,proto3" json:"from_uuid,omitempty"`
	ToUuid   []byte `protobuf:"bytes,2,opt,name=to_uuid,json=toUuid,proto3" json:"to_uuid,omitempty"`
	// Return results before this filter timestamp.
	Filter *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"`
	// contains filtered or unexported fields
}

Range specifies the [fromID, toID) range to use when streaming Links or Edges.

func (*Range) Descriptor deprecated

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

Deprecated: Use Range.ProtoReflect.Descriptor instead.

func (*Range) GetFilter

func (x *Range) GetFilter() *timestamppb.Timestamp

func (*Range) GetFromUuid

func (x *Range) GetFromUuid() []byte

func (*Range) GetToUuid

func (x *Range) GetToUuid() []byte

func (*Range) ProtoMessage

func (*Range) ProtoMessage()

func (*Range) ProtoReflect

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

func (*Range) Reset

func (x *Range) Reset()

func (*Range) String

func (x *Range) String() string

type RemoveStaleEdgesQuery

type RemoveStaleEdgesQuery struct {
	FromUuid      []byte                 `protobuf:"bytes,1,opt,name=from_uuid,json=fromUuid,proto3" json:"from_uuid,omitempty"`
	UpdatedBefore *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=updated_before,json=updatedBefore,proto3" json:"updated_before,omitempty"`
	// contains filtered or unexported fields
}

RemoveStaleEdgesQuery describes a query for removing stale edges from the graph.

func (*RemoveStaleEdgesQuery) Descriptor deprecated

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

Deprecated: Use RemoveStaleEdgesQuery.ProtoReflect.Descriptor instead.

func (*RemoveStaleEdgesQuery) GetFromUuid

func (x *RemoveStaleEdgesQuery) GetFromUuid() []byte

func (*RemoveStaleEdgesQuery) GetUpdatedBefore

func (x *RemoveStaleEdgesQuery) GetUpdatedBefore() *timestamppb.Timestamp

func (*RemoveStaleEdgesQuery) ProtoMessage

func (*RemoveStaleEdgesQuery) ProtoMessage()

func (*RemoveStaleEdgesQuery) ProtoReflect

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

func (*RemoveStaleEdgesQuery) Reset

func (x *RemoveStaleEdgesQuery) Reset()

func (*RemoveStaleEdgesQuery) String

func (x *RemoveStaleEdgesQuery) String() string

type UnimplementedLinkGraphServer

type UnimplementedLinkGraphServer struct {
}

UnimplementedLinkGraphServer must be embedded to have forward compatible implementations.

func (UnimplementedLinkGraphServer) Edges

func (UnimplementedLinkGraphServer) RemoveStaleEdges

func (UnimplementedLinkGraphServer) UpsertEdge

type UnsafeLinkGraphServer

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

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

Jump to

Keyboard shortcuts

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