Documentation
¶
Index ¶
Constants ¶
View Source
const PluginName = "WebAPI"
PluginName is the name of the web API plugin.
Variables ¶
View Source
var Parameters = &ParametersDefinition{}
Parameters contains the configuration used by the webAPI plugin.
View Source
var ( // Plugin is the plugin instance of the web API plugin. Plugin *node.Plugin )
Functions ¶
func ParseJSONRequest ¶
ParseJSONRequest parses json from HTTP request body into the dest.
Types ¶
type ParametersDefinition ¶
type ParametersDefinition struct {
// BindAddress defines the bind address for the web API.
BindAddress string `default:"127.0.0.1:8080" usage:"the bind address for the web API"`
// BasicAuth
BasicAuth struct {
// Enabled defines whether basic HTTP authentication is required to access the API.
Enabled bool `default:"false" usage:"whether to enable HTTP basic auth"`
// Username defines the user used by the basic HTTP authentication.
Username string `default:"goshimmer" usage:"HTTP basic auth username"`
// Password defines the password used by the basic HTTP authentication.
Password string `default:"goshimmer" usage:"HTTP basic auth password"`
}
}
ParametersDefinition contains the definition of the parameters used by the webAPI plugin.
Click to show internal directories.
Click to hide internal directories.