Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrSkip = errors.New("broadcast skipped") ErrSkipDoesNotMatch = fmt.Errorf("%w: does not match", ErrSkip) ErrSkipAlreadyActive = fmt.Errorf("%w: already active", ErrSkip) ErrSkipAlreadyShown = fmt.Errorf("%w: already shown", ErrSkip) ErrSkipRemovedByMismatch = fmt.Errorf("%w: removed due to mismatch", ErrSkip) ErrSkipRemovedBySource = fmt.Errorf("%w: removed by source", ErrSkip) )
Errors.
Functions ¶
func MakeNumericVersion ¶
MakeNumericVersion makes a numeric version with the first three version segment always using three digits.
Types ¶
type BroadcastNotification ¶
type BroadcastNotification struct { *notifications.Notification // Match holds a query string that needs to match the local matching data in // order for the broadcast to be displayed. Match string // AttachToModule signifies if the broadcast notification should be attached to the module. AttachToModule bool // Remove signifies that the broadcast should be canceled and its state removed. Remove bool // Permanent signifies that the broadcast cannot be acknowledge by the user // and remains in the UI indefinitely. Permanent bool // Repeat specifies a duration after which the broadcast should be shown again. Repeat string // contains filtered or unexported fields }
BroadcastNotification is a single broadcast notification.
type BroadcastNotifications ¶
type BroadcastNotifications struct {
Notifications map[string]*BroadcastNotification
}
BroadcastNotifications holds the data structure of the broadcast notifications update file.
type BroadcastState ¶
BroadcastState holds state for a single broadcast notifications.
type BroadcastStates ¶
BroadcastStates holds states for broadcast notifications.
type DataError ¶
type DataError struct {
Error error
}
DataError represents an error getting some matching data.
type InstallInfo ¶
type InstallInfo struct { record.Base sync.Mutex Version string NumericVersion int64 Time time.Time NumericDate int64 DaysSinceInstall int64 UnixTimestamp int64 }
InstallInfo holds generic info about the install.
func GetInstallInfo ¶
func GetInstallInfo() (*InstallInfo, error)
GetInstallInfo returns the install info from the database.
type Location ¶
type Location struct { Country string Coordinates geoip.Coordinates ASN uint ASOrg string Source netenv.DeviceLocationSource SourceAccuracy int }
Location holds location matching data.
Click to show internal directories.
Click to hide internal directories.