mirror of
https://github.com/aljazceru/njump.git
synced 2025-12-17 14:24:27 +01:00
38 lines
625 B
Go
38 lines
625 B
Go
package main
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/nbd-wtf/go-nostr/nip52"
|
|
"github.com/nbd-wtf/go-nostr/nip53"
|
|
"github.com/nbd-wtf/go-nostr/nip94"
|
|
"github.com/nbd-wtf/go-nostr/sdk"
|
|
)
|
|
|
|
type Kind1063Metadata struct {
|
|
nip94.FileMetadata
|
|
}
|
|
|
|
type Kind30311Metadata struct {
|
|
nip53.LiveEvent
|
|
Host *sdk.ProfileMetadata
|
|
}
|
|
|
|
func (le Kind30311Metadata) title() string {
|
|
if le.Host != nil {
|
|
return le.Title + " by " + le.Host.Name
|
|
}
|
|
return le.Title
|
|
}
|
|
|
|
type Kind31922Or31923Metadata struct {
|
|
nip52.CalendarEvent
|
|
}
|
|
|
|
type Kind30818Metadata struct {
|
|
Handle string
|
|
Title string
|
|
Summary string
|
|
PublishedAt time.Time
|
|
}
|