Documentation
¶
Overview ¶
Package jsonrpc enables communication with Prisma
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manifest ¶
type Manifest struct {
PrettyName string `json:"prettyName"`
DefaultOutput string `json:"defaultOutput"`
Denylist []string `json:"denylist"`
RequiresGenerators []string `json:"requiresGenerators"`
RequiresEngines []string `json:"requiresEngines"`
}
Manifest describes information for the Prisma Client Go generator for the Prisma CLI.
type ManifestResponse ¶
type ManifestResponse struct {
Manifest Manifest `json:"manifest"`
}
ManifestResponse sets the response Prisma Client Go returns when Prisma asks for the Manifest.
type Request ¶
type Request struct {
// JSONRPC describes the version of the JSON RPC protocol. Defaults to `2.0`.
JSONRPC string `json:"jsonrpc"`
// ID identifies a unique request.
ID int `json:"id"`
// Method describes the intention of the request.
Method string `json:"method"`
// Params contains the payload of the request. Usually parsed into a specific struct for further processing.
Params json.RawMessage `json:"params"`
}
Request sets a generic JSONRPC request, which wraps information and params.
type Response ¶
type Response struct {
// JSONRPC describes the version of the JSON RPC protocol. Defaults to `2.0`.
JSONRPC string `json:"jsonrpc"`
// ID identifies a unique request.
ID int `json:"id"`
// Result contains the payload of the response.
Result interface{} `json:"result"`
}
Response sets a generic JSONRPC response, which wraps information and a result.
func NewResponse ¶
NewResponse forms a new JSON RPC response to reply to the Prisma CLI commands
Click to show internal directories.
Click to hide internal directories.