Documentation ¶
Index ¶
- type BlobToSave
- type Contact
- type ContactToSave
- type Feed
- func (f *Feed) AppendMessage(msg message.Message) error
- func (f *Feed) CreateMessage(content message.RawContent, timestamp time.Time, private identity.Private) (refs.Message, error)
- func (f *Feed) MessagesThatWillBePersisted() []refs.Message
- func (f *Feed) PopForPersisting() []MessageToPersist
- func (f *Feed) Sequence() (message.Sequence, bool)
- type FeedFormat
- type MessageToPersist
- type PeekedMessage
- type PubToSave
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 NewContactFromHistory ¶
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) CreateMessage ¶
func (*Feed) MessagesThatWillBePersisted ¶
func (*Feed) PopForPersisting ¶
func (f *Feed) PopForPersisting() []MessageToPersist
type FeedFormat ¶
type FeedFormat interface { Load(raw message.VerifiedRawMessage) (message.MessageWithoutId, error) Verify(raw message.RawMessage) (message.Message, error) Sign(unsigned message.UnsignedMessage, private identity.Private) (message.Message, error) Peek(raw message.RawMessage) (PeekedMessage, error) }
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 (p PeekedMessage) Raw() message.RawMessage
func (PeekedMessage) Sequence ¶
func (p PeekedMessage) Sequence() message.Sequence
type PubToSave ¶
type PubToSave struct {
// contains filtered or unexported fields
}
func NewPubToSave ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.