owl-blogs/interactions/webmention.go

27 lines
487 B
Go

package interactions
import "owl-blogs/domain/model"
type Webmention struct {
model.InteractionBase
meta WebmentionMetaData
}
type WebmentionMetaData struct {
Source string
Target string
Title string
}
func (i *Webmention) Content() model.InteractionContent {
return model.InteractionContent(i.meta.Source)
}
func (i *Webmention) MetaData() interface{} {
return &i.meta
}
func (i *Webmention) SetMetaData(metaData interface{}) {
i.meta = *metaData.(*WebmentionMetaData)
}