Documentation ¶
Index ¶
- type MonitorController
- type NodeController
- func (m *NodeController) CleanStartNode()
- func (m *NodeController) Coinbase()
- func (m *NodeController) GetIstanbulLog()
- func (m *NodeController) GetLogs()
- func (m *NodeController) GetLogsJson()
- func (m *NodeController) GetVersion()
- func (m *NodeController) MineStart()
- func (m *NodeController) NodeLastRestart()
- func (m *NodeController) NodeRestartNetwork()
- func (m *NodeController) ProposeCandidate()
- func (m *NodeController) RestartNode()
- func (m *NodeController) StartNode()
- func (m *NodeController) StatusNode()
- func (m *NodeController) StopNode()
- func (m *NodeController) TransactionsClean()
- func (m *NodeController) UpdateFiles()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MonitorController ¶
type MonitorController struct {
beego.Controller
}
Monitor operations
func (*MonitorController) GetVersion ¶
func (m *MonitorController) GetVersion()
@Title GetVersion @Description Check monitor version @Success 200 {status, version} string Status, string Version @Failure 403 : overload @router /version [get]
func (*MonitorController) GetVersionUpdate ¶
func (m *MonitorController) GetVersionUpdate()
@Title GetVersionUpdate @Description Check monitor version.
involved we decide to user GET.
@Success 202 {status, version} string Status (latest | updated) @Failure 403 : overload @router /update [get]
func (*MonitorController) RestGetStatus ¶
func (m *MonitorController) RestGetStatus()
@Title RestGetStatus @Description Check status of the monitor REST @Success 200 {status} string Status @Failure 403 : overload @router /status [get]
func (*MonitorController) RestPostStatus ¶
func (m *MonitorController) RestPostStatus()
@Title RestPostStatus @Description Test simple POST method over the monitor @Param body body models.StatusReq true "String to test simple POST method" @Success 200 {map[string]string} Status information @Failure 403 overload @router /pingpong [post]
type NodeController ¶
type NodeController struct {
beego.Controller
}
Node operations
func (*NodeController) CleanStartNode ¶
func (m *NodeController) CleanStartNode()
@Title CleanStartNode @Description Starts the Alastria node clean @Success 202 {status} string @Failure 403 : error @router /start/clean [get]
func (*NodeController) Coinbase ¶
func (m *NodeController) Coinbase()
@Title getCoinbase @Description Get coinbase of the node @Success 200 {status} coinbase @Failure 403 : error @router /coinbase [get]
func (*NodeController) GetIstanbulLog ¶
func (m *NodeController) GetIstanbulLog()
@Title getIstanbulLog @Description Get Istanbul related info with a fancy formatted JSON @Success 200 {status} logData @Failure 403 : error @router /istanbul/info [get]
func (*NodeController) GetLogs ¶
func (m *NodeController) GetLogs()
@Title getLogs @Description Get logs for the node @Success 200 {status} logData @Failure 403 : error @router /info/raw [get]
func (*NodeController) GetLogsJson ¶
func (m *NodeController) GetLogsJson()
@Title getLogsJson @Description Get logs with a fancy formatted JSON @Success 200 {status} logData @Failure 403 : error @router /info/json [get]
func (*NodeController) GetVersion ¶
func (m *NodeController) GetVersion()
@Title GetVersion @Description Get current version of the node @Success 200 {status} logStatus {version} nodeVersion @Failure 403 : error @router /version [get]
func (*NodeController) MineStart ¶
func (m *NodeController) MineStart()
@Title MineStart @Description If the node is not mining start the miner @Success 202 {status} mining @Failure 403 : error @router /mine [get]
func (*NodeController) NodeLastRestart ¶
func (m *NodeController) NodeLastRestart()
@Title NodeLastRestart @Description Date/Hour of latest restart of the node @Success 200 {status} Status {date} lastUpdate @Failure 403 : error @router /start/latest [get]
func (*NodeController) NodeRestartNetwork ¶
func (m *NodeController) NodeRestartNetwork()
@Title NodeRestartNetwork @Description Restart complete network for the node @Param body body models.RestartNetReq true "Restart the whole network" @Success 202 {status} string @Failure 403 error in restart @router /network/restart [post]
func (*NodeController) ProposeCandidate ¶
func (m *NodeController) ProposeCandidate()
@Title ProposeCandidate @Description Propose new validator candidate @Param body body models.ProposeReq true "Propose a new candidate" @Success 202 {status} string @Failure 403 error in propose @router /propose [post]
func (*NodeController) RestartNode ¶
func (m *NodeController) RestartNode()
@Title restartNode @Description Restarts Alastria node @Success 202 {status} string @Failure 403 : error @router /restart [get]
func (*NodeController) StartNode ¶
func (m *NodeController) StartNode()
@Title StartNode @Description Starts the Alastria node @Success 202 {status} string @Failure 403 : error @router /start/default [get]
func (*NodeController) StatusNode ¶
func (m *NodeController) StatusNode()
@Title statusNode @Description Status Alastria node @Success 200 {status} string @Failure 403 : error @router /status [get]
func (*NodeController) StopNode ¶
func (m *NodeController) StopNode()
@Title StopNode @Description Stops the Alastria node @Success 202 {status} string @Failure 403 : error @router /stop [get]
func (*NodeController) TransactionsClean ¶
func (m *NodeController) TransactionsClean()
@Title TransactionsClean @Description Cleans the transaction queue from the node @Success 202 {status} string @Failure 403 : error @router /transactions [delete]
func (*NodeController) UpdateFiles ¶
func (m *NodeController) UpdateFiles()
@Title UpdateFiles @Description Updates files and restart node @Success 202 {status} string @Failure 403 : error @router /update [get]