Documentation
¶
Overview ¶
This package contains the implementation of the commands used to test each IL2 API.
This package contains the implementation of the commands used to test each IL2 API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatRequestResponseCommandError ¶
Formats the errors returned by the API calls in a human readable form that is them wrapped into an error that can be returned to Cobra framework.
This is a quick and dirty way to implement error handling using this framework but may not be the best way to do so.
func ToPrettyJSON ¶
Converts the object o into a formatted JSON. It is used to output JSON responses when necessary.
Types ¶
type ApplicationCore ¶
type ApplicationCore struct {
Config Configuration
}
The application's core type.
var AppCore ApplicationCore
This is the application's core singleton.
func (*ApplicationCore) LoadConfig ¶
func (c *ApplicationCore) LoadConfig(configFile string) error
Loads the configuration from the file.
type Configuration ¶
type Configuration struct { Loaded bool `json:"-"` BasePath string `json:"basePath"` SkipServerVerification bool `json:"skipServerVerification"` CertFile string `json:"certFile"` KeyFile string `json:"keyFile"` PFXFile string `json:"pfxFile"` PFXPassword string `json:"pfxPassword"` }
Structure of the configuration file used by this program.
func (*Configuration) Load ¶
func (c *Configuration) Load(file string) error
Loads the configuration from a file. Missing fields in the file will be set to their default values. On success, the field Loaded will be set to true.