Documentation
¶
Index ¶
- func GetLanguageIcon(language string) string
- type BasicViewModel
- type HomeViewModel
- type ImprintViewModel
- type LeaderboardViewModel
- func (s *LeaderboardViewModel) ColorModifier(item *models.LeaderboardItemRanked, principal *models.User) string
- func (s *LeaderboardViewModel) LangIcon(lang string) string
- func (s *LeaderboardViewModel) LastUpdate() time.Time
- func (s *LeaderboardViewModel) WithError(m string) *LeaderboardViewModel
- func (s *LeaderboardViewModel) WithSuccess(m string) *LeaderboardViewModel
- type LoginViewModel
- type Messages
- type Newsbox
- type ProjectsViewModel
- type SetPasswordViewModel
- type SettingsVMCombinedAlias
- type SettingsVMCombinedLabel
- type SettingsViewModel
- type SharedLoggedInViewModel
- type SharedViewModel
- type ShopViewModel
- type SummaryViewModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLanguageIcon ¶
Types ¶
type BasicViewModel ¶
type HomeViewModel ¶
func (*HomeViewModel) WithError ¶
func (s *HomeViewModel) WithError(m string) *HomeViewModel
func (*HomeViewModel) WithSuccess ¶
func (s *HomeViewModel) WithSuccess(m string) *HomeViewModel
type ImprintViewModel ¶
type ImprintViewModel struct {
HtmlText string
}
func (*ImprintViewModel) WithError ¶
func (s *ImprintViewModel) WithError(m string) *ImprintViewModel
func (*ImprintViewModel) WithHtmlText ¶
func (s *ImprintViewModel) WithHtmlText(t string) *ImprintViewModel
func (*ImprintViewModel) WithSuccess ¶
func (s *ImprintViewModel) WithSuccess(m string) *ImprintViewModel
type LeaderboardViewModel ¶
type LeaderboardViewModel struct {
By string
Key string
Items []*models.LeaderboardItemRanked
TopKeys []string
UserLanguages map[string][]string
IntervalLabel string
PageParams *utils.PageParams
}
func (*LeaderboardViewModel) ColorModifier ¶
func (s *LeaderboardViewModel) ColorModifier(item *models.LeaderboardItemRanked, principal *models.User) string
func (*LeaderboardViewModel) LangIcon ¶
func (s *LeaderboardViewModel) LangIcon(lang string) string
func (*LeaderboardViewModel) LastUpdate ¶
func (s *LeaderboardViewModel) LastUpdate() time.Time
func (*LeaderboardViewModel) WithError ¶
func (s *LeaderboardViewModel) WithError(m string) *LeaderboardViewModel
func (*LeaderboardViewModel) WithSuccess ¶
func (s *LeaderboardViewModel) WithSuccess(m string) *LeaderboardViewModel
type LoginViewModel ¶
func (*LoginViewModel) WithError ¶
func (s *LoginViewModel) WithError(m string) *LoginViewModel
func (*LoginViewModel) WithSuccess ¶
func (s *LoginViewModel) WithSuccess(m string) *LoginViewModel
type Messages ¶
func (*Messages) SetSuccess ¶
type ProjectsViewModel ¶
type ProjectsViewModel struct {
Projects []*models.ProjectStats
PageParams *utils.PageParams
// contains filtered or unexported fields
}
func (*ProjectsViewModel) BackgroundIntensity ¶
func (s *ProjectsViewModel) BackgroundIntensity(idx int) string
func (*ProjectsViewModel) LangIcon ¶
func (s *ProjectsViewModel) LangIcon(lang string) string
func (*ProjectsViewModel) WithError ¶
func (s *ProjectsViewModel) WithError(m string) *ProjectsViewModel
func (*ProjectsViewModel) WithSuccess ¶
func (s *ProjectsViewModel) WithSuccess(m string) *ProjectsViewModel
type SetPasswordViewModel ¶
type SetPasswordViewModel struct {
LoginViewModel
Token string
}
type SettingsVMCombinedAlias ¶
type SettingsVMCombinedLabel ¶
type SettingsViewModel ¶
type SettingsViewModel struct {
LanguageMappings []*models.LanguageMapping
Aliases []*SettingsVMCombinedAlias
Labels []*SettingsVMCombinedLabel
Projects []string
SubscriptionPrice string
DataRetentionMonths int
UserFirstData time.Time
SupportContact string
InviteLink string
}
func (*SettingsViewModel) SubscriptionsEnabled ¶
func (s *SettingsViewModel) SubscriptionsEnabled() bool
func (*SettingsViewModel) WithError ¶
func (s *SettingsViewModel) WithError(m string) *SettingsViewModel
func (*SettingsViewModel) WithSuccess ¶
func (s *SettingsViewModel) WithSuccess(m string) *SettingsViewModel
type SharedLoggedInViewModel ¶
type SharedLoggedInViewModel struct {
}
type SharedViewModel ¶
type SharedViewModel struct {
}
func NewSharedViewModel ¶
func NewSharedViewModel(c *conf.Config, messages *Messages) SharedViewModel
type ShopViewModel ¶ added in v0.1.7
type ShopViewModel struct {
Products []*models.Product
PageParams *utils.PageParams
}
func (*ShopViewModel) LangIcon ¶ added in v0.1.7
func (s *ShopViewModel) LangIcon(lang string) string
func (*ShopViewModel) WithError ¶ added in v0.1.7
func (s *ShopViewModel) WithError(m string) *ShopViewModel
func (*ShopViewModel) WithSuccess ¶ added in v0.1.7
func (s *ShopViewModel) WithSuccess(m string) *ShopViewModel
type SummaryViewModel ¶
type SummaryViewModel struct {
*models.Summary
*models.SummaryParams
AvatarURL string
EditorColors map[string]string
LanguageColors map[string]string
OSColors map[string]string
RawQuery string
UserFirstData time.Time
DataRetentionMonths int
}
func (SummaryViewModel) UserDataExpiring ¶
func (s SummaryViewModel) UserDataExpiring() bool
func (*SummaryViewModel) WithError ¶
func (s *SummaryViewModel) WithError(m string) *SummaryViewModel
func (*SummaryViewModel) WithSuccess ¶
func (s *SummaryViewModel) WithSuccess(m string) *SummaryViewModel
Click to show internal directories.
Click to hide internal directories.