feeds

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlobToSave

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

func MustNewBlobToSave

func MustNewBlobToSave(ref refs.Blob) BlobToSave

func NewBlobToSave

func NewBlobToSave(ref refs.Blob) (BlobToSave, error)

func (BlobToSave) Ref

func (b BlobToSave) Ref() refs.Blob

type Contact

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

func MustNewContactFromHistory

func MustNewContactFromHistory(author, contact refs.Identity, following, blocking bool) *Contact

func NewContact

func NewContact(author, target refs.Identity) (*Contact, error)

func NewContactFromHistory

func NewContactFromHistory(author, target refs.Identity, following, blocking bool) (*Contact, error)

func (*Contact) Blocking

func (c *Contact) Blocking() bool

func (*Contact) Following

func (c *Contact) Following() bool

func (*Contact) Target

func (c *Contact) Target() refs.Identity

func (*Contact) Update

func (c *Contact) Update(actions known.ContactActions) error

type ContactToSave

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

func NewContactToSave

func NewContactToSave(who refs.Identity, msg known.Contact) ContactToSave

func (ContactToSave) Msg

func (c ContactToSave) Msg() known.Contact

func (ContactToSave) Who

func (c ContactToSave) Who() refs.Identity

type Feed

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

func NewFeed

func NewFeed(format FeedFormat) *Feed

func NewFeedFromHistory

func NewFeedFromHistory(lastMsg message.Message, format FeedFormat) (*Feed, error)

func (*Feed) AppendMessage

func (f *Feed) AppendMessage(msg message.Message) error

func (*Feed) CreateMessage

func (f *Feed) CreateMessage(content message.RawContent, timestamp time.Time, private identity.Private) (refs.Message, error)

func (*Feed) MessagesThatWillBePersisted

func (f *Feed) MessagesThatWillBePersisted() []refs.Message

func (*Feed) PopForPersisting

func (f *Feed) PopForPersisting() []MessageToPersist

func (*Feed) Sequence

func (f *Feed) Sequence() (message.Sequence, bool)

type MessageToPersist

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

func MustNewMessageToPersist

func MustNewMessageToPersist(
	msg message.Message,
	contactsToSave []ContactToSave,
	pubsToSave []PubToSave,
	blobsToSave []BlobToSave,
) MessageToPersist

func NewMessageToPersist

func NewMessageToPersist(
	msg message.Message,
	contactsToSave []ContactToSave,
	pubsToSave []PubToSave,
	blobsToSave []BlobToSave,
) (MessageToPersist, error)

func (MessageToPersist) BlobsToSave

func (m MessageToPersist) BlobsToSave() []BlobToSave

func (MessageToPersist) ContactsToSave

func (m MessageToPersist) ContactsToSave() []ContactToSave

func (MessageToPersist) Message

func (m MessageToPersist) Message() message.Message

func (MessageToPersist) PubsToSave

func (m MessageToPersist) PubsToSave() []PubToSave

type PeekedMessage

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

func MustNewPeekedMessage

func MustNewPeekedMessage(
	feed refs.Feed,
	sequence message.Sequence,
	raw message.RawMessage,
) PeekedMessage

func NewPeekedMessage

func NewPeekedMessage(
	feed refs.Feed,
	sequence message.Sequence,
	raw message.RawMessage,
) (PeekedMessage, error)

func (PeekedMessage) Feed

func (p PeekedMessage) Feed() refs.Feed

func (PeekedMessage) IsZero

func (p PeekedMessage) IsZero() bool

func (PeekedMessage) Raw

func (PeekedMessage) Sequence

func (p PeekedMessage) Sequence() message.Sequence

type PubToSave

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

func NewPubToSave

func NewPubToSave(who refs.Identity, message refs.Message, content known.Pub) PubToSave

func (PubToSave) Content

func (c PubToSave) Content() known.Pub

func (PubToSave) Message

func (c PubToSave) Message() refs.Message

func (PubToSave) Who

func (c PubToSave) Who() refs.Identity

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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