pb

package
v0.0.0-...-8a1e6a1 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ContentType_name = map[int32]string{
		0: "CONTENT_TYPE_UNKNOWN",
		1: "POINT_OF_INTEREST",
		2: "NEWSWIRE_ARTICLE",
		3: "ARTICLE",
		4: "SPORTS",
		5: "TRANSIT",
		6: "NEWSWIRE_BULLETIN",
		7: "WEB_LINK",
	}
	ContentType_value = map[string]int32{
		"CONTENT_TYPE_UNKNOWN": 0,
		"POINT_OF_INTEREST":    1,
		"NEWSWIRE_ARTICLE":     2,
		"ARTICLE":              3,
		"SPORTS":               4,
		"TRANSIT":              5,
		"NEWSWIRE_BULLETIN":    6,
		"WEB_LINK":             7,
	}
)

Enum value maps for ContentType.

View Source
var FeedProducer_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "feed_producer.FeedProducer",
	HandlerType: (*FeedProducerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AddAnnouncement",
			Handler:    _FeedProducer_AddAnnouncement_Handler,
		},
		{
			MethodName: "AddContent",
			Handler:    _FeedProducer_AddContent_Handler,
		},
		{
			MethodName: "RemoveContent",
			Handler:    _FeedProducer_RemoveContent_Handler,
		},
		{
			MethodName: "ReadLatest",
			Handler:    _FeedProducer_ReadLatest_Handler,
		},
		{
			MethodName: "QueueItem",
			Handler:    _FeedProducer_QueueItem_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ListActiveReleases",
			Handler:       _FeedProducer_ListActiveReleases_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "ListAllReleases",
			Handler:       _FeedProducer_ListAllReleases_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "service.proto",
}

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

View Source
var File_service_proto protoreflect.FileDescriptor

Functions

func RegisterFeedProducerServer

func RegisterFeedProducerServer(s grpc.ServiceRegistrar, srv FeedProducerServer)

Types

type AddAnnouncementRequest

