types

package
v1.24.10 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 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 MessageType

type MessageType int
const (
	Info MessageType = iota
	Warning
)

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

type Ticker added in v1.24.8

type Ticker struct {
	Interval int       `json:"interval"`
	Messages []Message `json:"messages"`
}

Ticker represents ticker messages

Jump to

Keyboard shortcuts

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