Documentation
¶
Index ¶
Constants ¶
const ( DpInterfaceSoma = "SOMA" DpInterfaceRest = "REST" DpInterfaceUnknown = "Unknown" )
List of DataPower management interfaces.
const ( // PreviousApplianceName is name of configuration for the last appliance // configured with command-line parameters (without explicitly saving config). PreviousApplianceName = "_PreviousAppliance_" )
Variables ¶
var ( DebugLogFile *bool TraceLogFile *bool )
DebugLogFile/TraceLogFile enables writing of debug/trace messages to dpcmder.log file in current folder.
var Conf = Config{ Cmd: Command{ Viewer: "less", Editor: "vi", Diff: "ldiff"}, Log: Log{MaxEntrySize: logging.MaxEntrySize}, Sync: Sync{Seconds: 4}, DataPowerAppliances: make(map[string]DataPowerAppliance)}
Conf variable contains all configuration parameters for dpcmder.
var CurrentApplianceName string
CurrentApplianceName stores configuration of current appliance name used.
var DpTransientPasswordMap = make(map[string]string)
DpTransientPasswordMap contains passwords entered through dpcmder usage, not saved to config during [other] configuration changes.
var LocalFolderPath *string
LocalFolderPath is a folder where dpcmder start showing files - set by command flag.
Functions ¶
Types ¶
type Config ¶
type Config struct { Cmd Command Log Log Sync Sync DataPowerAppliances map[string]DataPowerAppliance }
Config is a structure containing dpcmder configuration (saved to JSON).
func (*Config) CreateDpApplianceConfig ¶ added in v0.3.0
CreateDpApplianceConfig creates empty DataPower appliance JSON configuration as byte array.
func (*Config) DeleteDpApplianceConfig ¶ added in v0.2.1
DeleteDpApplianceConfig deletes DataPower appliance JSON configuration.
func (*Config) GetDpApplianceConfig ¶ added in v0.1.0
GetDpApplianceConfig fetches DataPower appliance JSON configuration as byte array.
type DataPowerAppliance ¶ added in v0.1.0
type DataPowerAppliance struct { RestUrl string SomaUrl string Username string Password string Domain string Proxy string }
DataPowerAppliance is a structure containing dpcmder DataPower appliance configuration details required to connect to appliances.
var CurrentAppliance DataPowerAppliance
CurrentAppliance stores configuration value of current appliance used.
func (*DataPowerAppliance) DpManagmentInterface ¶ added in v0.3.0
func (dpa *DataPowerAppliance) DpManagmentInterface() string
DpManagmentInterface returns management interface used to manage DataPower.
func (*DataPowerAppliance) DpPlaintextPassword ¶ added in v0.2.0
func (dpa *DataPowerAppliance) DpPlaintextPassword() string
DpPlaintextPassword fetches decoded password from DataPowerAppliance struct.
func (*DataPowerAppliance) SetDpPlaintextPassword ¶ added in v0.2.0
func (dpa *DataPowerAppliance) SetDpPlaintextPassword(password string)
SetDpPlaintextPassword sets encoded Password field on DataPowerAppliance from plaintext password.