Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNotImplemented = errors.New("not implemented")
ErrNotImplemented is returned by GetDevice, which oxidized has no single- device lookup API for - only a full router.db dump (LoadDevices/GetDevices) or a fetch of a device's last stored config (GetDeviceConfig).
Functions ¶
func FetchRemoteConfig ¶
func FetchRemoteConfig(factumConfig *util.ConfigFactum) (*util.ConfigOxidized, error)
FetchRemoteConfig pulls the Oxidized API connection settings from the primary, authenticated with factumConfig.Token (checked against the primary's Settings.FactumApiToken - see web.Controller.checkServiceToken).
func NewOxidizedClient ¶
func NewOxidizedClient(c util.ConfigOxidized) *oxidizedClient
func RemoteClient ¶
func RemoteClient(factumConfig *util.ConfigFactum) (*oxidizedClient, error)
RemoteClient is the FetchRemoteConfig + NewOxidizedClient convenience most callers want.
Types ¶
type FactumOxidizedClient ¶
type FactumOxidizedClient struct {
Config *util.ConfigFactum
OxidizedConfig *util.ConfigOxidized
Oxidized *oxidizedClient
}
func NewFactumOxidizedClient ¶
func NewFactumOxidizedClient(config *util.ConfigFactum) (*FactumOxidizedClient, error)
NewFactumOxidizedClient fetches the Oxidized API connection settings and the oxidized-sync settings (router.db path, ignore lists) from the primary over REST - config.Oxidized is never used, since factum-oxidized typically runs on a different host than the primary and has no local oxidized config of its own (see util.ConfigOxidized's doc comment).
type OxidizedDevice ¶
OxidizedDevice is one entry from oxidized's own router.db file.