Documentation ¶
Index ¶
Constants ¶
View Source
const ( CHAT_SERIALIZATION = "plaintext" CHAT_MESSAGE_TYPE = "chat" )
View Source
const REPLY_SERIALIZATION = "cbor"
Variables ¶
View Source
var CHAT_CONTENT_TYPE_PARAMS = map[string]string{ "type": CHAT_MESSAGE_TYPE, }
View Source
var REPLY_CONTENT_TYPE_PARAMS = map[string]string{
"type": "reply",
}
Functions ¶
func Chat ¶
func Chat( from string, to string, content []byte, priv_key ed25519.PrivateKey) (*msg.Message, error)
New creates a new Message instance
func Reply ¶
func Reply(ctx context.Context, m msg.Message, replyBytes []byte, privKey ed25519.PrivateKey, topic *pubsub.Topic) error
Reply to a message. requires the message to create a reply containing the id of the requesting message The message is not a pointer, as we only need the ID and then throw it away.
Types ¶
type ReplyContent ¶
Click to show internal directories.
Click to hide internal directories.