Documentation
¶
Index ¶
- func ClearPendingUpdate() error
- func CompareVersions(v1, v2 Version) int
- func ExtractVersionFromFolder(folder string) (string, error)
- func GetConfigServ() *service.Config
- func InstallService()
- func MonitorConnection(server string, timeSleep time.Duration, maxAttempts int, hasConnection *bool)
- func PollAndUpdateAdminEmail(instanceConf InstanceConfig)
- func RegisterInstance() error
- func RunService()
- func SavePendingUpdate(update PendingUpdate) error
- func SaveVersion(vers, edition, changelog string) error
- func SortVersions(versions []map[string]string) []map[string]string
- func StartHeartbeat(instanceConf InstanceConfig)
- func StartUsageReporting(instanceConf InstanceConfig)
- func UninstallService()
- type Auth
- type InstanceConfig
- type InstanceDTOInput
- type InstanceDTOOutput
- type InstanceInfo
- type LicenseEncrypted
- type PendingUpdate
- type UpdateDTO
- type UpdaterClient
- type Version
- type VersionDTO
- type VersionFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearPendingUpdate ¶
func ClearPendingUpdate() error
func CompareVersions ¶
func GetConfigServ ¶
func InstallService ¶
func InstallService()
func MonitorConnection ¶
func PollAndUpdateAdminEmail ¶
func PollAndUpdateAdminEmail(instanceConf InstanceConfig)
PollAndUpdateAdminEmail polls for admin email and updates instance details
func RegisterInstance ¶
func RegisterInstance() error
func RunService ¶
func RunService()
func SavePendingUpdate ¶
func SavePendingUpdate(update PendingUpdate) error
func SaveVersion ¶
func StartHeartbeat ¶
func StartHeartbeat(instanceConf InstanceConfig)
StartHeartbeat sends heartbeat to CM every minute
func StartUsageReporting ¶
func StartUsageReporting(instanceConf InstanceConfig)
func UninstallService ¶
func UninstallService()
Types ¶
type InstanceConfig ¶
type InstanceDTOInput ¶
type InstanceDTOInput struct {
Name string `json:"name"`
Country string `json:"country"`
Email string `json:"email"`
Version string `json:"version"`
Edition string `json:"edition"`
CurrentIp string `json:"current_ip"`
MappingName string `json:"mapping_name,omitempty"`
Tags string `json:"tags"`
ProductSlug string `json:"product_slug,omitempty"`
}
type InstanceDTOOutput ¶
type InstanceDTOOutput struct {
ID string `json:"id"`
InstanceDTOInput
CreatedAt string `json:"created_at"`
}
type InstanceInfo ¶
type LicenseEncrypted ¶
type PendingUpdate ¶
type PendingUpdate struct {
ID string `json:"id"`
Version string `json:"version"`
Edition string `json:"edition"`
Changelog string `json:"changelog"`
UpdateLocks string `json:"update_locks"`
}
func GetPendingUpdate ¶
func GetPendingUpdate() (*PendingUpdate, error)
type UpdateDTO ¶
type UpdateDTO struct {
ID string `json:"id"`
Instance InstanceDTOInput `json:"instance,omitempty"`
Version VersionDTO `json:"version"`
Edition string `json:"edition"`
Sent bool `json:"sent"`
Approved bool `json:"approved"`
ApproveAt time.Time `json:"aprove_at,omitempty"`
UpdateLocks string `json:"update_locks,omitempty"`
}
type UpdaterClient ¶
type UpdaterClient struct {
Config InstanceConfig
License string
}
func GetUpdaterClient ¶
func GetUpdaterClient() *UpdaterClient
func (*UpdaterClient) CheckLicense ¶
func (c *UpdaterClient) CheckLicense() error
func (*UpdaterClient) CheckUpdate ¶
func (c *UpdaterClient) CheckUpdate() error
func (*UpdaterClient) LicenseProcess ¶
func (c *UpdaterClient) LicenseProcess()
func (*UpdaterClient) MarkUpdateSent ¶
func (c *UpdaterClient) MarkUpdateSent(updateId string) error
func (*UpdaterClient) UpdateInstaller ¶
func (c *UpdaterClient) UpdateInstaller(version string) error
func (*UpdaterClient) UpdateProcess ¶
func (c *UpdaterClient) UpdateProcess()
type Version ¶
type Version struct {
Major int
Minor int
Patch int
PrereleaseName string // alpha, beta, rc, or empty
PrereleaseNum int // the number after alpha.X, beta.X, rc.X
Original string
}
Version sorting functions
func ParseVersion ¶
type VersionDTO ¶
type VersionFile ¶
type VersionFile struct {
Version string `json:"version"`
Changelog string `json:"changelog"`
Edition string `json:"edition"`
}
func GetVersion ¶
func GetVersion() (VersionFile, error)
Click to show internal directories.
Click to hide internal directories.