Documentation
¶
Index ¶
- func DecodeNpub(npub string) (string, error)
- func DetermineEventCategory(kind int) string
- func EnsureFileExists(filePath, examplePath string)
- func FetchPubkeysFromDomains(domains []string) ([]string, error)
- func GetClientIP(r *http.Request) string
- func LoadRelayMetadata(filename string) error
- func LoadRelayMetadataJSON() error
- func RelayInfoHandler(w http.ResponseWriter, r *http.Request)
- func SendToBackupRelay(backupURL string, evt nostr.Event) error
- func SerializeEvent(evt nostr.Event) string
- func ToInt(i interface{}) *int
- func ToInt64(i interface{}) *int64
- func ToIntArray(i interface{}) []int
- func ToStringArray(i interface{}) []string
- func ToTagsMap(i interface{}) map[string][]string
- func ToTime(data interface{}) *time.Time
- type CachedDomains
- type NostrJSON
- type RelayMetadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeNpub ¶
DecodeNpub decodes a Bech32 encoded npub to its corresponding pubkey
func DetermineEventCategory ¶
func EnsureFileExists ¶
func EnsureFileExists(filePath, examplePath string)
func FetchPubkeysFromDomains ¶
FetchPubkeysFromDomains fetches nostr.json pubkeys from multiple domains with caching.
func GetClientIP ¶
func LoadRelayMetadata ¶
func LoadRelayMetadataJSON ¶
func LoadRelayMetadataJSON() error
func RelayInfoHandler ¶
func RelayInfoHandler(w http.ResponseWriter, r *http.Request)
func SerializeEvent ¶
SerializeEvent manually constructs the JSON string for event serialization according to NIP-01
func ToIntArray ¶
func ToIntArray(i interface{}) []int
func ToStringArray ¶
func ToStringArray(i interface{}) []string
Types ¶
type CachedDomains ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.