aboutsummaryrefslogtreecommitdiff
path: root/ctlsock/json_abi.go
blob: 7deff08d3d1b708817b9ab76d99304a3fd91a307 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package ctlsock

// RequestStruct is sent by a client (encoded as JSON).
// You cannot perform both encryption and decryption in the same request.
type RequestStruct struct {
	// EncryptPath is the path that should be encrypted.
	EncryptPath string
	// DecryptPath is the path that should be decrypted.
	DecryptPath string
}

// ResponseStruct is sent by the server in response to a request
// (encoded as JSON).
type ResponseStruct struct {
	// Result is the resulting decrypted or encrypted path. Empty on error.
	Result string
	// ErrNo is the error number as defined in errno.h.
	// 0 means success and -1 means that the error number is not known
	// (look at ErrText in this case).
	ErrNo int32
	// ErrText is a detailed error message.
	ErrText string
	// WarnText contains warnings that may have been encountered while
	// processing the message.
	WarnText string
}