type AddAnnouncementRequest struct {

	// A UUID string identifying an annoucement graph vertex.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*AddAnnouncementRequest) Descriptor deprecated

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

Deprecated: Use AddAnnouncementRequest.ProtoReflect.Descriptor instead.

func (*AddAnnouncementRequest) GetId

func (x *AddAnnouncementRequest) GetId() string

func (*AddAnnouncementRequest) ProtoMessage

func (*AddAnnouncementRequest) ProtoMessage()

func (*AddAnnouncementRequest) ProtoReflect

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

func (*AddAnnouncementRequest) Reset

func (x *AddAnnouncementRequest) Reset()

func (*AddAnnouncementRequest) String

func (x *AddAnnouncementRequest) String() string

type AddContentRequest

type AddContentRequest struct {

	// Type of content pointed at by
	ContentType ContentType `` /* 126-byte string literal not displayed */
	// A UUID string identifying the graph vertex
	Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// Minimum amount of time to wait between appearences in the feed.
	Wait *durationpb.Duration `protobuf:"bytes,3,opt,name=wait,proto3" json:"wait,omitempty"`
	// If specified, content should be promoted starting now until this time.
	Until *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=until,proto3" json:"until,omitempty"`
	// If specified, content should not be promoted at all after this date.
	Expires *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=expires,proto3" json:"expires,omitempty"`
	// If specified, schedule this item to publish immediately.
	ImmediateRelease bool `protobuf:"varint,6,opt,name=ImmediateRelease,proto3" json:"ImmediateRelease,omitempty"`
	// contains filtered or unexported fields
}

func (*AddContentRequest) Descriptor deprecated

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

Deprecated: Use AddContentRequest.ProtoReflect.Descriptor instead.

func (*AddContentRequest) GetContentType

func (x *AddContentRequest) GetContentType() ContentType

func (*AddContentRequest) GetExpires

func (x *AddContentRequest) GetExpires() *timestamppb.Timestamp

func (*AddContentRequest) GetId

func (x *AddContentRequest) GetId() string

func (*AddContentRequest) GetImmediateRelease

func (x *AddContentRequest) GetImmediateRelease() bool

func (*AddContentRequest) GetUntil

func (x *AddContentRequest) GetUntil() *timestamppb.Timestamp

func (*AddContentRequest) GetWait

func (x *AddContentRequest) GetWait() *durationpb.Duration

func (*AddContentRequest) ProtoMessage

func (*AddContentRequest) ProtoMessage()

func (*AddContentRequest) ProtoReflect

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

func (*AddContentRequest) Reset

func (x *AddContentRequest) Reset()

func (*AddContentRequest) String

func (x *AddContentRequest) String() string

type ContentItem

type ContentItem struct {

	// The ID of this entry in the feed. Any given content ID can be inserted
	// into the feed multiple time, this ID identifies each insertion uniquely.
	FeedId string `protobuf:"bytes,1,opt,name=feed_id,json=feedId,proto3" json:"feed_id,omitempty"`
	// The UUID of the graph vertex of the content inserted here.
	ContentId string `protobuf:"bytes,2,opt,name=content_id,json=contentId,proto3" json:"content_id,omitempty"`
	// Timestamp indicated when this content item was inserted in the feed.
	AddedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=added_at,json=addedAt,proto3" json:"added_at,omitempty"`
	// contains filtered or unexported fields
}

func (*ContentItem) Descriptor deprecated

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

Deprecated: Use ContentItem.ProtoReflect.Descriptor instead.

func (*ContentItem) GetAddedAt

func (x *ContentItem) GetAddedAt() *timestamppb.Timestamp

func (*ContentItem) GetContentId

func (x *ContentItem) GetContentId() string

func (*ContentItem) GetFeedId

func (x *ContentItem) GetFeedId() string

func (*ContentItem) ProtoMessage

func (*ContentItem) ProtoMessage()

func (*ContentItem) ProtoReflect

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

func (*ContentItem) Reset

func (x *ContentItem) Reset()

func (*ContentItem) String

func (x *ContentItem) String() string

type ContentType

type ContentType int32
const (
	ContentType_CONTENT_TYPE_UNKNOWN ContentType = 0
	// A local point-of-interest.
	ContentType_POINT_OF_INTEREST ContentType = 1
	// Article provided by a newswire service.
	ContentType_NEWSWIRE_ARTICLE ContentType = 2
	// Article owned by Geomodulus.
	ContentType_ARTICLE ContentType = 3
	// Sports content.
	ContentType_SPORTS ContentType = 4
	// Transit content.
	ContentType_TRANSIT ContentType = 5
	// Bulletin provided by a newswire service.
	ContentType_NEWSWIRE_BULLETIN ContentType = 6
	// External link, opened in a new window.
	ContentType_WEB_LINK ContentType = 7
)

func (ContentType) Descriptor

func (ContentType) Enum

func (x ContentType) Enum() *ContentType

func (ContentType) EnumDescriptor deprecated

func (ContentType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ContentType.Descriptor instead.

func (ContentType) Number

func (x ContentType) Number() protoreflect.EnumNumber

func (ContentType) String

func (x ContentType) String() string

func (ContentType) Type

type FeedProducerClient

type FeedProducerClient interface {
	// AddAnnouncement is the method used to provided announcement to Feed Producer.
	AddAnnouncement(ctx context.Context, in *AddAnnouncementRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// AddContent is the method used to provide content items to Feed Producer.
	AddContent(ctx context.Context, in *AddContentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// RemoveContent is the method used to tell Feed Producer to forget an item.
	RemoveContent(ctx context.Context, in *RemoveContentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// ReadLatest returns the latest items from the feed.
	ReadLatest(ctx context.Context, in *ReadLatestRequest, opts ...grpc.CallOption) (*ReadLatestResponse, error)
	// ListActiveReleases returns a list of active releases only.
	ListActiveReleases(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (FeedProducer_ListActiveReleasesClient, error)
	// ListAllReleases returns a list of every release, active and waiting.
	ListAllReleases(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (FeedProducer_ListAllReleasesClient, error)
	// QueueItem schedules an item for immediate release.
	QueueItem(ctx context.Context, in *QueueItemRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

FeedProducerClient is the client API for FeedProducer 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.

type FeedProducerServer

type FeedProducerServer interface {
	// AddAnnouncement is the method used to provided announcement to Feed Producer.
	AddAnnouncement(context.Context, *AddAnnouncementRequest) (*emptypb.Empty, error)
	// AddContent is the method used to provide content items to Feed Producer.
	AddContent(context.Context, *AddContentRequest) (*emptypb.Empty, error)
	// RemoveContent is the method used to tell Feed Producer to forget an item.
	RemoveContent(context.Context, *RemoveContentRequest) (*emptypb.Empty, error)
	// ReadLatest returns the latest items from the feed.
	ReadLatest(context.Context, *ReadLatestRequest) (*ReadLatestResponse, error)
	// ListActiveReleases returns a list of active releases only.
	ListActiveReleases(*emptypb.Empty, FeedProducer_ListActiveReleasesServer) error
	// ListAllReleases returns a list of every release, active and waiting.
	ListAllReleases(*emptypb.Empty, FeedProducer_ListAllReleasesServer) error
	// QueueItem schedules an item for immediate release.
	QueueItem(context.Context, *QueueItemRequest) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

FeedProducerServer is the server API for FeedProducer service. All implementations must embed UnimplementedFeedProducerServer for forward compatibility

type FeedProducer_ListActiveReleasesClient

type FeedProducer_ListActiveReleasesClient interface {
	Recv() (*ReleaseItem, error)
	grpc.ClientStream
}

type FeedProducer_ListActiveReleasesServer

type FeedProducer_ListActiveReleasesServer interface {
	Send(*ReleaseItem) error
	grpc.ServerStream
}

type FeedProducer_ListAllReleasesClient

type FeedProducer_ListAllReleasesClient interface {
	Recv() (*ReleaseItem, error)
	grpc.ClientStream
}

type FeedProducer_ListAllReleasesServer

type FeedProducer_ListAllReleasesServer interface {
	Send(*ReleaseItem) error
	grpc.ServerStream
}

type QueueItemRequest

type QueueItemRequest struct {

	// A UUID string identifying the graph vertex
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*QueueItemRequest) Descriptor deprecated

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

Deprecated: Use QueueItemRequest.ProtoReflect.Descriptor instead.

func (*QueueItemRequest) GetId

func (x *QueueItemRequest) GetId() string

func (*QueueItemRequest) ProtoMessage

func (*QueueItemRequest) ProtoMessage()

func (*QueueItemRequest) ProtoReflect

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

func (*QueueItemRequest) Reset

func (x *QueueItemRequest) Reset()

func (*QueueItemRequest) String

func (x *QueueItemRequest) String() string

type ReadLatestRequest

type ReadLatestRequest struct {

	// Number of ContentItem messages to return.
	Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadLatestRequest) Descriptor deprecated

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

Deprecated: Use ReadLatestRequest.ProtoReflect.Descriptor instead.

func (*ReadLatestRequest) GetCount

func (x *ReadLatestRequest) GetCount() int32

func (*ReadLatestRequest) ProtoMessage

func (*ReadLatestRequest) ProtoMessage()

func (*ReadLatestRequest) ProtoReflect

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

func (*ReadLatestRequest) Reset

func (x *ReadLatestRequest) Reset()

func (*ReadLatestRequest) String

func (x *ReadLatestRequest) String() string

type ReadLatestResponse

type ReadLatestResponse struct {

	// Latest ContentItem messages from the feed.
	Latest []*ContentItem `protobuf:"bytes,1,rep,name=latest,proto3" json:"latest,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadLatestResponse) Descriptor deprecated

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

Deprecated: Use ReadLatestResponse.ProtoReflect.Descriptor instead.

func (*ReadLatestResponse) GetLatest

func (x *ReadLatestResponse) GetLatest() []*ContentItem

func (*ReadLatestResponse) ProtoMessage

func (*ReadLatestResponse) ProtoMessage()

func (*ReadLatestResponse) ProtoReflect

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

func (*ReadLatestResponse) Reset

func (x *ReadLatestResponse) Reset()

func (*ReadLatestResponse) String

func (x *ReadLatestResponse) String() string

type ReleaseItem

type ReleaseItem struct {

	// The UUID of the graph vertex of the content to be released.
	ContentId string `protobuf:"bytes,1,opt,name=content_id,json=contentId,proto3" json:"content_id,omitempty"`
	// The type of this vertex in Citygraph.
	VertexType string `protobuf:"bytes,2,opt,name=vertex_type,json=vertexType,proto3" json:"vertex_type,omitempty"`
	// contains filtered or unexported fields
}

func (*ReleaseItem) Descriptor deprecated

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

Deprecated: Use ReleaseItem.ProtoReflect.Descriptor instead.

func (*ReleaseItem) GetContentId

func (x *ReleaseItem) GetContentId() string

func (*ReleaseItem) GetVertexType

func (x *ReleaseItem) GetVertexType() string

func (*ReleaseItem) ProtoMessage

func (*ReleaseItem) ProtoMessage()

func (*ReleaseItem) ProtoReflect

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

func (*ReleaseItem) Reset

func (x *ReleaseItem) Reset()

func (*ReleaseItem) String

func (x *ReleaseItem) String() string

type RemoveContentRequest

type RemoveContentRequest struct {

	// A UUID string identifying the graph vertex to remove.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*RemoveContentRequest) Descriptor deprecated

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

Deprecated: Use RemoveContentRequest.ProtoReflect.Descriptor instead.

func (*RemoveContentRequest) GetId

func (x *RemoveContentRequest) GetId() string

func (*RemoveContentRequest) ProtoMessage

func (*RemoveContentRequest) ProtoMessage()

func (*RemoveContentRequest) ProtoReflect

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

func (*RemoveContentRequest) Reset

func (x *RemoveContentRequest) Reset()

func (*RemoveContentRequest) String

func (x *RemoveContentRequest) String() string

type UnimplementedFeedProducerServer

type UnimplementedFeedProducerServer struct {
}

UnimplementedFeedProducerServer must be embedded to have forward compatible implementations.

func (UnimplementedFeedProducerServer) AddAnnouncement

func (UnimplementedFeedProducerServer) AddContent

func (UnimplementedFeedProducerServer) ListActiveReleases

func (UnimplementedFeedProducerServer) ListAllReleases

func (UnimplementedFeedProducerServer) QueueItem

func (UnimplementedFeedProducerServer) ReadLatest

func (UnimplementedFeedProducerServer) RemoveContent

type UnsafeFeedProducerServer

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

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

Jump to

Keyboard shortcuts

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