···
+
// SelfLabels represents self-applied content labels per com.atproto.label.defs#selfLabels
+
// This is the structured format used in atProto for content warnings
+
type SelfLabels struct {
+
Values []SelfLabel `json:"values"`
+
// SelfLabel represents a single label value per com.atproto.label.defs#selfLabel
+
// Neg is optional and negates the label when true
+
type SelfLabel struct {
+
Val string `json:"val"` // Required: label value (max 128 chars)
+
Neg *bool `json:"neg,omitempty"` // Optional: negates the label if true
// Post represents a post in the AppView database
// Posts are indexed from the firehose after being written to community repositories
···
EditedAt *time.Time `json:"editedAt,omitempty" db:"edited_at"`
Embed *string `json:"embed,omitempty" db:"embed"`
DeletedAt *time.Time `json:"deletedAt,omitempty" db:"deleted_at"`
+
ContentLabels *string `json:"labels,omitempty" db:"content_labels"`
Title *string `json:"title,omitempty" db:"title"`
Content *string `json:"content,omitempty" db:"content"`
ContentFacets *string `json:"contentFacets,omitempty" db:"content_facets"`
···
// CreatePostRequest represents input for creating a new post
+
// Matches social.coves.community.post.create lexicon input schema
type CreatePostRequest struct {
OriginalAuthor interface{} `json:"originalAuthor,omitempty"`
FederatedFrom interface{} `json:"federatedFrom,omitempty"`
···
Community string `json:"community"`
AuthorDID string `json:"authorDid"`
Facets []interface{} `json:"facets,omitempty"`
+
Labels *SelfLabels `json:"labels,omitempty"`
// CreatePostResponse represents the response from creating a post
+
// Matches social.coves.community.post.create lexicon output schema
+
type CreatePostResponse struct{
URI string `json:"uri"` // AT-URI of created post
CID string `json:"cid"` // CID of created post
···
Author string `json:"author"`
CreatedAt string `json:"createdAt"`
Facets []interface{} `json:"facets,omitempty"`
+
Labels *SelfLabels `json:"labels,omitempty"`
// PostView represents the full view of a post with all metadata
+
// Matches social.coves.community.post.get#postView lexicon
// Used in feeds and get endpoints
IndexedAt time.Time `json:"indexedAt"`