struct Obsctl::IPC::Response

Overview

Command response correlated to a client request by request ID.

Defined in:

obsctl/ipc/response.cr

Constant Summary

TYPE = "response"

Constructors

Instance Method Summary

Constructor Detail

def self.new(id : String, ok : Bool, result : JSON::Any | Nil = nil, error : ErrorPayload | Nil = nil) #

[View source]

Instance Method Detail

def clone #

[View source]
def copy_with(id _id = @id, ok _ok = @ok, result _result = @result, error _error = @error) #

[View source]
def error : ErrorPayload | Nil #

def id : String #

def ok : Bool #

def result : JSON::Any | Nil #

def to_json(json : JSON::Builder) : Nil #

Writes the wire-format JSON object for this response.


[View source]