Documentation ¶
Index ¶
- Constants
- func AutoUpdateChannel() string
- func GoUpdateActivityWrap(update ActivityUpdate, debugStr string)
- func IsAllowedRenderer(renderer string) bool
- func IsAutoUpdateEnabled() bool
- func IsTelemetryEnabled() bool
- func MarkActivityAsUploaded(ctx context.Context, activityArr []*ActivityType) error
- func UpdateActivity(ctx context.Context, update ActivityUpdate) error
- type ActivityType
- type ActivityUpdate
- type TelemetryData
Constants ¶
View Source
const MaxTzNameLen = 50
Variables ¶
This section is empty.
Functions ¶
func AutoUpdateChannel ¶
func AutoUpdateChannel() string
func GoUpdateActivityWrap ¶
func GoUpdateActivityWrap(update ActivityUpdate, debugStr string)
Wraps UpdateCurrentActivity, spawns goroutine, and logs errors
func IsAllowedRenderer ¶
func IsAutoUpdateEnabled ¶
func IsAutoUpdateEnabled() bool
func IsTelemetryEnabled ¶
func IsTelemetryEnabled() bool
func MarkActivityAsUploaded ¶
func MarkActivityAsUploaded(ctx context.Context, activityArr []*ActivityType) error
func UpdateActivity ¶
func UpdateActivity(ctx context.Context, update ActivityUpdate) error
Types ¶
type ActivityType ¶
type ActivityType struct { Day string `json:"day"` Uploaded bool `json:"-"` TData TelemetryData `json:"tdata"` TzName string `json:"tzname"` TzOffset int `json:"tzoffset"` ClientVersion string `json:"clientversion"` ClientArch string `json:"clientarch"` BuildTime string `json:"buildtime"` OSRelease string `json:"osrelease"` }
func GetNonUploadedActivity ¶
func GetNonUploadedActivity(ctx context.Context) ([]*ActivityType, error)
type ActivityUpdate ¶
type TelemetryData ¶
type TelemetryData struct { ActiveMinutes int `json:"activeminutes"` FgMinutes int `json:"fgminutes"` OpenMinutes int `json:"openminutes"` NumTabs int `json:"numtabs"` NewTab int `json:"newtab"` NumStartup int `json:"numstartup,omitempty"` NumShutdown int `json:"numshutdown,omitempty"` Renderers map[string]int `json:"renderers,omitempty"` }
func (*TelemetryData) Scan ¶
func (tdata *TelemetryData) Scan(val interface{}) error
Click to show internal directories.
Click to hide internal directories.