package
1.65.4
Repository: https://github.com/untangle/golang-shared.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

FileExists returns true if we can Stat the filename.
GetCurrentSettings returns the current settings from the specified path the current settings are the settings after being synced.
GetDefaultSettings returns the default settings from the specified path.
Deprecated, use UnmarshallSettingsAtPath! GetSettings returns the settings from the specified path.
GetSettingsFile returns the settings from the specified path of the specified filename.
GetSettingsFileSingleton returns a SettingsFile object that is a singleton.
GetUID returns the UID of the system Replace this in the settings service in golang-shared.
GetUIDOpenwrt returns the UID of the system.
LocateFile calls FilenameLocator.LocateFile on the default filename locator.
NewPathUnmarshaller creates a new PathUnmarshaller that will read from reader.
NewSettingsFile is a constructor for SettingsFile, give it filename as a path to the settings file, and any supplemental options you want.
NewSyncSettings creates a new settings object.
RegisterSyncCallback registers a callback.
SetSettings updates the settings.
SetSettingsFile updates the settings.
SetSighupProperties sets the properties of running sighup, such as if it should and the processes to sighup @param shouldRunSighup - true if sighup should be run after callsbacks, false otherwise @param sighupExecutables - executables to call sighup on, empty string if none.
Shutdown settings service.
Startup settings service.
TrimSettings trims the settings.
TrimSettingsFile trims the settings in the specified file.
UnmarshalSettingsAtPath is a wrapper function for the PathUnmarshaller struct and associated functions.
WithLock will use the given lock in the SettingsFile to lock for reads/writes.

# Variables

ShouldRunSighup is if sighup should be run after sync-settings callbacks.
SighupExecutables are the executable to run for sighup if necessary.

# Structs

AffectedValue represents each affected item that will be read by the UI.
Confirmation represents the array of invalid items from sync-settings.
FilenameLocator finds files on the local filesytem, allowing the system to be in hybrid or non-hybid mode and concealing the diffrences.
InvalidItem represents the invalid item from sync-settings with child/parent id, reason, value, and type.
NoFileAtPath is an error for if a file doesn't exist.
PathUnmarshaller unmarshals objects in a JSON object given a path through the JSON input object to that desired target object.
SetSettingsError represents the top structure from sync-settings with CONFIRM so we can pick up the error.
SetSettingsErrorUI represents the structure sent to the UI for reading the error.
SettingsFile is an object representing the system-wide settings and operations on them, which can be configured to point to a local file.
SyncSettings is the struct holding sync-settings information.

# Type aliases

SettingsOption is an option for the constructor of SettingsFile.