Versions in this module Expand all Collapse all v0 v0.1.7 Sep 17, 2024 Changes in this version + type Product struct + Description string + ID uint + Image string + Name string + Price int + SmallName string + Stock int + func (p *Product) IsValid() bool + type ProductLabelReverseResolver func(l string) []string v0.1.6 Sep 11, 2024 v0.1.5 Sep 11, 2024 v0.1.4 Sep 11, 2024 Changes in this version + const AuthCookieKey + const DefaultHeartbeatsTimeout + const DefaultProjectLabel + const EmailAddrPattern + const HtmlType + const ImprintKey + const MailPattern + const MaxHeartbeatsTimeout + const MinHeartbeatsTimeout + const NSummaryTypes + const PersistentIntervalKey + const PlainType + const SummaryBranch + const SummaryCategory + const SummaryEditor + const SummaryEntity + const SummaryLabel + const SummaryLanguage + const SummaryMachine + const SummaryOS + const SummaryProject + const SummaryUnknown + const UnknownSummaryKey + const UserKey + var AllIntervals = []*IntervalKey + var IntervalAny = &IntervalKey + var IntervalLastMonth = &IntervalKey + var IntervalLastWeek = &IntervalKey + var IntervalPast12Months = &IntervalKey + var IntervalPast14Days = &IntervalKey + var IntervalPast30Days = &IntervalKey + var IntervalPast6Months = &IntervalKey + var IntervalPast7Days = &IntervalKey + var IntervalPast7DaysYesterday = &IntervalKey + var IntervalPastDay = &IntervalKey + var IntervalThisMonth = &IntervalKey + var IntervalThisWeek = &IntervalKey + var IntervalThisYear = &IntervalKey + var IntervalToday = &IntervalKey + var IntervalYesterday = &IntervalKey + func GetEntityColumn(t uint8) string + func NativeSummaryTypes() []uint8 + func PersistedSummaryTypes() []uint8 + func SummaryTypes() []uint8 + func ValidateCaptcha(captchaId, captchaValue string) bool + func ValidateEmail(email string) bool + func ValidatePassword(password string) bool + func ValidateTimezone(tz string) bool + func ValidateUsername(username string) bool + type Alias struct + ID uint + Key string + Type uint8 + User *User + UserID string + Value string + func (a *Alias) IsValid() bool + type AliasResolver func(t uint8, k string) string + type AliasReverseResolver func(t uint8, k string) []string + type CountByUser struct + Count int64 + User string + type CredentialsReset struct + PasswordNew string + PasswordOld string + PasswordRepeat string + func (c *CredentialsReset) IsValid() bool + type CustomTime time.Time + func (j *CustomTime) Hash() (uint64, error) + func (j *CustomTime) MarshalJSON() ([]byte, error) + func (j *CustomTime) Scan(value interface{}) error + func (j *CustomTime) UnmarshalJSON(b []byte) error + func (j CustomTime) GormDBDataType(db *gorm.DB, field *schema.Field) string + func (j CustomTime) String() string + func (j CustomTime) T() time.Time + func (j CustomTime) Valid() bool + func (j CustomTime) Value() (driver.Value, error) + type Diagnostics struct + Architecture string + CliVersion string + ID uint + Logs string + Platform string + Plugin string + StackTrace string + type Duration struct + Branch string + Category string + Duration time.Duration + Editor string + Entity string + GroupHash string + Language string + Machine string + NumHeartbeats int + OperatingSystem string + Project string + Time CustomTime + UserID string + func NewDurationFromHeartbeat(h *Heartbeat) *Duration + func (d *Duration) GetKey(t uint8) (key string) + func (d *Duration) HashInclude(field string, v interface{}) (bool, error) + func (d *Duration) Hashed() *Duration + func (d *Duration) WithEntityIgnored() *Duration + type Durations []*Duration + func (d *Durations) First() *Duration + func (d *Durations) Last() *Duration + func (d Durations) Len() int + func (d Durations) Less(i, j int) bool + func (d Durations) Sorted() Durations + func (d Durations) Swap(i, j int) + func (d Durations) TotalNumHeartbeats() int + type FilterElement struct + Entity uint8 + Filter OrFilter + type Filters struct + Branch OrFilter + Category OrFilter + Editor OrFilter + Entity OrFilter + Label OrFilter + Language OrFilter + Machine OrFilter + OS OrFilter + Project OrFilter + SelectFilteredOnly bool + func NewFilterWithMultiple(entity uint8, keys []string) *Filters + func NewFiltersWith(entity uint8, key string) *Filters + func (f *Filters) Count() int + func (f *Filters) CountByType(entity uint8) int + func (f *Filters) CountDistinctTypes() int + func (f *Filters) EntityCount() int + func (f *Filters) Hash() string + func (f *Filters) IsEmpty() bool + func (f *Filters) IsProjectDetails() bool + func (f *Filters) MatchDuration(d *Duration) bool + func (f *Filters) MatchHeartbeat(h *Heartbeat) bool + func (f *Filters) One() (bool, uint8, OrFilter) + func (f *Filters) OneOrEmpty() FilterElement + func (f *Filters) ResolveType(entityId uint8) *OrFilter + func (f *Filters) With(entity uint8, key string) *Filters + func (f *Filters) WithAliases(resolve AliasReverseResolver) *Filters + func (f *Filters) WithMultiple(entity uint8, keys []string) *Filters + func (f *Filters) WithProjectLabels(resolve ProjectLabelReverseResolver) *Filters + func (f *Filters) WithSelectFilteredOnly() *Filters + type Heartbeat struct + Branch string + Category string + CreatedAt CustomTime + Editor string + Entity string + Hash string + ID uint64 + IsWrite bool + Language string + Machine string + OperatingSystem string + Origin string + OriginId string + Project string + Time CustomTime + Type string + User *User + UserAgent string + UserID string + func (h *Heartbeat) Augment(languageMappings map[string]string) + func (h *Heartbeat) GetKey(t uint8) (key string) + func (h *Heartbeat) Hashed() *Heartbeat + func (h *Heartbeat) Sanitize() *Heartbeat + func (h *Heartbeat) String() string + func (h *Heartbeat) Timely(maxAge time.Duration) bool + func (h *Heartbeat) Valid() bool + type Heartbeats []*Heartbeat + func (h *Heartbeats) First() *Heartbeat + func (h *Heartbeats) Last() *Heartbeat + func (h *Heartbeats) Sorted() *Heartbeats + func (h Heartbeats) Len() int + func (h Heartbeats) Less(i, j int) bool + func (h Heartbeats) Swap(i, j int) + type Interval struct + End time.Time + Start time.Time + type IntervalKey []string + func (k *IntervalKey) GetHumanReadable() string + func (k *IntervalKey) HasAlias(s string) bool + type KeyStringValue struct + Key string + Value string + type KeyedInterval struct + Key *IntervalKey + type LanguageMapping struct + Extension string + ID uint + Language string + User *User + UserID string + func (m *LanguageMapping) IsValid() bool + type Leaderboard []*LeaderboardItemRanked + func (l *Leaderboard) Add(item *LeaderboardItemRanked) + func (l *Leaderboard) AddMany(items []*LeaderboardItemRanked) + func (l *Leaderboard) FilterEmpty() + func (l Leaderboard) GetByUser(userId string) *Leaderboard + func (l Leaderboard) HasUser(userId string) bool + func (l Leaderboard) LastUpdate() time.Time + func (l Leaderboard) TopByKey(by uint8, key string) Leaderboard + func (l Leaderboard) TopKeys(by uint8) []string + func (l Leaderboard) TopKeysByUser(by uint8, userId string) []string + func (l Leaderboard) TopKeysTotals(by uint8) []LeaderboardKeyTotal + func (l Leaderboard) TopKeysTotalsByUser(by uint8, userId string) []LeaderboardKeyTotal + func (l Leaderboard) UserIDs() []string + type LeaderboardItem struct + By *uint8 + CreatedAt CustomTime + ID uint + Interval string + Key *string + Total time.Duration + User *User + UserID string + type LeaderboardItemRanked struct + Rank uint + func (l1 *LeaderboardItemRanked) Equals(l2 *LeaderboardItemRanked) bool + type LeaderboardKeyTotal struct + Key string + Total time.Duration + type Login struct + Password string + Username string + type Mail struct + Body string + Date time.Time + From MailAddress + MessageID string + Subject string + To MailAddresses + Type string + func (m *Mail) Reader() *strings.Reader + func (m *Mail) Sanitized() *Mail + func (m *Mail) String() string + func (m *Mail) WithHTML(html string) *Mail + func (m *Mail) WithText(text string) *Mail + type MailAddress string + func (m MailAddress) Domain() string + func (m MailAddress) Raw() string + func (m MailAddress) String() string + func (m MailAddress) Valid() bool + type MailAddresses []MailAddress + func (m MailAddresses) AllValid() bool + func (m MailAddresses) RawStrings() []string + func (m MailAddresses) Strings() []string + type OrFilter []string + func (f OrFilter) Exists() bool + func (f OrFilter) MatchAny(search string) bool + type ProjectLabel struct + ID uint + Label string + ProjectKey string + User *User + UserID string + func (l *ProjectLabel) IsValid() bool + type ProjectLabelReverseResolver func(l string) []string + type ProjectStats struct + Count int64 + First CustomTime + Last CustomTime + Project string + TopLanguage string + UserId string + type Report struct + DailySummaries []*Summary + From time.Time + Summary *Summary + To time.Time + User *User + type ResetPasswordRequest struct + Email string + type SetPasswordRequest struct + Password string + PasswordRepeat string + Token string + func (c *SetPasswordRequest) IsValid() bool + type Signup struct + Captcha string + CaptchaId string + Email string + InviteCode string + InvitedBy string + Location string + Password string + PasswordRepeat string + Username string + func (s *Signup) IsValid() bool + type Summaries []*Summary + func (s Summaries) Len() int + func (s Summaries) Less(i, j int) bool + func (s Summaries) MaxTotalTime() time.Duration + func (s Summaries) Swap(i, j int) + type Summary struct + Branches SummaryItems + Categories SummaryItems + Editors SummaryItems + Entities SummaryItems + FromTime CustomTime + ID uint + Labels SummaryItems + Languages SummaryItems + Machines SummaryItems + NumHeartbeats int + OperatingSystems SummaryItems + Projects SummaryItems + ToTime CustomTime + User *User + UserID string + func NewEmptySummary() *Summary + func (s *Summary) ApplyFilter(filter FilterElement) *Summary + func (s *Summary) FillBy(fromType uint8, toType uint8) + func (s *Summary) FillMissing() + func (s *Summary) GetByType(summaryType uint8) *SummaryItems + func (s *Summary) KeepOnly(types map[uint8]bool) *Summary + func (s *Summary) MappedItems() map[uint8]*SummaryItems + func (s *Summary) MaxBy(entityType uint8) *SummaryItem + func (s *Summary) MaxByToString(entityType uint8) string + func (s *Summary) SetByType(summaryType uint8, items *SummaryItems) + func (s *Summary) Sorted() *Summary + func (s *Summary) TotalTime() time.Duration + func (s *Summary) TotalTimeBy(entityType uint8) (timeSum time.Duration) + func (s *Summary) TotalTimeByFilter(filter FilterElement) time.Duration + func (s *Summary) TotalTimeByKey(entityType uint8, key string) (timeSum time.Duration) + func (s *Summary) Types() []uint8 + func (s *Summary) WithResolvedAliases(resolve AliasResolver) *Summary + type SummaryItem struct + ID uint64 + Key string + Summary *Summary + SummaryID uint + Total time.Duration + Type uint8 + func (s *SummaryItem) TotalFixed() time.Duration + type SummaryItemContainer struct + Items []*SummaryItem + Type uint8 + type SummaryItems []*SummaryItem + func (s SummaryItems) Len() int + func (s SummaryItems) Less(i, j int) bool + func (s SummaryItems) Swap(i, j int) + type SummaryParams struct + Filters *Filters + From time.Time + Recompute bool + To time.Time + User *User + func (s *SummaryParams) GetProjectFilter() string + func (s *SummaryParams) HasFilters() bool + func (s *SummaryParams) IsProjectDetails() bool + type TimeByUser struct + Time CustomTime + User string + type User struct + ApiKey string + CreatedAt CustomTime + Email string + ExcludeUnknownProjects bool + HasData bool + HeartbeatsTimeoutSec int + ID string + InvitedBy string + IsAdmin bool + LastLoggedInAt CustomTime + Location string + Password string + PublicLeaderboard bool + ReportsWeekly bool + ResetToken string + ShareDataMaxDays int + ShareEditors bool + ShareLabels bool + ShareLanguages bool + ShareMachines bool + ShareOSs bool + ShareProjects bool + StripeCustomerId string + SubscribedUntil *CustomTime + SubscriptionRenewal *CustomTime + WakatimeApiKey string + WakatimeApiUrl string + func (u *User) AnyDataShared() bool + func (u *User) AvatarURL(urlTemplate string) string + func (u *User) HasActiveSubscription() bool + func (u *User) HasActiveSubscriptionStrict() bool + func (u *User) HeartbeatsTimeout() time.Duration + func (u *User) Identity() string + func (u *User) MinDataAge() time.Time + func (u *User) SubscriptionExpiredSince() (bool, time.Duration) + func (u *User) TZ() *time.Location + func (u *User) TZOffset() time.Duration + func (u *User) WakaTimeURL(fallback string) string + type UserDataUpdate struct + Email string + Location string + PublicLeaderboard bool + ReportsWeekly bool + func (r *UserDataUpdate) IsValid() bool