feedgenerator

package
v0.0.0-...-524d49d Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package feedgenerator describes the FeedGenerator type, which is responsible for generating feeds for a given DID. It also describes the Feed interface, which is implemented by the various feed types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Feed

type Feed interface {
	GetPage(ctx context.Context, feed string, userDID string, limit int64, cursor string) (feedPosts []*appbsky.FeedDefs_SkeletonFeedPost, newCursor *string, err error)
	Describe(ctx context.Context) ([]appbsky.FeedDescribeFeedGenerator_Feed, error)
}

type FeedGenerator

type FeedGenerator struct {
	FeedActorDID          did.DID         // DID of the Repo the Feed is published under
	ServiceEndpoint       string          // URL of the FeedGenerator service
	ServiceDID            did.DID         // DID of the FeedGenerator service
	DIDDocument           did.Document    // DID Document of the FeedGenerator service
	AcceptableURIPrefixes []string        // URIs that the FeedGenerator is allowed to generate feeds for
	FeedMap               map[string]Feed // map of FeedName to Feed
	Feeds                 []Feed
}

func NewFeedGenerator

func NewFeedGenerator(
	ctx context.Context,
	feedActorDIDString string,
	serviceDIDString string,
	acceptableDIDs []string,
	serviceEndpoint string,
) (*FeedGenerator, error)

NewFeedGenerator returns a new FeedGenerator

func (*FeedGenerator) AddFeed

func (fg *FeedGenerator) AddFeed(feedAliases []string, feed Feed)

AddFeed adds a feed to the FeedGenerator Feed precedence for overlapping aliases is determined by the order in which they are added (first added is highest precedence)

type NotFoundError

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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