23 lines
519 B
Go
23 lines
519 B
Go
package ipc
|
|
|
|
// JSONL request/response protocol shared by bleh and blehd.
|
|
|
|
type Request struct {
|
|
ID string `json:"id"`
|
|
Method string `json:"method"`
|
|
Params map[string]any `json:"params,omitempty"`
|
|
}
|
|
|
|
type Error struct {
|
|
Code string `json:"code"`
|
|
Message string `json:"message"`
|
|
}
|
|
|
|
type Response struct {
|
|
ID string `json:"id,omitempty"`
|
|
OK bool `json:"ok"`
|
|
Result any `json:"result,omitempty"`
|
|
Error *Error `json:"error,omitempty"`
|
|
Event string `json:"event,omitempty"`
|
|
}
|