Documentation
¶
Index ¶
- type Addon
- type AddonData
- type AnnualSponsorship
- type FlexibleString
- type GitHubSponsorship
- type InvoicedSponsorship
- type Message
- type MessageType
- type Messages
- type Notifications
- type Remote
- type RemoteConfig
- type RemoteConfigData
- type RemoteConfigStorage
- type SponsorshipCurrentGoal
- type SponsorshipData
- type SponsorshipGoal
- type SponsorshipGoalItem
- type SponsorshipHistoryEntry
- type SponsorshipManager
- type Ticker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Addon ¶ added in v1.25.0
type Addon struct {
Title string `json:"title"`
GitHubURL string `json:"github_url"`
Description string `json:"description"`
User string `json:"user"`
Repo string `json:"repo"`
RepoID int `json:"repo_id"`
DefaultBranch string `json:"default_branch"`
TagName FlexibleString `json:"tag_name"`
DdevVersionConstraint string `json:"ddev_version_constraint"`
Dependencies []string `json:"dependencies"`
Type string `json:"type"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
WorkflowStatus string `json:"workflow_status"`
Stars int `json:"stars"`
}
Addon represents a single DDEV add-on from the registry
type AddonData ¶ added in v1.25.0
type AddonData struct {
UpdatedDateTime time.Time `json:"updated_datetime"`
TotalAddonsCount int `json:"total_addons_count"`
OfficialAddonsCount int `json:"official_addons_count"`
ContribAddonsCount int `json:"contrib_addons_count"`
Addons []Addon `json:"addons"`
}
AddonData represents the complete add-on registry from addons.ddev.com
type AnnualSponsorship ¶ added in v1.24.8
type AnnualSponsorship struct {
TotalAnnualSponsorships int `json:"total_annual_sponsorships"`
TotalSponsors int `json:"total_sponsors"`
MonthlyEquivalentSponsorship int `json:"monthly_equivalent_sponsorship"`
AnnualSponsorsPerTier map[string]int `json:"annual_sponsors_per_tier"`
}
AnnualSponsorship represents annual sponsorship data
type FlexibleString ¶ added in v1.25.0
FlexibleString is a custom type that can unmarshal from string, number, or null
func (FlexibleString) MarshalJSON ¶ added in v1.25.0
func (fs FlexibleString) MarshalJSON() ([]byte, error)
MarshalJSON implements custom marshaling for FlexibleString
func (*FlexibleString) UnmarshalJSON ¶ added in v1.25.0
func (fs *FlexibleString) UnmarshalJSON(data []byte) error
UnmarshalJSON implements custom unmarshaling for FlexibleString
type GitHubSponsorship ¶ added in v1.24.8
type GitHubSponsorship struct {
TotalMonthlySponsorship int `json:"total_monthly_sponsorship"`
TotalSponsors int `json:"total_sponsors"`
SponsorsPerTier map[string]int `json:"sponsors_per_tier"`
}
GitHubSponsorship represents GitHub sponsorship data
type InvoicedSponsorship ¶ added in v1.24.8
type InvoicedSponsorship struct {
TotalMonthlySponsorship int `json:"total_monthly_sponsorship"`
TotalSponsors int `json:"total_sponsors"`
MonthlySponsorsPerTier map[string]int `json:"monthly_sponsors_per_tier"`
}
InvoicedSponsorship represents monthly invoiced sponsorship data
type Message ¶ added in v1.24.8
type Message struct {
Message string `json:"message"`
Title string `json:"title,omitempty"`
Conditions []string `json:"conditions,omitempty"`
Versions string `json:"versions,omitempty"`
}
Message represents a single message
type Messages ¶ added in v1.24.8
type Messages struct {
Notifications Notifications `json:"notifications"`
Ticker Ticker `json:"ticker"`
}
Messages represents the messages configuration
type Notifications ¶ added in v1.24.8
type Notifications struct {
Interval int `json:"interval"`
Infos []Message `json:"infos"`
Warnings []Message `json:"warnings"`
}
Notifications represents notification messages
type Remote ¶ added in v1.24.8
type Remote struct {
Owner string `json:"owner,omitempty"`
Repo string `json:"repo,omitempty"`
Ref string `json:"ref,omitempty"`
Filepath string `json:"filepath,omitempty"`
}
Remote represents the remote source configuration
type RemoteConfig ¶
type RemoteConfig interface {
ShowNotifications()
ShowTicker()
ShowSponsorshipAppreciation()
}
RemoteConfig interface for displaying remote config data
type RemoteConfigData ¶ added in v1.24.8
type RemoteConfigData struct {
UpdateInterval int `json:"update-interval,omitempty"`
Remote Remote `json:"remote,omitempty"`
Messages Messages `json:"messages,omitempty"`
}
RemoteConfigData represents the remote config structure
type RemoteConfigStorage ¶
type RemoteConfigStorage interface {
Read() (RemoteConfigData, error)
Write(RemoteConfigData) error
}
type SponsorshipCurrentGoal ¶ added in v1.24.8
type SponsorshipCurrentGoal struct {
GoalID string `json:"goal_id"`
TargetAmount float64 `json:"target_amount"`
ProgressPercentage float64 `json:"progress_percentage"`
}
SponsorshipCurrentGoal represents the current active goal
type SponsorshipData ¶ added in v1.24.8
type SponsorshipData struct {
GitHubDDEVSponsorships GitHubSponsorship `json:"github_ddev_sponsorships"`
GitHubRfaySponsorships GitHubSponsorship `json:"github_rfay_sponsorships"`
MonthlyInvoicedSponsorships InvoicedSponsorship `json:"monthly_invoiced_sponsorships"`
AnnualInvoicedSponsorships AnnualSponsorship `json:"annual_invoiced_sponsorships"`
PaypalSponsorships int `json:"paypal_sponsorships"`
TotalMonthlyAverageIncome float64 `json:"total_monthly_average_income"`
SponsorshipGoals []SponsorshipGoalItem `json:"sponsorship_goals"`
CurrentGoal SponsorshipCurrentGoal `json:"current_goal"`
AppreciationMessageTemplate string `json:"appreciation_message_template"`
AppreciationMessage string `json:"appreciation_message"`
HistoricalData map[string]interface{} `json:"historical_data"`
MonthlyHistoricalData map[string]SponsorshipHistoryEntry `json:"monthly_historical_data"`
UpdatedDateTime time.Time `json:"updated_datetime"`
}
SponsorshipData represents the structure of the sponsorship data JSON
type SponsorshipGoal ¶ added in v1.24.8
type SponsorshipGoal struct {
GoalAmount float64 `json:"goal_amount"`
GoalTitle string `json:"goal_title"`
GoalURL string `json:"goal_url"`
}
SponsorshipGoal represents the sponsorship goal and progress
type SponsorshipGoalItem ¶ added in v1.24.8
type SponsorshipGoalItem struct {
GoalID string `json:"goal_id"`
Description string `json:"description"`
TargetAmount float64 `json:"target_amount"`
GoalCreationDate string `json:"goal_creation_date"`
GoalTargetDate string `json:"goal_target_date"`
Status string `json:"status"`
}
SponsorshipGoalItem represents a single sponsorship goal
type SponsorshipHistoryEntry ¶ added in v1.24.8
type SponsorshipHistoryEntry struct {
Date string `json:"date"`
TotalMonthlyAverageIncome float64 `json:"total_monthly_average_income"`
}
SponsorshipHistoryEntry represents a single entry in the sponsorship history
type SponsorshipManager ¶ added in v1.24.8
type SponsorshipManager interface {
GetSponsorshipData() (*SponsorshipData, error)
GetTotalMonthlyIncome() float64
GetTotalSponsors() int
IsDataStale() bool
}
SponsorshipManager defines the interface for managing sponsorship data