Versions in this module Expand all Collapse all v0 v0.5.2 Feb 10, 2023 Changes in this version + var ErrInvalidHash = errors.New("ssb: Invalid Hash") + var ErrInvalidRef = errors.New("ssb: Invalid Ref") + var ErrInvalidRefAlgo = errors.New("ssb: Invalid Ref Algo") + var ErrInvalidRefType = errors.New("ssb: Invalid Ref Type") + var ErrInvalidSig = errors.New("ssb: Invalid Signature") + var ErrNotACanonicalURI = errors.New("ssb: not a caononical URI") + var ErrNotAnURI = errors.New("ssb: not a known URI scheme") + var ErrUnuspportedFormat = errors.New("ssb: unsupported format") + func IsMessageUnusable(err error) bool + func NewExperimentalURI(opts ...URIOption) (*url.URL, error) + type About struct + About FeedRef + Description string + Image *BlobRef + Name string + Type string + func NewAboutImage(who FeedRef, img *BlobRef) *About + func NewAboutName(who FeedRef, name string) *About + func (a *About) UnmarshalJSON(b []byte) error + type AnyRef struct + func (ar *AnyRef) UnmarshalJSON(b []byte) error + func (ar AnyRef) Algo() RefAlgo + func (ar AnyRef) IsBlob() (BlobRef, bool) + func (ar AnyRef) IsChannel() (string, bool) + func (ar AnyRef) IsFeed() (FeedRef, bool) + func (ar AnyRef) IsMessage() (MessageRef, bool) + func (ar AnyRef) MarshalJSON() ([]byte, error) + func (ar AnyRef) MarshalText() ([]byte, error) + func (ar AnyRef) ShortSigil() string + func (ar AnyRef) Sigil() string + func (ar AnyRef) String() string + func (ar AnyRef) URI() string + type BlobRef struct + func NewBlobRefFromBytes(b []byte, algo RefAlgo) (BlobRef, error) + func ParseBlobRef(str string) (BlobRef, error) + func (br *BlobRef) UnmarshalText(text []byte) error + func (br BlobRef) Algo() RefAlgo + func (br BlobRef) CopyHashTo(b []byte) error + func (br BlobRef) Equal(other BlobRef) bool + func (br BlobRef) IsValid() error + func (br BlobRef) MarshalText() ([]byte, error) + func (br BlobRef) ShortSigil() string + func (br BlobRef) Sigil() string + func (br BlobRef) String() string + func (br BlobRef) URI() string + type ByPrevious struct + Items []TangledPost + TangleName string + func (by *ByPrevious) Heads() MessageRefs + func (by *ByPrevious) Len() int + func (by *ByPrevious) Less(i int, j int) bool + func (by *ByPrevious) Swap(i int, j int) + type CanonicalURI struct + func (c CanonicalURI) Blob() (BlobRef, bool) + func (c CanonicalURI) Feed() (FeedRef, bool) + func (c CanonicalURI) Kind() Kind + func (c CanonicalURI) Message() (MessageRef, bool) + func (c CanonicalURI) String() string + type Contact struct + Blocking bool + Contact FeedRef + Following bool + Type string + func NewContactBlock(who FeedRef) Contact + func NewContactFollow(who FeedRef) Contact + func (c *Contact) UnmarshalJSON(b []byte) error + type ErrMalfromedMsg struct + func (emm ErrMalfromedMsg) Error() string + type ErrRefLen struct + func (e ErrRefLen) Error() string + type ErrWrongType struct + func (ewt ErrWrongType) Error() string + type ExperimentalURI struct + func (e *ExperimentalURI) Blob() (BlobRef, bool) + func (e *ExperimentalURI) Feed() (FeedRef, bool) + func (e *ExperimentalURI) Kind() Kind + func (e *ExperimentalURI) Message() (MessageRef, bool) + func (e ExperimentalURI) String() string + type FeedRef struct + func NewFeedRefFromBytes(b []byte, algo RefAlgo) (FeedRef, error) + func ParseFeedRef(str string) (FeedRef, error) + func (fr *FeedRef) UnmarshalText(input []byte) error + func (fr FeedRef) Algo() RefAlgo + func (fr FeedRef) Equal(b FeedRef) bool + func (fr FeedRef) MarshalText() ([]byte, error) + func (fr FeedRef) PubKey() ed25519.PublicKey + func (fr FeedRef) ShortSigil() string + func (fr FeedRef) Sigil() string + func (fr FeedRef) String() string + func (fr FeedRef) URI() string + type KeyValueAsMap struct + Key MessageRef + Timestamp Millisecs + Value Value + type KeyValueRaw struct + Key_ MessageRef + Timestamp Millisecs + Value Value + func (kvr KeyValueRaw) Author() FeedRef + func (kvr KeyValueRaw) Claimed() time.Time + func (kvr KeyValueRaw) ContentBytes() []byte + func (kvr KeyValueRaw) Key() MessageRef + func (kvr KeyValueRaw) Previous() *MessageRef + func (kvr KeyValueRaw) Received() time.Time + func (kvr KeyValueRaw) Seq() int64 + func (kvr KeyValueRaw) ValueContent() *Value + func (kvr KeyValueRaw) ValueContentJSON() json.RawMessage + type Kind uint + const KindBlob + const KindFeed + const KindMessage + const KindUnknown + func (i Kind) String() string + type Mention struct + Link AnyRef + Name string + func NewMention(r Ref, name string) Mention + type Message interface + Author func() FeedRef + Claimed func() time.Time + ContentBytes func() []byte + Key func() MessageRef + Previous func() *MessageRef + Received func() time.Time + Seq func() int64 + ValueContent func() *Value + ValueContentJSON func() json.RawMessage + type MessageRef struct + func NewMessageRefFromBytes(b []byte, algo RefAlgo) (MessageRef, error) + func ParseMessageRef(str string) (MessageRef, error) + func (mr *MessageRef) UnmarshalText(input []byte) error + func (mr MessageRef) Algo() RefAlgo + func (mr MessageRef) CopyHashTo(b []byte) error + func (mr MessageRef) Equal(other MessageRef) bool + func (mr MessageRef) MarshalText() ([]byte, error) + func (mr MessageRef) ShortSigil() string + func (mr MessageRef) Sigil() string + func (mr MessageRef) String() string + func (mr MessageRef) URI() string + type MessageRefs []MessageRef + func (mr *MessageRefs) String() string + func (mr *MessageRefs) UnmarshalJSON(text []byte) error + type Millisecs time.Time + func (t *Millisecs) UnmarshalJSON(in []byte) error + func (t Millisecs) MarshalJSON() ([]byte, error) + type OldAddress struct + Host string + Key FeedRef + Port int + type OldPubMessage struct + Address OldAddress + Type string + type Post struct + Branch MessageRefs + Mentions []Mention + Recps MessageRefs + Root *MessageRef + Tangles Tangles + Text string + Type string + func NewPost(text string) Post + type Ref interface + Algo func() RefAlgo + ShortSigil func() string + Sigil func() string + URI func() string + func ParseRef(str string) (Ref, error) + type RefAlgo string + const RefAlgoBlobSSB1 + const RefAlgoCloakedGroup + const RefAlgoFeedBamboo + const RefAlgoFeedBendyButt + const RefAlgoFeedGabby + const RefAlgoFeedSSB1 + const RefAlgoMessageBamboo + const RefAlgoMessageBendyButt + const RefAlgoMessageGabby + const RefAlgoMessageSSB1 + type TanglePoint struct + Previous MessageRefs + Root *MessageRef + type TangledPost interface + Key func() MessageRef + Tangle func(name string) (root *MessageRef, prev MessageRefs) + type Tangles map[string]TanglePoint + type Typed struct + Content struct{ ... } + type URI interface + Blob func() (BlobRef, bool) + Feed func() (FeedRef, bool) + Kind func() Kind + Message func() (MessageRef, bool) + func ParseURI(input string) (URI, error) + type URIOption func(e *ExperimentalURI) error + func MSAddr(hostAndPort string, pubKey ed25519.PublicKey) URIOption + func RoomAlias(roomID, userID, alias, signature string) URIOption + func RoomInvite(code string) URIOption + type Value struct + Author FeedRef + Content json.RawMessage + Hash string + Meta map[string]interface{} + Previous *MessageRef + Sequence int64 + Signature string + Timestamp Millisecs + type ValuePost struct + Content Post + type ValueVote struct + Content Vote + type Vote struct + Type string + Vote struct{ ... }