mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-11-19 02:26:34 +01:00
add nipb0/blossom helpers.
This commit is contained in:
22
nipb0/blossom/types.go
Normal file
22
nipb0/blossom/types.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package blossom
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
|
||||
"github.com/nbd-wtf/go-nostr"
|
||||
)
|
||||
|
||||
// BlobDescriptor represents metadata about a blob stored on a media server
|
||||
type BlobDescriptor struct {
|
||||
URL string `json:"url"`
|
||||
SHA256 string `json:"sha256"`
|
||||
Size int `json:"size"`
|
||||
Type string `json:"type"`
|
||||
Uploaded nostr.Timestamp `json:"uploaded"`
|
||||
}
|
||||
|
||||
// String returns a JSON string representation of the BlobDescriptor
|
||||
func (bd BlobDescriptor) String() string {
|
||||
j, _ := json.Marshal(bd)
|
||||
return string(j)
|
||||
}
|
||||
Reference in New Issue
Block a user