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 ¶ added in v0.5.8
ParseJSONRequest parses json from HTTP request body into the dest.
Types ¶
type ParametersDefinition ¶ added in v0.7.4
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"` } // EnableDSFilter determines if the DoubleSpendFilter should be enabled. EnableDSFilter bool `default:"false" usage:"whether to enable double spend filter"` }
ParametersDefinition contains the definition of the parameters used by the webAPI plugin.
Click to show internal directories.
Click to hide internal directories.