known

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: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ContactActionFollow   = ContactAction{"follow"}
	ContactActionUnfollow = ContactAction{"unfollow"}
	ContactActionBlock    = ContactAction{"block"}
	ContactActionUnblock  = ContactAction{"unblock"}
)

Functions

This section is empty.

Types

type Contact

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

func MustNewContact

func MustNewContact(contact refs.Identity, actions ContactActions) Contact

func NewContact

func NewContact(contact refs.Identity, actions ContactActions) (Contact, error)

func (Contact) Actions

func (c Contact) Actions() ContactActions

func (Contact) Contact

func (c Contact) Contact() refs.Identity

func (Contact) Type

func (c Contact) Type() MessageContentType

type ContactAction

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

func (ContactAction) IsZero

func (a ContactAction) IsZero() bool

type ContactActions

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

func MustNewContactActions

func MustNewContactActions(actions []ContactAction) ContactActions

func NewContactActions

func NewContactActions(actions []ContactAction) (ContactActions, error)

func (ContactActions) IsZero

func (a ContactActions) IsZero() bool

func (ContactActions) List

func (a ContactActions) List() []ContactAction

type KnownMessageContent

type KnownMessageContent interface {
	Type() MessageContentType
}

type MessageContentType

type MessageContentType string // todo struct with strings.ToLower or pragma nocompare?

func (MessageContentType) IsZero

func (t MessageContentType) IsZero() bool

type Pub

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

func MustNewPub

func MustNewPub(key refs.Identity, host string, port int) Pub

func NewPub

func NewPub(key refs.Identity, host string, port int) (Pub, error)

func (Pub) Host

func (c Pub) Host() string

func (Pub) Key

func (c Pub) Key() refs.Identity

func (Pub) Port

func (c Pub) Port() int

func (Pub) Type

func (c Pub) Type() MessageContentType

Jump to

Keyboard shortcuts

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