Documentation
¶
Index ¶
- Constants
- Variables
- func Update() error
- type Error
- type Merry
- func (m *Merry) FormatVersion() string
- func (m *Merry) Fund(to string) error
- func (m *Merry) Load() error
- func (m *Merry) Logs(service string, outWriter, errWriter io.Writer) error
- func (m *Merry) Proxy(req interface{}, service, method string) (Response, error)
- func (m *Merry) Relay(generate int64, named bool, rpcwallet string, args ...string) error
- func (m *Merry) Replace(path, image string) error
- func (m *Merry) Save() error
- func (m *Merry) Start() error
- func (m *Merry) Status() error
- func (m *Merry) Stop(isDelete bool) error
- type Request
- type Response
Constants ¶
View Source
const ( ErrorCodeParseError = -32700 ErrorMessageParseError = "Parse error" ErrorCodeInvalidRequest = -32600 ErrorMessageInvalidRequest = "Invalid Request" ErrorCodeMethodNotFound = -32601 ErrorMessageMethodNotFound = "Method not found" ErrorCodeInvalidParams = -32602 ErrorMessageInvalidParams = "Invalid params" ErrorCodeInternalError = -32603 ErrorMessageInternalError = "Internal error" )
Error codes
Variables ¶
View Source
var DefaultComposePath string
Functions ¶
Types ¶
type Error ¶
type Error struct { Code int `json:"code"` Message string `json:"message"` Data string `json:"data"` }
Error defines a JSON-RPC 2.0 error object.
func NewInvalidParams ¶
func NewInvalidRequest ¶
func NewMethodNotFound ¶
func NewMethodNotFound() *Error
func NewParseError ¶
type Merry ¶
type Merry struct { Running bool `json:"running"` Ready bool `json:"ready"` IsBare bool `json:"isBare"` IsHeadless bool `json:"isHeadless"` Version string `json:"version"` Commit string `json:"commit"` Date string `json:"date"` Services map[string]string `json:"-"` }
func (*Merry) FormatVersion ¶
type Request ¶
type Request struct { Version string `json:"jsonrpc"` ID interface{} `json:"id"` Method string `json:"method"` Params json.RawMessage `json:"params,omitempty"` }
Request defines a JSON-RPC 2.0 request object.
type Response ¶
type Response struct { Version string `json:"jsonrpc"` ID interface{} `json:"id"` Result json.RawMessage `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
Response defines a JSON-RPC 2.0 response object.
func NewResponse ¶
func NewResponse(id interface{}, result json.RawMessage, err *Error) Response
NewResponse returns a new JSON-RPC 2.0 response object.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.