Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidReference = errors.New("invalid reference")
)
Functions ¶
func IsValidContent ¶
func IsValidReferenceString ¶
Types ¶
type Message ¶
type Message struct {
ID string `json:"id"`
// Timestamp is the unix millisecond timestamp of sending
Timestamp int64 `json:"timestamp"`
SenderID string `json:"sender_id"`
Content []Paragraph `json:"content"`
}
func NewMessage ¶
NewMessage uses a new UUID as ID and the timestamp of now as Timestamp
type Paragraph ¶
type Paragraph struct {
Type ParagraphType `json:"type"`
Data string `json:"data"`
}
func ParagraphFile ¶ added in v0.6.1
func ParagraphText ¶ added in v0.6.1
type ParagraphType ¶
type ParagraphType uint8
const ( ParagraphTypeText ParagraphType = iota + 1 ParagraphTypeFile )
func (ParagraphType) String ¶
func (pt ParagraphType) String() string
Click to show internal directories.
Click to hide internal directories.