35 lines
540 B
Go
35 lines
540 B
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type MessageFactory interface {
|
|
FromNostr(interface{}) Message
|
|
FromMasto(interface{}) Message
|
|
}
|
|
|
|
type Message struct {
|
|
Author Author
|
|
Protocol string
|
|
Content string
|
|
Attachments []Attachment
|
|
ReplyTo Message
|
|
Replies []Message
|
|
Mentions []Author
|
|
Created time.Time
|
|
Aux *interface{}
|
|
}
|
|
|
|
type Author struct {
|
|
Id string
|
|
Name string
|
|
ProfileData interface{}
|
|
Messages []Message
|
|
}
|
|
|
|
type Attachment struct {
|
|
Src string
|
|
Data []uint8
|
|
Desc string
|
|
}
|