Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterItem ¶
Types ¶
type CollectionStore ¶
type CollectionStore interface {
// Create creates the "col" collection.
Create(col pub.CollectionInterface) (pub.CollectionInterface, error)
// AddTo adds "it" element to the "col" collection.
AddTo(col pub.IRI, it pub.Item) error
// RemoveFrom removes "it" item from "col" collection
RemoveFrom(col pub.IRI, it pub.Item) error
}
CollectionStore allows operations on ActivityStreams collections
type Filterable ¶
Filterable can filter objects by Type and ID This should be the minimal interface a filter object should implement for the storage layer to work. It also allows for an activitypub.IRI to be used as a filter.
type FilterableActivity ¶
type FilterableActivity interface {
FilterableObject
Actors() pub.IRIs
Objects() pub.IRIs
Targets() pub.IRIs
}
FilterableActivity can filter activities
type FilterableCollection ¶
type FilterableCollection interface {
FilterableObject
TotalItemsGt() uint
TotalItemsLt() uint
TotalItemsEq() uint
TotalItemsGtE() uint
TotalItemsLtE() uint
Contains() pub.IRIs
}
FilterableCollection can filter collections
type FilterableItems ¶
type FilterableItems interface {
Filterable
Types() pub.ActivityVocabularyTypes
IRIs() pub.IRIs
}
type FilterableObject ¶
type FilterableObject interface {
FilterableItems
AttributedTo() pub.IRIs
InReplyTo() pub.IRIs
MediaTypes() []pub.MimeType
Names() []string
Content() []string
//PublishedBefore() time.Time
//PublishedAfter() time.Time
URLs() pub.IRIs
// Audience returns the list of IRIs to check against full Audience targeting for the object
// It should include all relevant fields: To, CC, BTo, BCC, and Audience
// ---
// An element of the Audience is used to get its Inbox end-point and then disseminate the current Activity
// to it.
Audience() pub.IRIs
// Context returns the list of IRIs to check against an Object's Context property.
Context() pub.IRIs
// Generator returns the list of IRIs to check against an Object's Generator property.
Generator() pub.IRIs
}
FilterableObject can filter objects
type ReadStore ¶
type ReadStore interface {
// Load returns an Item or an ItemCollection from an IRI
Load(pub.IRI) (pub.Item, error)
}
ReadStore
type Store ¶
type Store interface {
ReadStore
WriteStore
}
type WriteStore ¶
type WriteStore interface {
// Save saves the incoming ActivityStreams Object, and returns it together with any properties
// populated by the method's side effects. (eg, Published property can point to the current time, etc.).
Save(pub.Item) (pub.Item, error)
// Delete deletes completely from storage the ActivityStreams Object
Delete(pub.Item) error
}
WriteStore saves ActivityStreams objects.
Click to show internal directories.
Click to hide internal directories.