design

package
v0.0.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package design goa service DSL

Index

Constants

This section is empty.

Variables

View Source
var AnalyzedArticle = Type("AnalyzedArticle", func() {
	Description("Article summary for trend views.")
	Attribute("url", String, "Article URL")
	Attribute("title", String, "Article title")
	Attribute("rating", Float64, "Article rating")
	Attribute("authors", ArrayOf(String), "Article authors")
	Attribute("pub_date", String, "Publication date", func() {
		Format(FormatDateTime)
	})
	Required("url", "pub_date")
})
View Source
var AnalyzedItem = Type("AnalyzedItem", func() {
	Description("Full analyzed item.")
	Attribute("hash", String, "Item hash")
	Attribute("url", String, "Item URL")
	Attribute("title_original", String, "Original title")
	Attribute("description_original", String, "Original description")
	Attribute("title_corrected", String, "Corrected title")
	Attribute("title_correction_reason", String, "Why the title changed")
	Attribute("description_corrected", String, "Corrected description")
	Attribute("description_correction_reason", String, "Why the description changed")
	Attribute("framing", Float64, "Framing score")
	Attribute("framing_reason", String, "Framing explanation")
	Attribute("clickbait", Float64, "Clickbait score")
	Attribute("clickbait_reason", String, "Clickbait explanation")
	Attribute("persuasive", Float64, "Persuasiveness score")
	Attribute("persuasive_reason", String, "Persuasiveness explanation")
	Attribute("hyper_stimulus", Float64, "Hyper stimulus score")
	Attribute("hyper_stimulus_reason", String, "Hyper stimulus explanation")
	Attribute("speculative", Float64, "Speculative score")
	Attribute("speculative_reason", String, "Speculative explanation")
	Attribute("overall", Float64, "Overall score")
	Attribute("overall_reason", String, "Overall explanation")
	Attribute("category", String, "Article category")
	Attribute("sentiments", SentimentScores, "Original sentiments")
	Attribute("sentiments_deframed", SentimentScores, "Deframed sentiments")
	Attribute("media", MediaContent, "Media content")
	Attribute("rating", Float64, "Think rating")
	Attribute("authors", ArrayOf(String), "Authors")
	Attribute("pubDate", String, "Publication date", func() {
		Format(FormatDateTime)
	})
	Required("hash", "url", "rating", "pubDate", "authors")
})
View Source
var AnalyzedSiteItem = Type("AnalyzedSiteItem", func() {
	Description("Analyzed item for site listings.")
	Attribute("hash", String, "Item hash")
	Attribute("url", String, "Item URL")
	Attribute("title_original", String, "Original title")
	Attribute("description_original", String, "Original description")
	Attribute("title_corrected", String, "Corrected title")
	Attribute("title_correction_reason", String, "Why the title changed")
	Attribute("description_corrected", String, "Corrected description")
	Attribute("description_correction_reason", String, "Why the description changed")
	Attribute("framing", Float64, "Framing score")
	Attribute("framing_reason", String, "Framing explanation")
	Attribute("clickbait", Float64, "Clickbait score")
	Attribute("clickbait_reason", String, "Clickbait explanation")
	Attribute("persuasive", Float64, "Persuasiveness score")
	Attribute("persuasive_reason", String, "Persuasiveness explanation")
	Attribute("hyper_stimulus", Float64, "Hyper stimulus score")
	Attribute("hyper_stimulus_reason", String, "Hyper stimulus explanation")
	Attribute("speculative", Float64, "Speculative score")
	Attribute("speculative_reason", String, "Speculative explanation")
	Attribute("overall", Float64, "Overall score")
	Attribute("overall_reason", String, "Overall explanation")
	Attribute("category", String, "Article category")
	Attribute("media", MediaContent, "Media content")
	Attribute("rating", Float64, "Think rating")
	Attribute("authors", ArrayOf(String), "Authors")
	Attribute("pubDate", String, "Publication date", func() {
		Format(FormatDateTime)
	})
	Required("hash", "url", "rating", "pubDate", "authors")
})
View Source
var ArticlesPayload = Type("ArticlesPayload", func() {
	Description("List articles for a trend and domain.")
	Extend(BasicAuthPayload)
	Attribute("root", String, "Root domain")
	Attribute("term", String, "Trend term")
	Attribute("date", String, "Optional date", func() {
		Format(FormatDate)
	})
	Attribute("days", Int, "Lookback window in days", func() {
		Default(1)
		Minimum(1)
	})
	Attribute("offset", Int, "Result offset", func() {
		Default(0)
		Minimum(0)
	})
	Attribute("limit", Int, "Maximum results", func() {
		Default(20)
		Minimum(1)
	})
	Required("root", "term")
})
View Source
var BasicAuth = BasicAuthSecurity("basic")
View Source
var BasicAuthPayload = Type("BasicAuthPayload", func() {
	Description("HTTP basic auth credentials.")
	Username("user", String)
	Password("pass", String)
})
View Source
var ContextByDomainPayload = Type("ContextByDomainPayload", func() {
	Description("List context for a trend in a domain.")
	Extend(BasicAuthPayload)
	Attribute("term", String, "Trend term")
	Attribute("domain", String, "Root domain")
	Attribute("lang", String, "Language code")
	Attribute("days", Int, "Lookback window in days", func() {
		Default(1)
		Minimum(1)
	})
	Attribute("date", String, "Optional date", func() {
		Format(FormatDate)
	})
	Required("term", "domain", "lang")
})
View Source
var DomainComparison = Type("DomainComparison", func() {
	Description("Trend comparison between domains.")
	Attribute("classification", String, "Classification", func() {
		Enum("BLINDSPOT_A", "BLINDSPOT_B", "INTERSECT")
	})
	Attribute("rank_group", Int, "Rank group")
	Attribute("trend_topic", String, "Trending topic")
	Attribute("score_a", Float64, "Score A")
	Attribute("score_b", Float64, "Score B")
	Required("classification", "rank_group", "trend_topic", "score_a", "score_b")
})
View Source
var DomainComparisonPayload = Type("DomainComparisonPayload", func() {
	Description("Compare two domains for a trend.")
	Extend(BasicAuthPayload)
	Attribute("domain_a", String, "First domain")
	Attribute("domain_b", String, "Second domain")
	Attribute("lang", String, "Language code")
	Attribute("days", Int, "Lookback window in days", func() {
		Default(1)
		Minimum(1)
	})
	Attribute("date", String, "Optional date", func() {
		Format(FormatDate)
	})
	Required("domain_a", "domain_b", "lang")
})
View Source
var DomainEntry = Type("DomainEntry", func() {
	Description("Root domain entry.")
	Attribute("domain", String, "Root domain")
	Attribute("language", String, "Language code")
	Attribute("portal_url", String, "Portal URL", func() {
		Format(FormatURI)
	})
	Required("domain", "language")
})
View Source
var DomainsPayload = Type("DomainsPayload", func() {
	Description("List root domains.")
	Extend(BasicAuthPayload)
})
View Source
var HostnameResponse = Type("HostnameResponse", func() {
	Description("Current host name.")
	Attribute("hostname", String, "Machine hostname")
	Required("hostname")
})
View Source
var ItemPayload = Type("ItemPayload", func() {
	Description("Lookup an item by URL.")
	Extend(BasicAuthPayload)
	Attribute("url", String, "Item URL")
	Required("url")
})
View Source
var Lifecycle = Type("Lifecycle", func() {
	Description("Trend lifecycle sample.")
	Attribute("time_slice", String, "Time slice", func() {
		Format(FormatDateTime)
	})
	Attribute("frequency", Int64, "Frequency")
	Attribute("velocity", Int64, "Velocity")
	Required("time_slice", "frequency", "velocity")
})
View Source
var LifecycleByDomainPayload = Type("LifecycleByDomainPayload", func() {
	Description("List lifecycle data for a trend in a domain.")
	Extend(BasicAuthPayload)
	Attribute("term", String, "Trend term")
	Attribute("domain", String, "Root domain")
	Attribute("lang", String, "Language code")
	Attribute("days", Int, "Lookback window in days", func() {
		Default(1)
		Minimum(1)
	})
	Attribute("date", String, "Optional date", func() {
		Format(FormatDate)
	})
	Required("term", "domain", "lang")
})
View Source
var MediaContent = Type("MediaContent", func() {
	Description("Media attachment metadata.")
	Attribute("url", String, "Media URL")
	Attribute("type", String, "MIME type")
	Attribute("medium", String, "Media type")
	Attribute("height", Int, "Media height")
	Attribute("width", Int, "Media width")
	Attribute("title", String, "Media title")
	Attribute("description", String, "Media description")
	Attribute("thumbnail", MediaThumbnail, "Media thumbnail")
	Attribute("credit", String, "Media credit")
	Required("url")
})
View Source
var MediaThumbnail = Type("MediaThumbnail", func() {
	Description("Media thumbnail metadata.")
	Attribute("url", String, "Thumbnail URL")
	Attribute("height", Int, "Thumbnail height")
	Attribute("width", Int, "Thumbnail width")
	Required("url")
})
View Source
var SentimentItem = Type("SentimentItem", func() {
	Description("Trend sentiment pair.")
	Attribute("sentiments", SentimentScores, "Original sentiments")
	Attribute("sentiments_deframed", SentimentScores, "Deframed sentiments")
})
View Source
var SentimentScores = Type("SentimentScores", func() {
	Description("Sentiment score set.")
	Attribute("valence", Float64, "Valence score")
	Attribute("arousal", Float64, "Arousal score")
	Attribute("dominance", Float64, "Dominance score")
	Attribute("joy", Float64, "Joy score")
	Attribute("anger", Float64, "Anger score")
	Attribute("sadness", Float64, "Sadness score")
	Attribute("fear", Float64, "Fear score")
	Attribute("disgust", Float64, "Disgust score")
})
View Source
var SentimentsPayload = Type("SentimentsPayload", func() {
	Description("Get sentiments for a trend.")
	Extend(BasicAuthPayload)
	Attribute("root", String, "Root domain")
	Attribute("term", String, "Trend term")
	Attribute("date", String, "Optional date", func() {
		Format(FormatDate)
	})
	Attribute("days", Int, "Lookback window in days", func() {
		Default(1)
		Minimum(1)
	})
	Required("root", "term")
})
View Source
var SitePayload = Type("SitePayload", func() {
	Description("List items for a root domain.")
	Extend(BasicAuthPayload)
	Attribute("root", String, "Root domain")
	Attribute("max_score", Float64, "Maximum rating to include", func() {
		Default(0)
	})
	Required("root")
})
View Source
var ThinkResult = Type("ThinkResult", func() {
	Description("Analysis result for an article.")
	Attribute("title_original", String, "Original title")
	Attribute("description_original", String, "Original description")
	Attribute("title_corrected", String, "Corrected title")
	Attribute("title_correction_reason", String, "Why the title changed")
	Attribute("description_corrected", String, "Corrected description")
	Attribute("description_correction_reason", String, "Why the description changed")
	Attribute("framing", Float64, "Framing score")
	Attribute("framing_reason", String, "Framing explanation")
	Attribute("clickbait", Float64, "Clickbait score")
	Attribute("clickbait_reason", String, "Clickbait explanation")
	Attribute("persuasive", Float64, "Persuasiveness score")
	Attribute("persuasive_reason", String, "Persuasiveness explanation")
	Attribute("hyper_stimulus", Float64, "Hyper stimulus score")
	Attribute("hyper_stimulus_reason", String, "Hyper stimulus explanation")
	Attribute("speculative", Float64, "Speculative score")
	Attribute("speculative_reason", String, "Speculative explanation")
	Attribute("overall", Float64, "Overall score")
	Attribute("overall_reason", String, "Overall explanation")
	Attribute("category", String, "Article category")
})
View Source
var TopTrendsByDomainPayload = Type("TopTrendsByDomainPayload", func() {
	Description("List top trends for a domain.")
	Extend(BasicAuthPayload)
	Attribute("domain", String, "Root domain")
	Attribute("lang", String, "Language code")
	Attribute("days", Int, "Lookback window in days", func() {
		Default(1)
		Minimum(1)
	})
	Attribute("date", String, "Optional date", func() {
		Format(FormatDate)
	})
	Required("domain", "lang")
})
View Source
var TrendContext = Type("TrendContext", func() {
	Description("Context term for a trend.")
	Attribute("context", String, "Context word")
	Attribute("frequency", Int64, "Frequency")
	Required("context", "frequency")
})
View Source
var TrendMetric = Type("TrendMetric", func() {
	Description("Trending term metric.")
	Attribute("trend_topic", String, "Trending topic")
	Attribute("frequency", Int64, "Frequency")
	Attribute("utility", Int64, "Utility")
	Attribute("outlier_ratio", Float64, "Outlier ratio")
	Attribute("time_slice", String, "Time slice", func() {
		Format(FormatDateTime)
	})
	Required("trend_topic", "frequency", "utility", "outlier_ratio", "time_slice")
})

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL