settings

package
Version: v2.0.0-...-a70d572 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 19, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoUpdateSystemGEOLocation

func AutoUpdateSystemGEOLocation() error

AutoUpdateSystemGEOLocation updates system location based on the ip

func GetAnalytics

func GetAnalytics() (*settingsML.AnalyticsConfig, error)

GetAnalytics returns analytics data

func GetBackupLocations

func GetBackupLocations() (*settingsML.BackupLocations, error)

GetBackupLocations returns locations set by user

func GetByID

func GetByID(ID string) (*settingsML.Settings, error)

GetByID returns a item

func GetGeoLocation

func GetGeoLocation() (*settingsML.GeoLocation, error)

GetGeoLocation returns configured latitude and longitude settings to calculate sunrise and sunset

func GetSystemJobs

func GetSystemJobs() (*settingsML.SystemJobsSettings, error)

GetSystemJobs details

func GetSystemSettings

func GetSystemSettings() (*settingsML.SystemSettings, error)

GetSystemSettings returns system settings data

func List

func List(filters []stgType.Filter, pagination *stgType.Pagination) (*stgType.Result, error)

List by filter and pagination

func Save

func Save(settings *settingsML.Settings) error

Save a setting details

func UpdateGeoLocation

func UpdateGeoLocation(location *settingsML.GeoLocation) error

UpdateGeoLocation updates the location details

func UpdateSettings

func UpdateSettings(settings *settingsML.Settings) error

UpdateSettings config into disk

func UpdateSystemSettings

func UpdateSystemSettings(settings *settingsML.Settings) error

UpdateSystemSettings config into disk

Types

type GeoLocationAPIResponse

type GeoLocationAPIResponse struct {
	IP       string `json:"ip"`
	City     string `json:"city"`
	Region   string `json:"region"`
	Country  string `json:"country"`
	Location string `json:"loc"`
	Org      string `json:"org"`
	Postal   string `json:"postal"`
	Timezone string `json:"timezone"`
}

func GetLocation

func GetLocation() (*GeoLocationAPIResponse, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL