settings

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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"`
}

type SettingsAPI

type SettingsAPI struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, logger *zap.Logger, storage storageTY.Plugin, enc *encryptionAPI.Encryption, bus busTY.Plugin) *SettingsAPI

func (*SettingsAPI) AutoUpdateSystemGEOLocation

func (s *SettingsAPI) AutoUpdateSystemGEOLocation() error

AutoUpdateSystemGEOLocation updates system location based on the ip

func (*SettingsAPI) GetBackupLocations

func (s *SettingsAPI) GetBackupLocations() (*settingsTY.BackupLocations, error)

GetBackupLocations returns locations set by user

func (*SettingsAPI) GetByID

func (s *SettingsAPI) GetByID(ID string) (*settingsTY.Settings, error)

GetByID returns a item

func (*SettingsAPI) GetEntityInterface

func (s *SettingsAPI) GetEntityInterface() interface{}

func (*SettingsAPI) GetGeoLocation

func (s *SettingsAPI) GetGeoLocation() (*settingsTY.GeoLocation, error)

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

func (*SettingsAPI) GetLocation

func (s *SettingsAPI) GetLocation() (*GeoLocationAPIResponse, error)

func (*SettingsAPI) GetSystemJobs

func (s *SettingsAPI) GetSystemJobs() (*settingsTY.SystemJobsSettings, error)

GetSystemJobs details

func (*SettingsAPI) GetSystemSettings

func (s *SettingsAPI) GetSystemSettings() (*settingsTY.SystemSettings, error)

GetSystemSettings returns system settings data

func (*SettingsAPI) GetTelemetry

func (s *SettingsAPI) GetTelemetry() (*settingsTY.TelemetryConfig, error)

returns telemetry config data

func (*SettingsAPI) GetVersion

func (s *SettingsAPI) GetVersion() (*settingsTY.VersionSettings, error)

return version details

func (*SettingsAPI) Import

func (s *SettingsAPI) Import(data interface{}) error

func (*SettingsAPI) List

func (s *SettingsAPI) List(filters []storageTY.Filter, pagination *storageTY.Pagination) (*storageTY.Result, error)

List by filter and pagination

func (*SettingsAPI) ResetJwtAccessSecret

func (s *SettingsAPI) ResetJwtAccessSecret(newSecret string) error

func (*SettingsAPI) Save

func (s *SettingsAPI) Save(settings *settingsTY.Settings) error

Save a setting details

func (*SettingsAPI) UpdateGeoLocation

func (s *SettingsAPI) UpdateGeoLocation(location *settingsTY.GeoLocation) error

UpdateGeoLocation updates the location details

func (*SettingsAPI) UpdateJwtAccessSecret

func (s *SettingsAPI) UpdateJwtAccessSecret() error

func (*SettingsAPI) UpdateSettings

func (s *SettingsAPI) UpdateSettings(settings *settingsTY.Settings) error

UpdateSettings config into disk

func (*SettingsAPI) UpdateSystemSettings

func (s *SettingsAPI) UpdateSystemSettings(settings *settingsTY.Settings) error

UpdateSystemSettings config into disk

func (*SettingsAPI) UpdateVersion

func (s *SettingsAPI) UpdateVersion(version *settingsTY.VersionSettings) error

updates the version details

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL